加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

-bash: ls: No such file or directory 产生的原因及修改方法

发布时间:2020-12-15 23:08:45 所属栏目:安全 来源:网络整理
导读: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 pack

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
[email?protected]:~$ 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

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读