更新时间: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
.