su

Switch shell to another user. More information: <https://manned.org/su>.

Install

All systems
curl cmd.cat/su.sh
Debian Debian
apt-get install util-linux
Ubuntu
apt-get install util-linux
Alpine
apk add util-linux
Arch Arch Linux
pacman -S util-linux
image/svg+xml Kali Linux
apt-get install util-linux
CentOS
yum install util-linux
Fedora
dnf install util-linux
Windows (WSL2)
sudo apt-get update sudo apt-get install util-linux
OS X
brew install util-linux
Raspbian
apt-get install login
Docker
docker run cmd.cat/su su powered by Commando

Switch shell to another user. More information: <https://manned.org/su>.

  • Switch to superuser (requires the root password):
    su
  • Switch to a given user (requires the user's password):
    su username
  • Switch to a given user and simulate a full login shell:
    su - username
  • Execute a command as another user:
    su - username -c "command"

© tl;dr; authors and contributors