Linux is a multi-user system, so every file and process belongs to a user and a group. Knowing who can read, write or run a file is part of setting up any server safely.
Commands to know
- whoami: shows the user you are logged in as.
- id: shows your user ID and the groups you belong to.
- sudo useradd and sudo usermod: create a user and add them to a group.
- groups: lists the groups a user belongs to.
Practise safely
Use a virtual machine, not a live server. Create a test user, add them to a group, and check their access to a folder. Then remove the user, so you learn the full cycle.
Continue with Linux commands every DevOps learner should know. Our cloud and DevOps course covers these in lab work. Book a free demo class, and ask a counsellor for batch details.
