輸入命令設置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