Managing system users on an Ubuntu Linux VPS is one of those jobs that only feels “optional” until something weird happens: a login from a strange account, a port scan, or a former teammate who still has access.
In this guide, you’ll learn simple, built‑in ways to view system users in Ubuntu, see who is logged in right now, and check specific accounts without installing extra tools.
The idea is to keep your Linux server management straightforward, more secure, and easy to repeat.
First, you log in to your server over SSH from your local machine:
bash
ssh username@your-server-ip
Once you’re in and you see the shell prompt, you’re ready to start checking users.
If you’re still choosing where to run your Ubuntu Linux VPS, it helps to pick a host that gives you quick deployment and full root access so you can run these commands immediately.
👉 See how GTHost instant servers make it easy to spin up an Ubuntu VPS and start managing users in minutes.
With that in place, everything you’ll do next will feel faster and more under control.
On a typical Linux system, almost every local user shows up in one place: /etc/passwd.
Run:
bash
cat /etc/passwd
You’ll see a bunch of lines, one per user. A line looks something like this:
text
username:x:1000:1000:Some User,,,:/home/username:/bin/bash
From left to right, you get:
Username
User ID (UID)
Group ID (GID)
Comment field (often used for real names)
Home directory
Default shell
You’ll notice some “system” users too (like daemon, syslog, etc.). These usually don’t log in; they exist so services can run safely under separate accounts.
If your VPS uses extra user databases (like LDAP or NIS in bigger environments), cat /etc/passwd might not show everyone. That’s where getent comes in.
Run:
bash
getent passwd
This pulls user entries from the system’s configured databases, not just the file. The output format is basically the same as /etc/passwd, but it can include network or directory users too.
For most small Ubuntu Linux VPS setups, cat /etc/passwd and getent passwd will show almost the same list, but getent scales better if your infrastructure grows.
Sometimes you don’t care about IDs and shells. You just want usernames, nothing else.
To strip things down, use cut with /etc/passwd:
bash
cut -d: -f1 /etc/passwd
Or combine it with getent:
bash
getent passwd | cut -d: -f1
Now you get a clean, one‑per‑line list of usernames. This is handy when you want to:
Quickly scan for weird or unexpected accounts
Compare user lists between servers
Feed usernames into a script or another command
Listing all system users is one thing. Seeing who is on the box right now is another.
To check current logins, run:
bash
who
This shows users currently logged in, along with the terminal, date, and login time.
If you want more detail about what they’re doing, try:
bash
w
This adds extra info like:
How long the session has been idle
Load averages
The command each logged‑in user is running
This is great when you’re wondering, “Is anyone else on this server while I’m about to restart something important?”
When one particular account looks suspicious—or you just want to double‑check permissions—use id.
For your current user:
bash
id
For a specific username:
bash
id username
You’ll see:
UID (user ID)
GID (primary group)
Extra groups the user belongs to
This quickly answers questions like:
“Does this user really have sudo permissions?”
“Why can this user access that folder?”
“Which groups should I remove to tighten security?”
A realistic checkup on a Ubuntu Linux VPS might look like this:
List all users and scan for anything unexpected:
bash
getent passwd | cut -d: -f1
See who is online right now:
bash
w
Inspect one user more closely:
bash
id suspicious_user
If you do this regularly, it becomes a quick habit instead of a stressful “incident response” move. It also makes audits and compliance a lot less painful.
And if your VPS runs on a hosting platform that lets you rebuild quickly, switch locations, or bring up a fresh test server, you can practice all of this safely without touching production. That’s where a provider focused on instant, flexible servers really helps.
Viewing and understanding system users on an Ubuntu Linux VPS is mostly about a small set of simple commands—cat /etc/passwd, getent, cut, who, w, and id—and using them calmly in your daily routine. When you can see who exists on the system and who is logged in right now, you reduce surprises and keep your server more secure and predictable.
That’s exactly why GTHost is suitable for Ubuntu Linux VPS admins who want fast deployment and straightforward user management: you get instant servers, root access, and reliable performance, so these user‑management checks are always easy to run.