Ubuntu shell root: sudo


In Linux and Unix, users only allow to access files/folders with their permission only. However, under a superuser named root, users are able to have the privileges to all the administration work.

su root

su stands for Switch User. To access other users, just use their username instead of "root".

What Ubuntu different from other Linux distro is it includes sudo command. It will assign users for temporary root-level privileges. So, to execute your command in terminal under root-level privileges is simple, just add "sudo" before your command. Please note that the password require is user password and not the root password.

userA@machineA:~$ sudo vi /etc/testing.conf

"sudo -s" is equivalent to "su"

You do not have to worry when running GUI programs that require for root privileges as it will prompt for a password automatically.








Leave a Reply