更改了sudo路径,找不到命令继续 [英] changed sudo path, command continues not being found

查看:104
本文介绍了更改了sudo路径,找不到命令继续的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我添加了

export PATH="/home/deltrem/Pedro - Arquivos/play/ps1/linux/pSX:$PATH"

/root/.bashrc

,但

sudo pSX

回声

command not found.

推荐答案

您是否以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.

这篇关于更改了sudo路径,找不到命令继续的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆