0% found this document useful (0 votes)
17 views

How To Create A Root User in Ubuntu

Uploaded by

Sehrish Murtaza
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views

How To Create A Root User in Ubuntu

Uploaded by

Sehrish Murtaza
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

How to Install Ubuntu | Linux within Windows

A common problem that students face is: How to Run Ubuntu within Windows
i.e., without installing Ubuntu in dual mode. Windows provide a feature for this.
This feature is called “Windows Subsystem for Linux”. By default, this option
is disabled in Windows. There are some simple steps to activate this feature.
Below is step-wise procedure is with snapshots.

Pre-requisite: Windows 10

Step 1: Open “Control Panel”


Step 2: Click on “Programs and Features”

Step3: On the Left Pane click on “Turn Windows Features on or off”. A Popup
window will appear. Wait for the content to be visible.
Step 4: Scroll down until you find “Windows Subsystem for Linux”. By default it
is unchecked. Select it and press “ok”. The system will make changes and ask
for “Restart”. Restart the system as asked.

Step 5: After restarting open “Microsoft Store”


Step 6: Click on search and type “Ubuntu”. Select Ubuntu 18.04 LTS
Step 7: Click on “Get”

Step 8: Let it download and then launch it. Follow the steps as asked and you are good to go.
Step 9: After installation. Launch Ubuntu
How to Create a Root User in Ubuntu | Linux [Step-by-Step]
1. Open the terminal and which will be looks like -----@----:~#
2. Now type “sudo adduser irfan” and then press enter button, where sudo command grants
administrative privileges, adduser command is used for adding a user and irfan is the user
whom we want to create
3. Give password of the root user and then press enter
4. Then setup password for the new user, retype the password and press enter
5. Now press enter for default
6. Then press ‘y’ for the information is correct
7. Now, to check whether the user is created or not type “getent passwd | grep irfan” and
press enter
8. You will see that the user is successfully created
9. Now on going to add the user to the sudo group type “sudo usermod –aG sudo irfan” and
press enter, where usermod command modifies an existing user account, -aG adds user to
the specific group
10. Give the user password
11. Now, to check if the user is added to the group, type “groups irfan” and press enter and
you will see that the user is added to the group sudo
12. After adding the user to the sudo group, now to verify the user privileges, type “su -
irfan” and press enter, which switches the user to the new user i.e. irfan
13. Typing the password and pressing the enter again, you can see that you have switched to
the new user, which looks like “irfan@DESKTOP-C1QRO98:~$”
14. Now, to edit the configuration file, type “sudo visudo” and press enter, where visudo
command helps to edit the configuration file.
15. Replace the root with created user i.e. irfan and press Ctrl+S to save and Ctrl+X to exit
16. Now, to check the privileges, type “sudo whoami” and press enter, you will see that you
are root user now.
17. To set password for root user type, “sudo passwd root” and press enter, and it will ask to
enter new password and by giving the new password, password will be updated.
18. Now, to login to new root user type, “su -” and press enter
19. Provide the updated root password and you will successfully login to the new root user

How to install GCC and G++ Compiler on Ubuntu 20.04.6 LTS


1. Open terminal and type “sudo apt update” and press enter
2. By asking user password, enter the password and update will start
3. Now, type “sudo apt install gcc g++” and press enter
4. Type ‘Y’ to continue installation
5. To check which version of gcc is installed, type “gcc --version” and press enter
6. Similarly, to check which version of g++ is installed, type “g++ --version” and press
enter

You might also like