What command can I use in terminal to see login history? I think it's possible someone created a hidden account or booted the machine in safe mode.
Asked
Active
Viewed 1.2e+01k times
3 Answers
24
Checked on Mac OS Mojave 10.14.5
sudo log show --style syslog --last 1d | awk '/Enter/ && /unlockUIBecomesActive/ {print $1 " " $2}'
1d - is a shortcut for a period back in time
DarkSatyr
- 341
10
Here is how I did it.
To see your login history on your Mac:
- Open the "Terminal" app
- Type the word
lastfollowed by your username. For example,last johnsmith. - A list of login activity for your user account will appear in reverse chronological order.
For folks unfamiliar with Terminal:
To open, you can quickly find it in the Spotlight Search (hourglass search icon at top-right of screen).
The process I described worked today for me. I am using OS X Yosemite (10.10.5). I haven't tested it with other Mac operating systems.
Shawn Geddes
- 101
- 1
- 2