win7系統想玩Linux,首選是安裝虛擬機嘍
虛擬機版本:VMware Workstation Pro
操作系統:CentOS-6.6-x86_64-bin-DVD1.iso
創建虛擬機:CentOS64_1 賬號:test 密碼:test
OK~以test賬號登錄CentOS64_1 ,接下來開始安裝基礎軟件
1.上傳下載命令安裝
執行命令:yum install -y lrzsz
提示:Loaded plugins: fastestmirror, refresh-packagekit, security
You need to be root to perform this command.
顯然,test用戶沒有權限執行該命令,提示需要使用root權限
切換用戶
執行命令:sudo root
[sudo] password for test:
輸入密碼後提示:test is not in the sudoers file. This incident will be reported.
究其原因是用戶沒有加入到sudo的配置文件裏
編輯sudo配置文件
執行命令:visudo
提示:visudo: /etc/sudoers: Permission denied
visudo: /etc/sudoers: Permission denied
還是因爲test用戶權限不足
呵呵,大招來了
執行命令:su -
Password:
輸入密碼後直接切換到root權限
利用root權限編輯sudo的配置文件
沒有退出visudo命令,直接ctrl+z退出後,再次執行visudo命令
提示:visudo: /etc/sudoers busy, try again later
沒招兒啦,我乾脆關閉虛擬機重新打開一次好了
然後編輯sudo配置文件,爲test添加root權限
開始輕鬆安裝軟件啦~