Stack Exchange Network
Stack Exchange network consists of 183 Q&A communities including
Stack Overflow
, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Visit Stack Exchange
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.
Sign up to join this community
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about Teams
Ask Question
Can't execute terminal commands: "the command 'sudo' is available in '/usr/bin/sudo'"
(5 answers)
Closed
9 years ago
.
Can someone tell me why I get this error when I try to add a repository and what if anything I can do about it?
When I try to add a repository using:
sudo add-apt-repository ppa:upubuntu-com/tor
I get the following error:
Command 'sudo' is available in '/usr/bin/sudo'
The command could not be located because '/usr/bin' is not included in the PATH
environment variable.
sudo: command not found
Your PATH variable has been messed up. Unless 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:
export PATH="/usr/bin:$PATH"
As @SylvainPineau mentioned, this answer covers how to permanently fix your path by editing the /etc/environment
file.
–