Sudo path changed, command not found

I added

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

to

/root/.bashrc

but

sudo pSX

echoes

command not found .

+1
linux sudo
source share
3 answers

Are you logged in as root? If so, then you do not need sudo .

If not, then the contents of /root/.bashrc does not matter, since the sudo gets its path from the environment in which it runs. In other words, it copies your path at the user level. Instead, edit the path in your .bashrc user.

+1
source share

Is pSX directory, a file, or both (a directory named pSX containing a file named pSX )? If it is a directory, you need to enter the actual name of the command instead. If it is a file (but not a directory), you need to remove /pSX from the PATH variable.

Does pSX set of executable bits? OS may not know that pSX is a command.

0
source share

After spending the last hour hitting my head against the wall, I finally figured out how to do it. It has nothing to do with bashrc, profile, or environment. Instead, open / etc / sudoers and change the secure_path .

0
source share

All Articles