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 编辑


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM