• Register
1 vote
185 views

Problem :

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

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:

PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"

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

36.1k points

Related questions

0 votes
1 answer 38 views
38 views
Problem : I am new to Chown. I am still learning it. I tried to set the EACCESS for the npm and then I ran the Chown command in the terminal to change the owner permission but currently i am totally stuck in following "Sudo : /usr/bin/sudo must be owned by uid 0 and have the setuid bit set" I am using ubuntu14.04 LTS. How to fix this error?
asked Feb 27 mphil 2.3k points
0 votes
1 answer 632 views
632 views
Problem : I am stuck with the following strange looking error 'sudo' is not recognized as an internal or external command, operable program or batch file.
asked Nov 16, 2019 peterlaw 6.9k points
1 vote
1 answer 150 views
150 views
Problem : I am getting bellow flask app error error: could not locate flask application. you did not provide the flask_app environment variable.
asked Nov 8, 2019 peterlaw 6.9k points
0 votes
1 answer 159 views
159 views
Problem : I am facing the below error while trying to execute my below command in linux for installing the oracle on EC2 instance. $./runInstaller Starting Oracle Universal Installer... Checking Temp space: must be greater than 500 MB. Actual 9321 MB Passed ... Failed <<<< Some requirement checks have failed. You must fulfill these requirements before Anyone who knows the solution on my error?
asked Jan 10 alecxe 7.5k points
0 votes
1 answer 12 views