linux 問題指南

問題1. 安裝Vmware_workstation的ubuntu後使用xshell連接,發現無法連接

解決方案:先將Vmware_workstation的ubuntu改爲橋接模式後,在ubuntu中安裝ssh後啓動ssh服務即可使用xshell連接(因爲Xshell默認使用ssh登錄,而ubuntu默認是不安裝ssh服務的)

sudo apt-get install openssh-server
sudo service sshd start

問題2. user_name is not in the sudoers file.

解決方案:先切換到root用戶,然後輸入visudo,在中間加入一行
user_name ALL=(ALL) ALL
然後ctrl+x退出,再yes確定即可
原因:user_name 不在sudo組中,不能sudo

問題3:sudo: unable to resolve host xxxxxxx…xxxxxxx

解決方案:
首先vim /etc/hostname可以看到裏面就是這串亂碼,然後將這串亂碼複製下來,再vim /etc/hosts將剛剛複製下來的東西粘貼到127.0.0.1 localhost末尾,這裏注意,先打個空格,再進行粘貼

問題4:ubuntu中安裝ftp出現E: Unable to locate package vsftpd錯誤

解決方案:

sudo apt-get update
sudo apt-get install vsftp

問題5:添加環境變量

解決方案:

sudo vim /etc/profile

在裏面加入一行,其中your_path 寫上你要添加的環境變量

export PATH=$PATH:your_path

然後

source /etc/profile

即可

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章