A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.geeksforgeeks.org/linux-unix/users-command-in-linux-with-examples/ below:

users command in Linux with Examples

users command in Linux with Examples

Last Updated : 10 Oct, 2024

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. 

Syntax
users [OPTION]... [FILE]

where,

Basic Example

users command without any option will print the users currently logged in. 

Common Options used with the users command 1. Displaying Help Information

Use the --help option to show the help message, which lists all available options for the users command:

users --help

This 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 users

To check the version of the users command installed on your system, use the --version option.

users --version

This will display the version of the util-linux package, which includes the users command.

Conclusion

The 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.



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4