who
– Show logged-in usersFunction: Displays current system users.
Syntax:
who
Lesson: Useful on shared servers.
whoami
– Show current userFunction: Displays your login name.
Syntax:
whoami
Lesson: Prevents mistakes on multi-user systems.
chmod
– Change permissionsFunction: Controls read, write, and execute rights.
Syntax:
chmod 755 script.sh
chmod u+x script.sh
Lesson: Essential for securing files.
chown
– Change ownershipFunction: Assigns file ownership.
Syntax:
chown user:group file.txt
Lesson: Ensures correct user access.