last

Show login history

low risk

interactive breakdown — edit the command and press Explain
$ 
⚠ Risks & cautions
What it does

Reads /var/log/wtmp to show past logins, reboots and shutdowns.

Common flags
FlagMeaning
-nLimit number of entries
-xInclude shutdown/runlevel changes
-FFull timestamps
Examples
last -n 20Recent logins · explain & risk-check →
last rebootReboot history · explain & risk-check →
Related
lastb who w
Open the full explainer →More in System & Processes

Reference text is hand-written and may be incomplete — check man last for your version. Test destructive commands on a non-production system first.