Computer Science, asked by ATULYA6739, 10 months ago

Which command lists all the users currently wirking on the ?

Answers

Answered by bsainathreddy4
0

Answer:

hi

Explanation:

Linux / Unix: who Command Examples To List Users on The Systems

last updated January 27, 2014 in CategoriesCommands, Linux, UNIX

who command

Iam a new Linux and Unix system user. How do I display who is logged on my Linux or Unix-like operating system using shell prompt?

You need to use who command to display users who are currently logged in your server.[donotprint]

who command details

Description Find who is on the system

Category User Information

Difficulty Easy

Root privileges No

Estimated completion time 5m

Contents

» Syntax

» Examples

» Show list of user logged in

» Find time of last boot

» List dead processes

» List login processes

» Count all login names

» Show current runlevel

» Show all info about logged on users

» Options

» Video

» See also

[/donotprint] This command is useful to find out the following information:

 

Time of last system boot.

Current run level.

List of logged in users and more.

Purpose

Display who is on the system.

Syntax

The basic syntax is as follows:

who

who am i

who [options] [File]

who --help

who --version

who | grep 'userNameHere'

Where,

If no non-options provided, who displays the following information for each user currently logged on:

login name

terminal line

login time

remote hostname or X display

If you give one non-option argument, who uses that instead of a default system-maintained file such s /var/run/utmp as the name of the file containing the record of users logged on.

If given two non-option arguments, who prints only the entry for the user running it preceded by the hostname. Traditionally, the two arguments given are ‘am i’, as in ‘who am i’.

who command examples

To show a list of all the users currently logged in to the system, type:

$ who

Sample outputs:

Fig. 01: Identifying who is logged on your server

Fig. 01: Identifying who is logged on your server

The sample output in this example shows that the user vivek is logged in on pts/0, and has been on since 14:10 on 27 January. To display line of column headings pass the -H option:

$ who -H

To show only hostname and user associated with stdin (usually keyboard), enter:

$ who -m

To show active processes spawned by init:

$ who -p

To show user’s message status as +, – or ?, enter:

$ who -T

Show or list users logged in

Type the command:

$ who -u

Show time of last system boot

To display time of last system boot pass the -b option to who command:

$ who -b

who command options

Option Description

-a Same as -b -d –login -p -r -t -T -u

-b Time of last system boot

-d Print dead processes

-H Print line of column headings

-l Print system login processes

-m Only hostname and user associated with stdin

-p Print active processes spawned by init

-q All login names and number of users logged on

-r Print current runlevel

-t Print last system clock change

-T Add user’s message status as +, – or ?

-u List users logged in

Similar questions