How to View Linux Login History

Techwalla may earn compensation through affiliate links in this story. Learn more about our affiliate and product review process here.
Linux is a multi-user operating system.
Image Credit: DragonImages/iStock/Getty Images

Linux is a multi-user operating system, meaning that more than one person can be logged into a computer at the same time. To see the login history of all the computer's users, use the "last" command in the Linux terminal window. Variations of the "last" command can show you the history of one particular user, or the IP addresses of any computers used to log in from, provided the Linux system can be accessed by remote computers.


Step 1

Open the Linux terminal window. The terminal window can be found under the "System Tools," "Utilities" or "Accessories" section of the main menu depending on your distribution.

Video of the Day

Step 2

Type the "last" in the terminal window and press Enter to see the login history of all users.


Step 3

Type the command "last <username>" in the terminal window, replacing "<username>" with the username for a particular user.


Step 4

Type the command "last -a" to see the login history and the IP addresses of the computers used.

Step 5

Type "exit" and press the Enter key to close the terminal window.




Report an Issue

screenshot of the current page

Screenshot loading...