uptime
shows among others 4 users, should I be worried?
According lớn man uptime
uptime gives a one line display of the following information. The current time, how long the system has been running, how many users are currently logged on, and the system load averages for the past 1, 5, and 15 minutes.
Is there a way lớn find which four users are "currently logged on"?
asked May 6, năm nhâm thìn at 7:42
BruniBruni
10.8k8 gold badges62 silver badges105 bronze badges
The easiest method lớn find who is logged on lớn your system is the use the who
command, a part of the gnu coreutils package. It can be used as an ordinary user with no options or with my own favored option which enhances readability:
andrew@ilium~$ who -H
NAME LINE TIME COMMENT
andrew tty1 2016-05-06 07:34
andrew@ilium~$
At times you may see yourself or other users apparently logged in more than thở once with the use of pts/0
and pts/1
in place rather than thở tty1
, This indicates a 'Pseudo Terminal Slave' (= pts) and simply shows that you or another user have opened an application such as xterm
, sshd
or similar process that creates a pseudoterminal master and slave pairing.
More information concerning pts
in the referenced AskUbuntu thread, and the man page liên kết from within the accepted answer:
- AskUbuntu: What does “pts/” in the output of w mean?
- pts(4) - Linux man page
answered May 6, năm nhâm thìn at 8:07
andrew.46♦andrew.46
38.8k28 gold badges160 silver badges237 bronze badges
All of these answers are excessively bloated. Three characters for a command? Please.
The fastest way lớn find who's logged on and doing what is:
$ w
answered May 6, năm nhâm thìn at 9:34
pipepipe
6724 silver badges11 bronze badges
2
You can use the command users
lớn see who is currently logged in.
Take care.
terdon
103k15 gold badges204 silver badges305 bronze badges
answered May 6, năm nhâm thìn at 7:52
who -u
It displays the username, terminal number, login date-time and IP address.
Kulfy
18k26 gold badges70 silver badges108 bronze badges
answered Aug 2, 2017 at 8:01
BiranchiBiranchi
1791 silver badge3 bronze badges
Using who
will tell you who's logged in. You can also use ps au
and it will show who's logged in and what they are running.
Kulfy
18k26 gold badges70 silver badges108 bronze badges
answered May 6, năm nhâm thìn at 8:11
With this command in terminal:
whoami
answered Aug 11, 2020 at 14:56
1
You must log in lớn answer this question.
Not the answer you're looking for? Browse other questions tagged
.
Not the answer you're looking for? Browse other questions tagged
.