• 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 / How To Check How Many Users Are Created In Linux

How To Check How Many Users Are Created In Linux

By Sourabh / November 7, 2023 Category: How To, Ubuntu

How to check how many users are created in Linux. Here is an easy way to check current user in Linux and check user details in Linux.

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

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

Downlaod Ubuntu 26.10 Stonking Stingray

How To Shutdown Linux With A 15 Minute Delay And Message

Using Linux Terminal How To Get Total Disk Size In GB

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

Check How Many Users Are Created In Linux Ubuntu

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

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

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