Switching Security Contexts (su)
Concept & Overview
Now that you've created the deployer account, how do you log into it locally to test its environment? In Linux, we use the su (substitute user) command to switch accounts without logging out.
- The su command switches the current terminal shell to that user's session.
- When switched, running whoami will reflect the new user name.
- To return to your original user account session, type exit or press Ctrl+D.
deployer user by running su deployer. Once logged in, run whoami to verify you are indeed running as deployer. When you're done, type exit to switch back.Command Syntax Reference
| Command / Syntax | Description |
|---|---|
su deployer | Substitute user session to deployer |
whoami | Verify the active user session name |
exit | Exit active user session |
Verification Objectives
These conditions will be automatically verified when you run commands inside the interactive terminal simulator:
- ○Switch shell context to deployer using su
- ○Run whoami to confirm you are deployer
Ready to complete Quest 138?
Test your skills live in the browser terminal with an emulated Linux filesystem, real-time command evaluation, and instant step-by-step hints.