Su Installation On A Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora, Raspbian And MacOS

Su Installation On A Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora, Raspbian And MacOS

su

Switch shell to another user.

Maintainer: LaMont Jones


Section: utils

Install su

  • Debian apt-get install util-linux Click to copy
  • Ubuntu apt-get install util-linux Click to copy
  • Alpine OS apk add util-linux Click to copy
  • Arch Linux pacman -S util-linux Click to copy
  • Kali Linux apt-get install util-linux Click to copy
  • CentOS yum install util-linux Click to copy
  • Fedora dnf install util-linux Click to copy
  • Raspbian apt-get install login Click to copy
  • macOS brew install util-linux Click to copy

Switch shell to another user.

How to use su?

Below are few example commands for su that you can use in the terminal.

Switch to superuser (admin password required):
suClick to copy
Switch to user {{username}} (password required):
su usernameClick to copy
Switch to user {{username}} and simulate a full login shell:
su - usernameClick to copy
Installation of latest su command is available for Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora, Raspbian and macOS. You can copy the command for your OS from above and paste it into your terminal. Once you run the command it will download the 2026 latest package from the repository and install it in your computer/server.