Saturday, September 30, 2023
 Popular · Latest · Hot · Upcoming
rated 0 times [  2] [ 0]  / answers: 1 / hits: 3081  / 2 Years ago, thu, may 13, 2021, 4:38:52

so I was trying to set JAVA_HOME variable and some how I ended up facing this error every time I want to use terminal

Command 'poweroff' is available in the following places
* /sbin/poweroff
* /usr/sbin/poweroff
The command could not be located because '/sbin:/usr/sbin' is not included in the
PATH environment variable.
This is most likely caused by the lack of administrative privileges associated with
your user account.
poweroff: command not found

I can fix it with this command:

export PATH="/usr/bin:$PATH"

but every time I open new terminal I face the error again and I have to use this command again.

I would appreciate it if you could help.
by the way I use Ubuntu 22.04.1 LTS

More From » bashrc


Go to your home directory, edit .bashrc

Add your line:

export PATH="/usr/bin:$PATH"

Now your path will be exported every time you start a new terminal instance.

You can, of course, add any other path you want, before $PATH

Good luck.

[#205] Saturday, May 15, 2021, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.

Total Points: 336
Total Questions: 105
Total Answers: 113

Location: Vietnam
Member since Sun, Oct 18, 2020
3 Years ago
oargrou questions
Wed, Jul 21, 21, 01:38, 2 Years ago
Sat, May 15, 21, 17:39, 2 Years ago
Tue, May 24, 22, 14:58, 1 Year ago
Sat, Mar 19, 22, 05:22, 2 Years ago