無名

大猫咪与小狮子

导航

source /etc/profile报错-bash: id:command is not found

由于误操作导致

source /etc/profile 报错

-bash: id:command is not found 

此时,linux下很多命令到不能能用,包括vi ls 等...

可以使用

export PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

重新启用这些命令

如果 /etc/profile存在错误而导致source 不能成功,可以使用

/bin/vi  /etc/profile 编辑

posted on 2016-08-31 11:40  xiezhengcai  阅读(3706)  评论(0编辑  收藏  举报