#oEmbed (JSON) oEmbed (XML) IFRAME: about:blank Skip to content Linux TLDR (BUTTON) Menu ____________________ (BUTTON) Menu * ๐Ÿ  Home * ๐Ÿง Topic + All in One + DevOps o Ansible o AWS o Docker o Git o Jenkins o Kubernetes + Hardware o Raspberry Pi + How to + Linux Commands o Builtin Commands o Curl Commands o Homebrew Commands o MySQL Commands o SSH Commands + Linux Distributions o Alma Linux o Debian o Fedora o Kali Linux o Linux Mint o Manjaro o Red Hat o Ubuntu + News & Updates + Package Installer + Programming o Bash Scripting o C/C++ o Go Lang o Java o Javascript o Node Js o Php o Python o Ruby + Reviews + Tools + Troubleshooting + Tutorials + Weekly Roundup + What is * ๐Ÿ•ต๏ธ Privacy Policy * ๐Ÿ“ง Contact Us * ๐Ÿ“– About + ๐Ÿชถ Write an Article + ๐Ÿ”— Follow Us + ๐ŸŽ Donate Beginners Guide for Who Command in Linux Linux TLDR Last Updated: December 19, 2025 No Comments Reading time: 3 minutes The who command is a built-in Linux utility that shows a list of users who are currently logged on to the Linux system. In this article, you will learn how to use this command and what options it has to offer (with practical examples). Table of Contents Toggle * Tutorial Details * Usage of the Who Command * Who Command Options + Display the Output with Header + Display the Output in Verbose Mode + Display the Time of the Last System Boot + Display the Users Idle Time + Display the Dead Processes + Display the Active Processes Spawned by Init + Display the Total Number of Logged-In Users with their Name + Display the Users Terminal Status + Display the Users Login Processes + Display the Current Runlevel + Display the User-Associated Information with the Current Terminal * Historical Data of the Users Tutorial Details Description Who Difficulty Level Low Root or Sudo Privileges No OS Compatibility Ubuntu, Manjaro, Fedora, etc. Prerequisites who Internet Required No Usage of the Who Command The who command takes two arguments: one is the option, and the other is the file. $ who [OPTION] [FILE] If the file field is left empty, then the who command will pull the user related information from the โ€œ/var/run/utmpโ€ file. The following is the output when this command is executed without any options: $ who Output: who command output The above output contains four fields, followed by * The name of the logged-in user. * The userโ€™s terminal. * The time when the user logged in. * Host name or IP address from where the user logged-in. So far, weโ€™ve seen what the output is when no options are specified; now letโ€™s see what the options have to offer. Who Command Options The who command provides various options that can change the output based on the specified options, so letโ€™s start with the Display the Output with Header The โ€œ-Hโ€ flag will display the header for each column in the output. $ who -H Output: who command with header output Display the Output in Verbose Mode The โ€œ-aโ€ flag will display the output with additional information that includes the info provided by the โ€œ-bโ€œ, โ€œ-dโ€œ, โ€œ-lโ€œ, โ€œ-pโ€œ, โ€œ-rโ€œ, โ€œ-tโ€œ, โ€œ-Tโ€œ, and โ€œ-uโ€ options. $ who -a Output: who command output in verbose mode This way, you can get all the information instead of specifying each option separately. Display the Time of the Last System Boot The โ€œ-bโ€ flag will show the time of the last system boot in standard format. $ who -b Output: who command output with last system boot time Display the Users Idle Time The โ€œ-uโ€ flag will show the userโ€™s idle time, which is basically the last time the user interacted with the terminal. $ who -u Output: who command output with users idle time As you can see from the above picture, the โ€œlinuxtldrโ€ user has been idle for 6 minutes and 16 seconds. Display the Dead Processes The โ€œ-dโ€ flag will list all the dead processes under the referenced username. $ who -d Output: who command output with dead processes Display the Active Processes Spawned by Init The โ€œ-pโ€ flag will show a list of all the processes spawned by the init. $ who -p Output: who command output with processes spawned by init Display the Total Number of Logged-In Users with their Name The โ€œ-qโ€ flag will show the name of all the logged-in users to the system, including their count. $ who -q Output: Display the all the logged-in users Display the Users Terminal Status The โ€œ-Tโ€ flag will show you the terminal status next to each username; it defines whether the userโ€™s terminal has permission for writing messages or not. * How to Check, Allow, or Disallow Terminal Write Access in Linux $ who -T Output: who command output with user terminal status The following is the list of all the possible permissions: * โ€œ+โ€ โ€“ The terminal is writable. * โ€œ-โ€ โ€“ The terminal is not writable. * โ€œ?โ€ โ€“ Bad line encountered. Display the Users Login Processes The โ€œ-lโ€ flag will show the user login processes, or it can be stated as a list of the available terminals. $ who -l Output: who command output with login processes Display the Current Runlevel The โ€œ-rโ€ flag can be used to check the current runlevel of the system. $ who -r Output: Print the current runlevel of the system Display the User-Associated Information with the Current Terminal The โ€œ-mโ€ flag will only show user related information that is associated with the current terminal (or stdin). $ who -m Output: show the user information associated with the active terminal Historical Data of the Users As Iโ€™ve stated earlier, this command utilizes the โ€œutmpโ€ file to give the user information, but another file with the name โ€œwtmpโ€ keeps the historical data of the โ€œutmpโ€ file. You can read this file using the who command to get information about the past logins. $ who /var/log/wtmp Output: Historical data for logged-in users Identical to this, the โ€œbtmpโ€ file keeps the record of failed logins. $ who /var/log/btmp Output: Historical data of failed login So, here comes the end of this article. If you have any questions or queries related to this topic, then feel free to ask them in the comment section. Till then, peace! SHARE: Recommended Articles ๐Ÿ”—How to Install Zabbix Server on Ubuntu 24.04 (Noble Numbat) ๐Ÿ”—Stellar Repair for MySQL โ€“ Product Review ๐Ÿ”—How to Install RQuickShare (NearbyShare/QuickShare) on Linux ๐Ÿ”—How to Install RabbitMQ Server on Linux (Quick Guide) ๐Ÿ”—How to Use Chattr Command in Linux (for Beginners) ๐Ÿ”—How to Setup SOCKS5 Proxy Server on Linux Using MicroSocks ๐Ÿ”—Reset the WordPress Admin Password Using CLI (via 2 Methods) ๐Ÿ”—How to Check Python Version in Linux (via 3 Methods) ๐Ÿ”—How to Check PHP Version in Linux (via 4 Methods) ๐Ÿ”—[Fixed] pkg-config script could not be found in Linux Join The Conversation Users are always welcome to leave comments about the articles, whether they are questions, comments, constructive criticism, old information, or notices of typos. Please keep in mind that all comments are moderated according to our comment policy. Cancel reply Comment _____________________________________________ _____________________________________________ _____________________________________________ _____________________________________________ _____________________________________________ _____________________________________________ _____________________________________________ _____________________________________________ Name ______________________________ Email ______________________________ [ ] Save my name, email, and website in this browser for the next time I comment. [Don't subscribe_______] Notify me of followup comments via e-mail. You can also subscribe without commenting. Post Comment Latest Install zabbix server on ubuntu How to Install Zabbix Server on Ubuntu 24.04 (Noble Numbat) mysql database recovery tool Stellar Repair for MySQL โ€“ Product Review RQuickShare Linux How to Install RQuickShare (NearbyShare/QuickShare) on Linux Install RabbitMQ Server on Linux How to Install RabbitMQ Server on Linux (Quick Guide) chattr command How to Use Chattr Command in Linux (for Beginners) Newsletter Explore the latest Linux news, tutorials, tips, and resources to master open-source technology. Social Handles Your help is needed AI and ad blockers are significantly impacting advertising revenue. Donate now to support funding for this independent site. ๐ŸŽ Make a Donation Linux TLDR ยฉ 2025 - Discover, Learn, and Master Linux with Us ๐Ÿง x