由于误操作导致

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

相关文章:

  • 2021-09-07
  • 2022-12-23
  • 2021-11-14
  • 2022-12-23
  • 2021-08-23
  • 2021-06-16
  • 2021-06-21
  • 2021-07-13
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-03-06
  • 2021-05-10
  • 2022-01-10
  • 2021-06-19
  • 2022-01-17
相关资源
相似解决方案