nixCraft 🐧 on Nostr: Want to to see the last time that you or given user logged in, use lastlogin command ...
Want to to see the last time that you or given user logged in, use lastlogin command on your #Linux, or #FreeBSD or #Unix like oses:
# macos/freebsd
lastlogin
lastlogin user
# Linux
lastlog
lastlog -u user
This will tell you last reboot/shutdown time:
last -x
last -x reboot
The syntax varies between Unix variant so do check man page or read the following
→ https://www.cyberciti.biz/faq/unix-linux-check-last-time-user-loggedin-command/
→ https://www.cyberciti.biz/faq/howto-display-clear-last-login-information/
# macos/freebsd
lastlogin
lastlogin user
# Linux
lastlog
lastlog -u user
This will tell you last reboot/shutdown time:
last -x
last -x reboot
The syntax varies between Unix variant so do check man page or read the following
→ https://www.cyberciti.biz/faq/unix-linux-check-last-time-user-loggedin-command/
→ https://www.cyberciti.biz/faq/howto-display-clear-last-login-information/