Linux修改/etc/profile配置错误commandisnotfound自救方法

本文发布时间: 2019-Mar-22
我的CSDN博客地址: http://blog.csdn.net/caicongyang博主之前在修改了/etc/profile配置文件方法后,导致bash命令无法用执行ls命令结果如下: -bash: ls:command is not found但是庆幸的是博主之前备份了/etc/profile,于是我把profile通过SSH还原回去,但是现在需要执行# source /etc/profile让配置文件重新生效,然后不幸的事情是 -bash: id:command is not found发现 source命令已经不认识!经过度娘提点,我们可以用命令重新这是PATH;# export PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin 执行完以上的命令后,你可以重新执行 source /etc/profile命令来让你的配置文件生效如果不幸的是你的profile配置文件没有备份,在直接使用vi命令无法使用的情况下,你可以在vi前面加上命令的地址#/bin/vi /etc/profile这样就可以使用vi命令来修改啦!我的CSDN博客地址: http://blog.csdn.net/caicongyang


(以上内容不代表本站观点。)
---------------------------------
本网站以及域名有仲裁协议。
本網站以及域名有仲裁協議。

2024-Mar-04 02:09pm
栏目列表