-bash: ls: No such file or directory 错误的原因及解决办法
ubuntu出现如下错误:
{
Welcome to Ubuntu 16.04.5 LTS (GNU/Linux 4.15.0-42-generic x86_64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage
77 packages can be updated.
0 updates are security updates.
*** System restart required ***
Last login: Fri Dec 7 13:59:33 2018 from 10.12.21.2
-bash: ls: No such file or directory
-bash: lesspipe: No such file or directory
-bash: dircolors: No such file or directory
-bash: ls: No such file or directory
carrie@carrie-MMLP7AP-V7:~$ sudo su -l
Command 'sudo' is available in '/usr/bin/sudo'
The command could not be located because '/usr/bin' is not included in the PATH environment variable.
sudo: command not found
}
原因是:
默认的环境变量错误,
#cat /etc/profile
export PATH=
修改错误:
# export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
# reboot
重启机器,登陆OK。
最新文章
- 精选30道Java笔试题解答
- kafka集群搭建和使用Java写kafka生产者消费者
- 图像上传OSS的BUG
- python时间处理之datetime
- 还原没有日志文件的SQL数据库
- (hdu)5546 Ancient Go
- linq 动态排序
- Html5响应式设计与实现广场
- javascript中关于继承的理解
- Html5笔记之小结
- C++编写ATM
- eclipse工具类及插件(svn的安装)
- (next_permutation) 排列2 hdu 1716
- 浅谈cookie、session
- linux,windows下日志文件查找关键词
- 如何为linux系统设置全局的默认网络代理
- Eclipse添加Spket插件实现ExtJs智能提示
- 菜鸟译文(二)——使用Java泛型构造模板方法模式
- Daily Scrumming 2015.10.22(Day 3)
- 排序算法总结(基于Java实现)