HOW TO SWITCH FROM KALI TO USING ROOT ADMINISTRATION IN LINUX.
As a beginner in the Penetration Testing Field, my initial challenge was accessing root privileges. Root privilege was necessary for me to install and update specific commands necessary for my learning.
I intend to also assist fellow aspiring penetration testers by sharing my experience. To issue root commands on Linux, however, we first need to understand the idea of root access and its significance to Linux.
The root access in Linux is similar to obtaining the highest level of administrative privileges. It grants complete control and authority over the operating system and allows you to modify vital system configurations, install and update software, and access sensitive files.
It basically, provides you with the ability to make changes that affect the entire operating system, much like a landlord or owner of a house who has the freedom to make any changes to his/her house as desired.
Let’s not go too far, Root Access is very much like you who have a Laptop or phone, and because it’s yours, you have the privilege to install and download whatever you want.
It’s necessary to bear in mind though that great power also comes with great responsibility. You may need to exercise caution and careful consideration before opting to run a command as the root administrator because doing so may have an impact on the entire system.
We can now look at how to effectively switch to root on a Linux system now that we are familiar with the concept of root access and its significance.
Here’s a step-by-step guide on how to switch from a regular user account to the root user account in Linux:
- Login to Linux:
~Power on your machine and wait for the login screen to appear.
~Enter your username and password in the provided fields.
~Press Enter or click the “Login” button to proceed.
2. Open a Terminal:
~After logging in, you will typically be presented with a graphical desktop environment.
~Locate the terminal application. It is often represented by a command prompt icon like you see on your computer or can be accessed through the Applications menu.
3. Launch the Terminal:
~Click on the terminal application icon highlighted above to open a new terminal window.
~The terminal window will display a command prompt where you can enter commands like the screenshot below.
4. Update Packages:
~Type “sudo apt update” on the terminal and press
Enter.
~This command updates the package manager in Kali Linux.
5. Entering the Command to change to root:
~Enter the “sudo su” Command
6. Enter the Root Password:
~After running the “sudo su” command, you will be prompted to enter the root user’s password.
~Type the root user’s password and press Enter.
Note:
~Your root password might be the password you used to log in to your Machine.
~As you enter the password, it won’t be visible on the screen. Just type it as you normally would and press Enter.
7. Verify Successful Switch:
~If the password you entered is correct, you will be logged in as the root user.
~The terminal prompt will change, typically displaying the username as “root” and the hostname like in the Screenshot above.
As the root user, you now have full administrative privileges and can perform administrative tasks.
Remember: Be cautious when using the root account, as it has unrestricted access and can make critical changes to the system.
You can always switch back to Kali by running the command:
“su kali”:
Note:
~In Linux, the “su” command stands for “substitute user” or “switch user.” It allows you to switch to a different user account.
I hope you were able to follow the steps in the Instructions and you can successfully switch to root in your Linux. Good luck on your journey to being a badass Pen-tester.