su -
The command that starts a shell as another user, root by default, after asking for that user's password.
In more detail
su - starts a full login shell with the target user's environment and home directory, while plain su keeps much of the caller's environment. sudo -i is the equivalent that asks for your own password instead and is logged per command.
Example
su - natashaRelated terms
- sudo — A command that runs another command with administrator (root) rights after checking you are allowed to.
- root user — The all-powerful administrator account on Linux, with user ID 0, which can read or change anything.
Taught in
- Logins, su, sudo And SSH Between Hosts — Red Hat Certified System Administrator (EX200) Exam Prep
- Privileged Access: sudo Rules In Drop-In Files — Red Hat Certified System Administrator (EX200) Exam Prep
- One Word Locked Out Every Directory User: PAM, SSSD, LDAP And Kerberos — CompTIA Linux+ (XK0-006) Exam Prep
- Who Wrote That Sudoers File? The Journal, rsyslog, logrotate And auditd — CompTIA Linux+ (XK0-006) Exam Prep
- The Pager Command That Opened A Root Shell: sudo, su And Least Privilege — CompTIA Linux+ (XK0-006) Exam Prep
- Security Rounds: Special Bits, Logins, Ports And sudo — LPIC-1 Linux Administrator (101-500 and 102-500) Exam Prep