11
uptime

shows among others 4 users, should I be worried?

According to 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 to find which four users are "currently logged on"?

  • 4
    Is it enough for you to simply use the who command? – andrew.46 May 6 '16 at 7:46
  • @andrew.46 Thanks. It is a bit embarrassingly simple. In principle yes, if you could add some reasons why I appear 4 times on that list and what pts means, that would be a nice addition. – Bruni May 6 '16 at 7:49
  • I have created an answer and added the extra details :). – andrew.46 May 6 '16 at 8:13
16

The easiest method to find who is logged on to 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 once with the use of pts/0and pts/1 in place rather than 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 link from within the accepted answer:

18

All of these answers are excessively bloated. Three characters for a command? Please.

The fastest way to find who's logged on and doing what is:

$ w

  • I like how this shows the WHAT setting. – Tico May 6 '16 at 14:28
4

You can use the command users to see who is currently logged in. Take care.

1

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.

0
 $who -u

It displays the username, terminal number, loggin date-time and ip address

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.