Answer the question
In order to leave comments, you need to log in
Sudo: command not found on some commands. How to make it work?
Tell me why commands with sudo may not work if sudo -s works?
$ sudo: ll: command not found
Answer the question
In order to leave comments, you need to log in
sudo su -
The sudo su
commands look the same, but work in a slightly different way.
Very often the sudo su command is typed, and then we wonder why the commands from sbin are still not available
. The fact is that by default the /sbin /usr/sbin directories are added to the root path, while ordinary users do not have them.
sudo su - change as root with setting the root environment
sudo su change as root and save the environment of the current user
In the first case, the path will change, and /sbin /usr/sbin will fall into it, and in the second - not.
In your case, like - sudo -s sets the environment from the root settings, and without -s, yours is saved.
Treat by reading the documentation, understanding the difference and applying the correct commands and switches in different situations
because there is no such command ll
ll et alias, and after sudo you have the privileges of another user, don't you?
sudo reads root's .bashrc, it's empty out of the box.
Some kind of sudo ls will work.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question