Thuta Learning
IntermediateDevOps & Toolsbeginner

Users & Groups Basics

Relax. We'll talk through this in plain words — no textbook voice.

What you'll walk away with

  • Get comfortable with Users & Groups basics — no need to fear them
  • Practice running the commands yourself in the terminal
  • See how these commands come in handy on a real server or project

Let's think about it this way for a second

Every user (account) has a user ID (UID), and the admin account root (UID 0) can control the system without restrictions. A group is a team made up of multiple users — you can grant every user in the developers group access to a single project folder at once through group permissions, without having to set permissions for each user individually. When you provision a cloud server, best practice is to not log in directly as root — instead, create an ordinary user and only reach for admin privileges via sudo (we'll cover that in the next chapter) when you actually need them.

Let's connect this to a real-world scenario

whoami shows you which user you are, while id shows your UID plus every group you belong to. The /etc/passwd file lists every user account on the system (passwords aren't actually stored there anymore — for security they're encrypted in /etc/shadow). Typing groups shows all the groups you're a member of.

Let's try it together in the terminal

bash
whoami
id
groups
cat /etc/passwd | head -n 3
You should see
The id command returns something in the format uid=1000(username) gid=1000(username) groups=...

5-Minute Try-It

Copy the output of id and write down your UID and how many groups you belong to.

A Quick Word of Caution

Cloud servers usually have root login disabled by default — that's a security best practice, not an error.

Easy traps

  • Treating root like an ordinary account and using it directly for daily work
  • Assuming that having group permission means you no longer need user permission — you actually need to check both

Now Try It Yourself

Copy the output of id and write down your UID and how many groups you belong to.

You'll know it worked when: The id command returns something in the format uid=1000(username) gid=1000(username) groups=...

Users & Groups Basics | Thuta Learning