问题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
即可