Working with Linux often presents a challenge: permissions. Many tasks can only be performed with administrator rights, which are associated with the user account "root". In this guide, you'll learn how to effectively use these rights to administer your system and make configurations. The commands "sudo" and "su" come into play here. Let's get started!
Key Insights
- The sudo command allows you to run programs with administrator rights.
- The su command lets you access the root account.
- It is advisable to use the sudo command regularly to avoid permission issues.
Step-by-Step Instructions
Accessing Administrator Rights
To work with a terminal in your Linux system, you often need to have administrator rights. The most common way to achieve this is by using the command sudo. For example, if you want to change configurations or install software, you will need these permissions. To use the sudo command, open your terminal and type:
sudo [command]
Here, you replace [command] with the specific command you want to execute. To make it easier to get started, you can grant temporary administrative rights with sudo.

Using the su Command
An alternative method to gain administrator rights is the su command. This stands for "Switch User" and allows you to operate as another user, usually as root. Just type:
su
Then, you need to enter the password of the target user. Upon successful entry, you are now operating in the context of the root user.

Working as a Root User
Once you are logged in as the root user, you have access to all areas of your Linux system. This means you can install updates, uninstall software, and make all system configurations. For example, if you want to apply a few updates, you can either do this directly with the sudo command or work as the root user. Remember that you can also use the exit command at any time to return to your normal user account.
Efficient Use of sudo
To avoid having to prepend the word sudo to every command, you can switch to a root environment with sudo -i or sudo -s. This allows you to execute multiple commands in a row without constantly adding sudo.
Conclusion and Next Steps
Operating with root rights should always be done with caution. When you work with administrator rights, you have control and responsibility over the entire system. A mistake could have undesired consequences. To return to normal usage, you can use the exit command.
Summary – Sudo and the Super User (Root): A Beginner's Guide
In this guide, you learned how to effectively use the sudo and su commands to obtain the necessary permissions and manage your system. These skills are fundamental for smooth usage of the Linux platform.
Frequently Asked Questions
What is the difference between sudo and su?sudo allows commands to be run with administrator rights without switching user accounts, while su requires the password for a user switch, usually to root.
When should I use sudo?When you are working with a normal user account and need administrator rights for specific tasks.
Can I run multiple commands with sudo?Yes, you can use sudo -i or sudo -s to switch to a root environment and execute multiple commands in a row.
What happens if I type exit?You exit the root environment and return to your normal user.
How do I handle permission issues?Use sudo before the command if you encounter a permission issue.