Programmers learn & share
+1 vote

Problem :

I am facing following sudo path error
the command could not be located because '/bin' is not included in the path environment variable.
by (6.9k points)   | 102 views

1 Answer

0 votes

Solution :

Your PATH variable seems to be messed up. If you are trying to run a restricted user with rbash, you should have /usr/bin in $PATH. 

For a terminal session you can fix this by running following command:

export PATH=$PATH:/usr/bin

After that you can use sudo command, so you can edit /etc/environment file to make the change permanent, so, run in terminal:

sudo nano /etc/environment

To edit the file please make sure that the path is something like this:


Save and close the file with Ctrl+X and press Y when you are asked.

by (36.1k points)  
2,204 questions
2,608 answers
241 users