You can see who
’s logged in to the machine right now using the who
command, as shown in Example 12-11.
The console
entry is the GUI shell that you are logged into. The ttyp
entries are created by active Terminal windows.
The w
command outputs a different format of this information, as shown in Example 12-12.
As well as listing the users logged into the system, the w
command gives the system uptime and load averages on the CPU.
You can see who has been logged into the system (as well as see when the system has been rebooted) by using the last
command, as shown in Example 12-13.
Example 12-13. Using the last command
$ last
panic ttyp3 localhost Sat Jun 11 15:27 still logged in
jldera ttyp2 Sat Jun 11 15:26 still logged in
jldera ttyp2 Sat Jun 11 15:26 - 15:26 (00:00)
panic console ronin.local Sat Jun 11 15:25 still logged in
jldera ttyp1 Sat Jun 11 15:04 still logged in
jldera ttyp1 Sat Jun 11 15:04 - 15:04 (00:00)
panic console ronin.local Sat Jun 11 13:58 - 14:04 (00:06)
jldera console ronin.local Sat Jun 11 12:28 - 13:58 (01:30)
reboot ~ Sat Jun 11 12:21