Howtodojo logo
  • Home 
  • About 
  • Certifications 
  • Sample Database 
  • Cheatsheet 
  • Glossary 
  • Blog 
  • Tags 
  1.   Linux Commands
  1. Home
  2. Guides
  3. Linux Commands
  4. Linux users Command

Linux users Command

Share via
Howtodojo
Link copied to clipboard

How to show the current user in Linux? we can use users command in Linux that will provide the information written in utmp file.

On this page
What is Linux users Command?   users Syntax   Using users command in Linux   Manual Page / Info Page of users Command   Linux users Command Source Code   Related Linux Commands   Summary  

What is Linux users Command?  

In this tutorial we learn how to use users command in Linux. users command print the user names of users currently logged in to the current host.

users Syntax  

users [OPTION]... [FILE]

Using users command in Linux  

We can pass a file to be read by users command. By default users command will read file /var/run/utmp

users
vagrant

We can also pass the utmp file to users command and the output will be the same.

users /var/run/utmp
vagrant

Manual Page / Info Page of users Command  

We can use man and info command to see the manual page of users command.

users command also have --help option to show list of options.

man page of the users’ command can be opened using the command below. To exit the man or info page you can press q.

man users

info page for users command can be opened using the command below.

info users

To open help page from users command we can run command below.

users --help

Linux users Command Source Code  

You can find users command source code from the folowing repositories:

  • [GitHub] GNU Coreutils users command source code
  • users source code on GNU Savannah cgit
  • [GNU Savannah gitweb] users command source code on

Related Linux Commands  

You can read tutorials of related Linux commands below:

  • groups command in Linux
  • logname command in Linux
  • who command in Linux
  • id command in Linux

Summary  

In this tutorial we learn how to use users in Linux with practical examples. Visit our Linux Commands guide to learn more about using command line interface in Linux.

 Linux sleep Command
Linux true Command 
On this page:
What is Linux users Command?   users Syntax   Using users command in Linux   Manual Page / Info Page of users Command   Linux users Command Source Code   Related Linux Commands   Summary  
Follow me

We publish tutorials, tips and tricks about Linux, open source, cloud computing, and infrastructure

     
Copyright © 2012 - 2025 howtodojo.com. |
Howtodojo
Code copied to clipboard