su
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}}"
This is a tldr pages (source, CC BY 4.0) web wrapper for cheat-sheets.org. All commands, popular commands, most used linux commands. Referrals. Progressive Web Application (PWA) version to install on your device.