Beginner Linux · 20 min
Permissions and identity
See who you are and control who can read, write, or run a file.
Learn the commands
Commands to know
Everything you need for this lesson is here. Use the full guide only when you want more options and examples.
chmod
Read full guide →Change who can read, write, or run a file.
- Syntax
- chmod <mode> <file>
- Example
- chmod +x script.sh
Tip: Start with symbolic modes like +x before using numeric modes such as 755.
whoami
Read full guide →Print the username your shell is using.
- Syntax
- whoami
- Example
- whoami
Tip: This is useful before commands that depend on account permissions.
Show your user ID and group memberships.
- Syntax
- id [user]
- Example
- id
Tip: Groups often explain why you can or cannot access a file.
Try it
Practice exercise
Check your identity, then make a script executable with chmod.
Open playgroundYour progress
Mark this lesson when you feel ready to move on.
Your progress is saved on this device. Log in to back it up and continue anywhere.