1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2024-10-31 06:18:17 +01:00
tldr/pages/common/last.md

646 B

last

View the last logged in users.

  • View last logins, their duration and other information as read from /var/log/wtmp:

last

  • Specify how many of the last logins to show:

last -n {{login_count}}

  • Print the full date and time for entries and then display the hostname column last to prevent truncation:

last -F -a

  • View all logins by a specific user and show the ip address instead of the hostname:

last {{user_name}} -i

  • View all recorded reboots (i.e., the last logins of the pseudo user "reboot"):

last reboot

  • View all recorded shutdowns (i.e., the last logins of the pseudo user "shutdown"):

last shutdown