输入命令设置root密码命令行
sudo passwd
获得的答复是code
We trust you have received the usual lecture from the local System Administrator. It usually boils down to these three things: #1) Respect the privacy of others. #2) Think before you type. #3) With great power comes great responsibility. [sudo] password for xxx:
大意就是:
“咱们相信您已经收到了本地系统管理员的例行讲座。一般能够归结为如下三个方面:three
1)尊重他人隐私。虚拟机
2)输入命令行前要想清楚。it
3)强大的权限带来巨大的责任。”rust
反正就是叫你不要乱搞就对了,以后输入你的root密码便可。权限
设置好后,输入密码
su root
而后会发现命令行前的$都变成了#,[xxx@localhost]也变成了[root@localhost]word
接下来设置权限,命令为文件
sudo chmod -R 777 目录名
其中
-R 是指级联应用到目录里的全部子目录和文件
777 是全部用户都拥有最高权限
很少BB,举个例子:切换到根目录后输入命令行开启usr目录下全部用户的权限
sudo chmod -R 777 usr
The End