Linux Commands Reference - Complete Linux Command Guide

Comprehensive Linux command reference with 150+ commands. Search, filter by category, and view detailed usage examples.

Share
Back to commands

last

Show recent user login records

Syntax

last [OPTION]... [USERNAME]...

Common Options

-nShow last N entries
-fSpecify log file
-aShow hostname in last column
-dTranslate IP to hostname
-iShow IP addresses
-xShow system shutdown entries
-wShow full usernames
-sShow since time

Common Examples

last

Show all login records

last -n 10

Show last 10 entries

last username

Show user's records

last -x

Show shutdown entries

last -a -n 20

With hostname, last 20

last -s yesterday

Show since yesterday

Related Commands

Related Tools

More Code & Dev Tools