Permissions · Sudo Activity

Check sudo history on your Mac

Every command run with sudo runs with full administrator rights, and macOS records each one in its system log. Tidy My Mac's Sudo Activity page reads the last 30 days of that log and shows which commands were run with sudo, and when, without you having to dig through log show in Terminal.

macOS 26 Tahoe or later · No credit card · Everything runs on your Mac

What sudo is, and why its history matters

sudo lets an administrator run a single command as the root user, the account that can change anything on the Mac outside System Integrity Protection. You type it yourself in Terminal, and setup scripts and developer tools often run it after asking for your password.

That makes the sudo history a useful record. If you didn't run any admin commands this month and the list isn't empty, something else did, perhaps a script you pasted from a web page, or an installer that did more than it said. If you did, it is a quick way to remember what a setup script changed.

How to check sudo history on a Mac

macOS doesn't keep a sudo history file of its own. Each use is written to the unified system log, and you can search it in Terminal with:

log show --predicate 'process == "sudo"' --last 30d

The output is long and mixes in other messages from sudo. Sudo Activity runs that same search for you and picks out the lines that record a command, then shows each one with its date and the full command that was run, such as /usr/bin/whoami or an installer's script. The ten most recent entries are shown, newest first. If the log has no sudo commands in the last 30 days, the page says so.

When the log can't be read

An empty list and an unreadable log are not the same thing, and the page keeps them apart. If macOS refuses or fails to read the log, Sudo Activity says Sudo history unavailable with the reason, rather than reporting that there was no activity.

What it doesn't cover

Sudo Activity shows commands run through sudo. It doesn't list the times you typed your password into a macOS dialog to approve an installer or a change in System Settings, which macOS handles without sudo. For a picture of what has the deepest access to your Mac, look at Privacy Access for apps with Full Disk Access or Accessibility, and at Startup Items for what starts at login.

Read on your Mac

The system log is already on your Mac; Sudo Activity only reads it. Nothing from it is uploaded or sent to us, as the Privacy Policy describes.

Questions about Sudo Activity

In the unified system log, not in a separate file. You can search it with log show --predicate 'process == "sudo"' in Terminal, or open Sudo Activity in Tidy My Mac to see the last 30 days in a list.

30 days. Older entries may also have been removed by macOS, which rotates its log to save space.

Look at the command first: setup scripts and developer tools often run sudo after you enter your password. If you can't account for one, run a scan with the Antivirus, review Startup Items, and change your administrator password.

Try every section free for 7 days.

Just your email, no credit card. Then $19.99 for your first year, $59.99 a year after that.

Start your free trial