• 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 2, 2024 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

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

Ubuntu 25.04 ‘Plucky Puffin’ Is Available To Download

How to Login as Root User in Linux Terminal

Install Firefox In Ubuntu Terminal Command Line

How To Check Kernel Installed Date In Linux Ubuntu

How To List All Kernel Modules That Are Loaded In Ubuntu

Enable Ubuntu Auto Login Without Password

Download Ubuntu 25.04 Official Default Wallpapers

How To Fix Initramfs Error In Ubuntu Command Line

How To Check All Available Kernel Version In Linux Ubuntu

3 Best Artificial Intelligence Domain Name Generators

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

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