Two ways to access root privileges in Linux

There are two methods to gain root access in Linux.

  1. By using the “su” command, simply enter it in the terminal and then input the password for the root user to switch to root access.
  2. To use the sudo command: In the terminal, use the sudo command to run commands that require root permissions. The system will prompt you to enter the current user’s password to verify your identity. If the verification is successful, the command can be executed.
bannerAds