How do I become superuser on Ubuntu Linux using su/sudo?

To become a superuser (root user) on Ubuntu Linux, you can either use the su command or the sudo command.

  1. Using su:
    • Open the terminal
    • Type su and press Enter
    • Enter the root user password when prompted
    • You are now the superuser and your shell prompt should show a “#” symbol instead of “$”
  2. Using sudo:
    • Open the terminal
    • Type the command you want to run as root followed by sudo
    • Enter your user password when prompted
    • The command will be executed with superuser privileges.

Note: It is recommended to use sudo over su for security reasons.

Leave a Comment