Useful shell commands: last
Today I will start a new series for linux/*nix newbies called Useful shell commands. Every now and then I will write about one of the powerful commands you’ll find on your shell. I will start the series with a command called last.
# last
Calling last on your commandline gives you a list of logins. You will see who is still logged in and who was logged in before from what adress.
You can shorten the list of results with last -n XX. XX being the number of results you want to have displayed, e.g. last -n 5 for 5 lines.
# last reboot
Calling last reboot lists the reboots since the log file which tracks all logins was created.
The manual page for last – man last – will show you more parameters.
Don't miss a post with our RSS feed! Or get free updates by email.
Leave a Reply