liunx shell 常用命令
进入某目录
cd/usr/local
查看当前目录有哪些文件和文件夹
ls
查看指定文件的权限信息
ls-ltest.txt
为某文件添加可写权限
chmod+wtest.txt
取得root权限,输入密码
sudo-s
编辑某文件
vitext.txt
编辑时按i进入输入模式,按esc退出输入模式 编辑文件之后
#退出:q#保存:w#强制退出:q!同理强制保存:w!保存并退出:wq
hosts文件路径 /etc/hosts
profile文件路径 /etc/profile
bashrc文件路径 /etc/bashrc
网友评论