As you learned inSection 7.1, “User Concept”, some tasks in Linux require root
permissions, otherwise they cannot be executed. In order to temporarily become root in
a shell, proceed as follows:
Enter su (for super user). You are prompted for the root
password.
Enter the password. If you mistyped the root password, the shell displays a
message. In this case, you have to re-enter su before retyping the password.
If your password is correct, a hash symbol # appears at the end of the
prompt, signaling that you are acting as root now.
Execute your task. For example, you can enter the following command to list the
partitions of your hard disk which only root is allowed to execute:
fdisk -l
After having completed your tasks as root, switch back to your normal user
account. To do so, enter
exit
The hash symbol disappears and you are acting as “normal” user again.