48

When I ran the uptime on my MacBookPro machine I got the following result:

Last login: Thu Jun  3 14:43:40 on ttys000
Osama-Gamal-MBP-2:~ iOsama$ uptime
14:49  up 7 days, 20:10, 2 users, load averages: 0.29 0.24 0.24

Why it lists that there are two users? is it normal? and who is the other user, is it the root user or what?

PS: I'm using Mac OS X 10.6.3 Edit: w command output:

Osama-Gamal-MBP-2:~ iOsama$ w
 0:41  up 8 days,  6:03, 2 users, load averages: 1.92 1.81 1.38
USER     TTY      FROM              LOGIN@  IDLE WHAT
iOsama   console  -                26May10 8days -
iOsama   s000     -                 0:13       - w

who command output:

Osama-Gamal-MBP-2:~ iOsama$ who
iOsama   console  May 26 18:40 
iOsama   ttys000  Jun  4 00:13 
3
  • 1
    Can you post the output of who ?
    – Dentrasi
    Jun 3, 2010 at 12:06
  • And/or last..? Jun 3, 2010 at 12:07
  • added to the question Jun 3, 2010 at 21:42

3 Answers 3

57

Try the w command. On my system I have the following:

# w
 02:16:53 up  6:48,  2 users,  load average: 0.50, 0.42, 0.52
USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU WHAT
pcm      tty7     :0               19:28    6:48m 16:07   0.17s gnome-session
pcm      pts/0    :0.0             01:51    0.00s  0.36s  0.76s gnome-terminal
# uptime
 02:16:56 up  6:48,  2 users,  load average: 0.50, 0.42, 0.52

tty7 is your desktop login, pts/0 is a pseudo terminal ... probably what was used to type uptime in.

Why it lists that there are two users?

Because it shows every logged in session. A single user can have multiple active sessions at any one time.

is it normal?

100% normal ... A-OK

and who is the other user, is it the root user or what?

The other user is yourself. You have multiple sessions running. You can see in your output from your question, that the user name is the same for both sessions.

6
  • Added to the question Jun 3, 2010 at 21:43
  • Is something missing from this answer?
    – cmcginty
    Jun 4, 2010 at 0:02
  • 3
    I have multiple Terminal.App windows open on my workstation. uptime says there are 8 users on my system, but each of them is tied to one of my Terminal sessions : 17:08 up 8:42, 8 users, load averages: 0.68 0.60 0.58 Jun 4, 2010 at 0:09
  • Nope nothing missing .. seems that Stefan said .. it is linked with the number of terminals .. I opened multiple terminal tabs and checked the uptime found out 5 users!! Jun 4, 2010 at 0:31
  • 1
    "Stefan said" ... ?? uh ya, that is exactly what is in the answer
    – cmcginty
    Jun 4, 2010 at 5:54
1

I have just figured it out! I don't know whether it'll work for you or not. But I did the following steps:

  1. Pressed ctrl+alt+f1 and got terminal emulator on my linux mint 20.1 (Cinnamon)
  2. Typed exit and hit enter
  3. Opened Terminal; typed uptime and hit enter Now, it was showing me 1 user instead of 2. Hope it helps.
0

Each Terminal window or tab adds an additional user to what uptime reports. So, I'm guessing that one of those users is for your current Terminal session, and the other is for your macOS.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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