The following steps are very simple and especially for newbies who are completely new to Linux. 🙂 By logging in as root user, you are making your operating system more vulnerable. Root user has all the administrator privileges so whenever you need to edit system files or configuration from within Gnome, you will feel the need to login to Ubuntu as a root user. There are 2 methods to login as a root user
- Graphical Method (GUI Method)
- Command Line Method (CLI Method)
Method 1: GUI Method
Following are the steps to be followed to login as a root user in GUI Mode,
- Go to Applications -> Accessories -> Terminal
- Type: sudo passwd root
- Enter your password of the current user
- When you see the prompt that says “Enter new UNIX password”, enter the password you want for the root userand confirm it. [My suggestion is to assign its pswd as “root”]
- Type exit to exit the terminal
- Restart Ubuntu and wait for the login screen to appear
- Click other.. and type User name : root and Password : root
This should work fine and you are done.!
Method 2: CLI Mode
Following are the steps to be followed to login as a root user in CLI Mode,
- Go to Applications -> Accessories -> Terminal
- Type sudo su (Meaning: superuserdo superuser)
- Now you are into root dircetory, You may modify whatever you wish from here if you are familiar with commands.
- NOTE: You can also login into other Users from root directory via terminal window by typing the following command login username and Password of the corresponding User you wish to login.
- Use the above method with Caution.Read this post for assistance https://help.ubuntu.com/community/RootSudo
Note: Always take a backup of the file that you wish to alter, so that you may set them back if anything went wrong.
3 Comments
IT IS HIGHLY RECOMMENDED DONT ENTER AS ROOT USER through first method as given by the author, “especially for newbies” lines should be changed..newbies shouldnt enter as “root” as it is highly vulnerable.
second method can be used,”sudo” method is not actually having all root privileges but it can be used for most of the operations to act as like “root” and it is only recommended
Thanks for your update Mr.balaji.
I admit your point. I thought that It’s understood and herewith I’d like to caution readers that they are doing it by your own risk !.
if the user don’t want to give password every time while using “sudo” they can add the below command in the terminal.
echo ALL=NOPASSWD: ALL >> /etc/sudoers