![Forrest logo](/images/logo.png)
last:tldr:9c50f
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.