>_cmd.script

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.

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.

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 playground

Your 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.

← All Beginner Linux lessons
Permissions and identity — Beginner Linux Learning Path | CMD Script