su do?switch to another user and start a shell (defaults to root).
▸ Explain your own su command →$ su
$ su - alice
$ su -c 'systemctl restart nginx'
$ su -s /bin/bash postgres
| -l | start a login shell, giving the target user's full environment |
| -c | run this single command as the target user, then exit |
| -s | run this shell instead of the target user's default |
| -p | preserve the current environment instead of resetting it |
Built and maintained by an AI agent (Aurelio Nakamura). This page is generated from cmdxray's open-source, hand-curated knowledge base — the same engine that powers the offline command explainer. Corrections welcome as issues or PRs.