Forrest logo
back to the last tool

last:tldr:9c50f

last: Print the full date and time for entries and then display the hostname column last to prevent truncation.
$ last -F -a
try on your machine

The command "last -F -a" is used to display a list of all previous logins and logouts on a Unix-like system.

Here is the breakdown of the options used in this command:

  • "last" is the command itself, which is used to access the login records file (/var/log/wtmp or /var/log/utmp) and display the login history.

  • "-F" is an option that instructs the command to display the time and date in a more human-readable format. It converts the timestamp to a more familiar format instead of displaying it as a Unix epoch.

  • "-a" is another option that shows all the information. By default, the command only displays the most recent login history, but the "-a" option makes it show the complete login history, including all users' logins and logouts.

So, when you run the command "last -F -a", it will list the login/out history of all users on the system, showing the timestamp, username, terminal or IP address, duration of the session, and more.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the last tool