控制台模式下未设置 PATH

控制台模式下未设置 PATH

我遇到了登录循环问题,因此我尝试使用命令模式CTRL+ALT+F1,但问题是所有经典命令都不起作用,我觉得这是问题的根源。

当我打开控制台模式时:

-bash: groups: command not found
 Command "ls" is available in "/bin/ls" 
 The command could not be found because '/bin' is not included in the PATH environment variable.
 ls: command not found
 Command 'lesspipe' is available in the following places:
  * /bin/lesspipe
  * /usr/bin/lesspipe
  .
  .
  .

并且.xsession_errors中也有很多command not find错误。

有解释吗?有解决方法吗?

答案1

我找到了解决方案。事实上,这是因为我PATH在 中覆盖了/etc/environment

相关内容