Asking because of curiosity. :)
When I type
sudo su
It asks for my user password. And when I type just
su
It asks for the root user password. But both the commands directs me to the root terminal. Then why is there such a difference?
Asking because of curiosity. :)
When I type
sudo su
It asks for my user password. And when I type just
su
It asks for the root user password. But both the commands directs me to the root terminal. Then why is there such a difference?
sudo su
means run the commandsu
assudo
which means as root. Here the system will ask you for your password since you are a sudoer. After you enter your password, you now have root privileges. Sosu
command won't ask for a password. It's same as if you are a root thensu
to any other user will not ask for password because you are a root.When you just run the command
su
, you are running it as a regular user. Sincesu
means switch to user root, you will be asked for the root password.