Skip to main content

Unit 2 · Basic Commands · Lesson 17 of 34

Users and Groups

Users & Groups

Imagine you're at your friend's place right now. You're using their computer, where a few different people log into it and everyone has their own login. You can see your own desktop and files, but you can't just open up someone else's files! They're separate accounts even though it's the same physical machine.

That's the concept of a user. Every person who logs into a Linux system is a user, identified by a username, and Linux keeps track of exactly who's doing what at all times, including who owns which files.

Users can also belong to a group, which is just users bundled together for convenience. For example, on a school's computer network, there might be a "teachers" group and a "students" group, so the IT admin can give teachers access to important school files all at once rather than having to manually add each one.

Something a little weird about Linux is that when your user account gets created, Linux automatically creates a matching group for just you. If your username is karl, you probably also belong to a group called karl. Nobody else is in it, it's basically a placeholder group that exists so every account has a group to fall back on.

Do this lesson for real

With a free account you get the terminal, the challenges and the checks that go with every lesson in Intro to Linux, and your progress is saved as you go. CyberAcad is a 501(c)(3) nonprofit, so there is nothing to pay.