最近在接触Linux,将学习过程中遇到的bug记录一下。
目录
一、/etc/profile配置错误command is not found
一、/etc/profile配置错误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 编辑
最重要的是,在进行profile编辑的时候,英文单词不要写错了