How to View a List of Users on a VPS?

A Virtual Private Server (VPS) is a useful tool for storing data, running applications, or hosting websites. However, it’s important to have control over who has access to your server. In this article, we’ll explore how to view a list of users on a VPS.

To begin, you’ll need to connect to your VPS via SSH. You can do this using PuTTY or any other SSH client. After successfully connecting, enter the following command:

cat /etc/passwd

This command will output a list of all users on your server. Each line in the file represents information about one user. You’ll see the user’s login, encrypted password, user ID, group ID, user description, home directory, and the shell the user is using.

If you only need to see the usernames without additional information, you can use the following command:

VPS Hosting

Virtual servers with guaranteed resources

Choose VPS

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

This way, you’ll get a simple list of usernames on your VPS.

If you need to add a new user to the server or delete an existing one, you will need to use additional commands. But knowing the list of current users is the first step towards security and managing your server.

We hope this article has helped you understand how to view a list of users on a VPS. Keep your server in order and monitor access to it!