Forrest logo
back to the su tool

su:tldr:0b180

su: Switch to superuser (requires the root password).
$ su
try on your machine

The "su" command is short for "switch user" and is most commonly used in Unix-like operating systems, including Linux. The command allows you to change the current user without logging out or rebooting the system.

By default, if you simply type "su" in the terminal without any additional parameters, it will prompt you to enter the password of the superuser or root account. Once authenticated, you will switch to the root user, providing you with full administrative privileges.

However, you can also specify a different user to switch to by typing "su" followed by the username, such as "su johndoe". In this case, you will need to enter the password for that specific user account.

Using the "su" command is particularly useful when you need to perform administrative tasks that require elevated privileges or access files and directories restricted to a specific user.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.

Questions that are answered by this command:

  • How do I get root?
back to the su tool