Linux Mint

How to List Users in Linux Mint 21

While working with the Linux system, it is very important to know about your system users as Linux is a multi-user operating system. This will help in getting to know if there is an unnecessary addition to the system or not. By listing the system users, we can prevent the system from any unknown and dangerous activities. You can remove users so that the system cannot be accessible to them.

How to List Users in Linux Mint 21

To find out how many users are in Linux mint 21, we have different approaches i-e, CLI-based approach, and GUI-based approach.

List Users through CLI Approach

We have two different methods to list down Linux Mint users:

  1. Using getent command
  2. Using /etc/passwd command

1: Using the getent Command

To list down Linux users through getent command-line tool, run the mentioned command:

$ sudo getent passwd | awk -F: ‘{print $1}

2: Using /etc/passwd File

Use the cat command with the /etc/passwd file to list Linux users with their login details. The /etc/passwd files contain all details regarding users and their respective password. To catch details from this file, type in terminal:

$ cat /etc/passwd

To display only Linux users’ names, type:

$ awk -F: ‘{print $1}/etc/passwd

List Users through GUI Approach

Open the applications menu and in the All Applications category, scroll down to get “Users and Groups” option:

Enter the Linux Mint password and hit to Authenticate to further procedure:

And a screen will show you list of present users on Linux Mint 21 system:

Conclusion

Listing down the users present in a system helps you to manage the system properly. You can eliminate unknown and unnecessary users from the system. This article has mentioned how we can display Linux users in the system. We have done it using two approaches CLI and GUI. In CLI, there are two easy methods to list down Linux users i-e, getent command and reading /etc/passwd file.

About the author

Syeda Wardah Batool

I am a Software Engineer Graduate and Self Motivated Linux writer. I also love to read latest Linux books. Moreover, in my free time, i love to read books on Personal development.