• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
Source Digit

Source Digit

Linux, Ubuntu Tutorials & News, Technology, Gadgets & Gizmos

  • Home
  • How To
  • Ubuntu
  • Instagram
  • Blogging
  • Android
  • WordPress
  • +More
    • Cloud Computing
    • Gadgets
    • Social Media
    • Technology
  • Write for Us
Home / How To / Check How Many Users Are Created In Linux Ubuntu

Check How Many Users Are Created In Linux Ubuntu

By Sourabh / September 23, 2026 Category: How To, Ubuntu

This post explains how to check what users are in Linux. One can easily check user details in Linux System to know how many users are created in the System.

Check user details in Linux

You can check user details in Linux using who command. ‘who’ prints information about users who are currently logged on. If you want to see who is currently logged in, use who command.

When no command option is given, ‘who’ prints the following information for each user currently logged on:

  1. login name
  2. terminal line
  3. login time
  4. remote hostname or X display

How to use who command?

You can use the following who commands to get the list of users on your system: who | wc -l who | cut -d “” -f 1 who | cut -d “” -f 1 | sort -u

Here the ‘cut’ command is used to write to standard output selected parts of each line of each
input file, or standard input if no files are given or for a file name of ‘-’.

In simple words you can use the cut command to exclude all information except for the user name.

If you want to sort the names alphabetically, you can use the following command (also listed above): who | cut -d “” -f 1 | sort -u

And if you wish to count the number of unique users, add wc -l at the end of the command as shown below: who | cut -d “” -f 1 | sort -u | wc -l

If you want to get a list of regular human users only, you can use the getnet passwd command using the following command arguments:

getent passwd | awk -F: '$3 >= 1000 && $3 <= 60000 {count++} END {print count}'

Similarly, if you want to see the actual names of the regular users alongside the count, you can use the lslogins tool using the following command:

lslogins -u

Get a List of All Users

If you want to get a list of all users you can use the command /etc/passwd file. Note that when you get the result, each line represents login information for one user.

Primary Sidebar

Latest Posts

Using Linux Terminal How To Get Total Disk Size In GB

Count And Find Number Of Files In A Linux Directory Using Command

How To Check User Permissions In Linux Using Command

Check Which Folder Is Taking More Space In Ubuntu Linux

How to Install Claude Desktop App in Ubuntu Linux

Job Scheduling Using At Command In Linux With Examples

How To Check Permissions Of A Directory In Linux Command

Delete Directory And Contents Recursively Without Prompt On Linux

Check User Login History In Ubuntu Linux Command Line

Use Locate Command To Find File In Linux Terminal By Name

© 2026 Source Digit • Linux, Ubuntu Tutorials & News, Technology, Gadgets & Gizmos

  • Home
  • About
  • Privacy Policy
  • Terms & Conditions
  • Contact Us
  • Sitemap