2016-01-02 03:09:44 +02:00
|
|
|
# last
|
2015-12-31 00:46:40 +02:00
|
|
|
|
2016-01-07 18:31:27 +01:00
|
|
|
> View the last logged in users.
|
2015-12-31 00:46:40 +02:00
|
|
|
|
2021-01-31 14:05:18 -03:00
|
|
|
- View last logins, their duration and other information as read from `/var/log/wtmp`:
|
2015-12-31 00:46:40 +02:00
|
|
|
|
|
|
|
`last`
|
|
|
|
|
2016-01-07 18:31:27 +01:00
|
|
|
- Specify how many of the last logins to show:
|
2015-12-31 00:46:40 +02:00
|
|
|
|
|
|
|
`last -n {{login_count}}`
|
|
|
|
|
2017-10-17 00:30:41 -06:00
|
|
|
- Print the full date and time for entries and then display the hostname column last to prevent truncation:
|
2015-12-31 00:46:40 +02:00
|
|
|
|
2017-10-17 00:30:41 -06:00
|
|
|
`last -F -a`
|
2015-12-31 00:46:40 +02:00
|
|
|
|
2017-10-17 00:30:41 -06:00
|
|
|
- View all logins by a specific user and show the ip address instead of the hostname:
|
2015-12-31 00:46:40 +02:00
|
|
|
|
2020-02-08 15:56:05 -03:00
|
|
|
`last {{username}} -i`
|
2015-12-31 00:46:40 +02:00
|
|
|
|
2017-10-17 00:30:41 -06:00
|
|
|
- View all recorded reboots (i.e., the last logins of the pseudo user "reboot"):
|
2015-12-31 00:46:40 +02:00
|
|
|
|
|
|
|
`last reboot`
|
|
|
|
|
2017-10-17 00:30:41 -06:00
|
|
|
- View all recorded shutdowns (i.e., the last logins of the pseudo user "shutdown"):
|
2015-12-31 00:46:40 +02:00
|
|
|
|
|
|
|
`last shutdown`
|