且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

更改了sudo路径,找不到命令继续

更新时间:2023-11-19 20:41:46

您是否以root用户身份登录?如果是这样,则您不需要sudo.

Are you logging in as root? If so, then you have no need for sudo.

如果没有,那么/root/.bashrc的内容将无关紧要,因为sudo命令从运行它的环境中获取其路径.换句话说,它会复制您的用户级路径.而是在用户的.bashrc中编辑路径.

If not, then the contents of /root/.bashrc won't matter, since the sudo command gets its path from the environment in which it's run. In other words, it copies your user-level path. Instead, edit the path in your user's .bashrc.