加入收藏 | 设为首页 | 会员中心 | 我要投稿 汽车网 (https://www.0577qiche.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 教程 > 正文

CentOS下 command not found 问题的解决

发布时间:2023-04-22 11:20:09 所属栏目:教程 来源:
导读:CentOS下 command not found 问题的解决

今天在打开centos系统的时候,突然全部命令都不能正常使用了,如:shutdown reboot ssh scp这些。全部都显示 command not found。

找出配置文件 /root/.bash_profile
CentOS下 command not found 问题的解决

今天在打开centos系统的时候,突然全部命令都不能正常使用了,如:shutdown reboot ssh scp这些。全部都显示 command not found。

找出配置文件 /root/.bash_profile进行修改:

1、进入root路径

2、.bash_profile是隐藏文件,用命令:ls -la 显示出来

3、vi .bash_profile 修改如下:

# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin:/sbin:/usr/bin:/usr/sbin

export PATH
unset USERNAME

4、保存并退出

5、直接断电关机重启(因为shutdown命令如果执行。所以直接关机),重启后问题解决!

(编辑:汽车网)

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

    推荐文章