users command in Linux with Examples Last Updated : 10 Oct, 2024 Comments Improve Suggest changes Like Article Like Report users command in Linux system is used to show the user names of users currently logged in to the current host. It will display who is currently logged in according to FILE. If the FILE is not specified, use "/var/run/utmp". "/var/log/wtmp" as FILE is common. Syntaxusers [OPTION]... [FILE]where,OPTION: The specific option you wish to use (like --help or --version).FILE: The file from which to read the user information. If not specified, it defaults to "/var/run/utmp".Basic Exampleusers command without any option will print the users currently logged in. Common Options used with the users command1. Displaying Help InformationUse the --help option to show the help message, which lists all available options for the users command:users --helpThis command provides a summary of the options that can be used with users, along with a brief description of what each option does.2. Displaying the Version of usersTo check the version of the users command installed on your system, use the --version option.users --versionThis will display the version of the util-linux package, which includes the users command.ConclusionThe users command is a lightweight and straightforward utility in Linux that displays the usernames of logged-in users. By understanding its options and usage, you can monitor user activity and incorporate the command into scripts for system management. Whether you’re a system administrator tracking server activity or a Linux enthusiast exploring command-line utilities, mastering the users command adds another useful tool to your skillset. Comment More infoAdvertise with us R rahulkumarmandal Follow Improve Article Tags : Linux-Unix linux-command Linux-system-commands Similar Reads type command in Linux with Examples The type command in Linux is a useful utility for identifying how the shell will interpret a given command. It provides information on whether a command is a shell built-in, external binary, function, or alias, helping users understand the source of the command and its behavior. The command is parti 3 min read uname command in Linux with Examples Linux, renowned for its open-source flexibility and powerful performance, offers a range of commands that reveal the inner workings of your system. Among these, the 'uname' command stands out as a versatile tool that provides key details about your Linux machine. Here, we will learn the basics of th 4 min read unexpand command in Linux with Examples To convert the leading spaces and tabs into tabs, there exists a command line utility called unexpand command. The unexpand command by default converts each space into tabs writing the produced output to the standard output. Syntax $unexpand [OPTION]... [FILE]...where, OPTION: Represents the various 3 min read uniq Command in Linux with Examples The uniq command in Linux is a command-line utility that reports or filters out the repeated lines in a file. In simple words, uniq is the tool that helps to detect the adjacent duplicate lines and also deletes the duplicate lines. uniq filters out the adjacent matching lines from the input file(tha 7 min read until command in Linux with Examples until command in Linux is used to execute a set of commands as long as the final command in the 'until' Commands has an exit status that is not zero. It is mostly used where the user needs to execute a set of commands until a condition is true. Syntaxuntil COMMANDS; do COMMANDS; donewhere,CONDITION: 2 min read Linux | Uptime command with examples It is used to find out how long the system is active (running). This command returns set of values that involve, the current time, and the amount of time system is in running state, number of users currently logged into, and the load time for the past 1, 5 and 15 minutes respectively. Linux uptime S 5 min read How to add User in Linux | useradd Command useradd is a command in Linux that is used to add user accounts to your system. It is just a symbolic link to adduser command in Linux and the difference between both of them is that useradd is a native binary compiled with the system whereas adduser is a Perl script that uses useradd binary in the 5 min read usermod command in Linux with Examples usermod command or modify user is a command in Linux that is used to change the properties of a user in Linux through the command line. After creating a user we have to sometimes change their attributes like password or login directory etc. so in order to do that we use the Usermod command. The info 4 min read username Command in Linux With Examples Linux as an operating system holds the capabilities of handling multiple users each with a username and a display name (Full Name). So it is important to keep a check on the users and their related information in order to maintain the integrity and security of the system. Whenever a user is added it 4 min read users command in Linux with Examples users command in Linux system is used to show the user names of users currently logged in to the current host. It will display who is currently logged in according to FILE. If the FILE is not specified, use "/var/run/utmp". "/var/log/wtmp" as FILE is common. Syntaxusers [OPTION]... [FILE]where,OPTIO 2 min read Like