Skip to main content
Blog

The macOS Command Line Tools Every Apple Admin Should Know

  • September 10, 2026
  • 0 replies
  • 240 views

mattjerome
Forum|alt.badge.img+14

Let me bring you back to a version of me circa 2012–2015.

I had been laid off from my job in a non-technical field. I wasn't in tech or IT at all, but I was a tech hobbyist. I'm sitting at home in my apartment looking at social media—what we would now call doomscrolling—and I come across a post looking for people interested in starting their own business fixing iPhones and iPads in their area.

The hobbyist in me was very interested.

That eventually led to me starting a small IT company where my bread and butter was fixing broken iPhone and iPad screens.

My wife and I had just gotten married, and we moved out to the San Francisco Bay Area. Being in the heart of Silicon Valley, there was no shortage of broken iPhones and iPads (and eventually Samsung devices) to fix. But I could see a future where fixing five to eight phones a day would get tedious, and more importantly, wouldn't really scale financially.

So I started the multi-year process of shutting down my company and focusing my career on the Mac.

I could navigate the UI of our dear old Mac OS X just fine, but I was not comfortable in Terminal at all. I knew that if I was going to be successful working with Macs professionally, I needed to understand more of the command line side of the Apple ecosystem.

The tech world must have been listening.

I was invited to a local one-day workshop here in the Bay Area, and one of the sessions was about useful command-line binaries. I started keeping a list of those binaries in 2015.

But lately, I noticed something: I hadn't looked at that list in a long time.

So a few months ago, I started paying attention to the command-line tools I actually use today.Since I didn't have any kind of list like this until attending that workshop, I thought I'd pass one along. Here are some commands for new—and not-so-new—Apple admins that will hopefully give you a leg up.

These are in no particular order. Except when they are. You'll know.

man

Opens the manual page for a command.

This is incredibly useful when the command you're working with has a lot of different options. This should always be one of your first stops when exploring a new command.

As an added bonus, a man page will sometimes tell you that the command you're trying to use has been deprecated and point you toward what you should be using instead.

sw_vers

Displays the macOS product name, product version, and build version.

It's simple information, but incredibly useful when you're trying to determine whether a problem is specific to a particular version or build of macOS.

Pair it with:

sysctl -n hw.model

Now you have the Mac model and exact OS version. If you're investigating an issue across multiple Macs, those two pieces of information can help you find commonalities between hardware and OS versions.

login

Allows you to start a login session as another user from Terminal.

This can be useful when troubleshooting something that behaves differently depending on the user context you're operating in. Just remember that changing user context and elevating privileges with something like sudo are two different things.

system_profiler

This gives you command-line access to much of the information you would normally find under About This Mac → General in System Settings → System Report.

It supports different data types and detail levels and can output data in formats including JSON and XML.

Combine it with tools like grep, awk, sed, etc., and you can pull out very specific pieces of information.

Finding exactly what you want can sometimes be tricky, so play around with this one. Once you know how to extract the data you need, system_profiler can become incredibly useful in scripts and Jamf Pro Extension Attributes.

mdfind

Uses the Spotlight index to search for files and other metadata.

Think of it as taking advantage of the work Spotlight has already done instead of crawling through the filesystem yourself.

plutil

Reads, validates, converts, and modifies property list files from Terminal.

Very useful for deciphering preference files and working with plist data in scripts. An unsung hero here is the -lint attribute which checks a plist for any syntax errors.

defaults

Reads and writes macOS user defaults and preferences.

This can be incredibly useful for working with application preferences, but don't confuse changing a local preference with changing a preference being enforced through device management. If a setting is being managed, it can’t be changed with the defaults command, only read.

profiles

Provides information about configuration profiles and device-management enrollment.

One particularly useful command for Mac admins is:

sudo profiles renew -type enrollment

This can reinitiate the Automated Device Enrollment workflow.

There's a lot more hiding inside profiles, though, particularly when you're troubleshooting whether a Mac is actually enrolled and managed the way you expect it to be.

sfltool

More specifically:

sfltool dumpbtm

This prints information about login items, background tasks, and Service Management items, including things like UUIDs, paths, and bundle identifiers.

It's especially useful when you're trying to identify the information needed to create management profiles for background items and suppress unnecessary notifications for your users.

app-sso

I'd be neglectful if I didn't mention one of the newer additions to my toolbox: app-sso.

This command provides a wide variety of information related to Apple's Enterprise SSO and Platform Single Sign-On functionality.

If you're deploying Platform SSO, there's a particularly useful command worth remembering:

app-sso platform -s

When something isn't behaving the way you expect, this is a great place to start.

The binary is only the beginning

This list intentionally focuses on the binaries themselves.

Running the binary alone often won't get you very far. The real power comes from learning the options and arguments available to you.

That's why the first command on this list was man.

Once you start combining these tools, they become even more powerful. system_profiler output gets filtered through grep or outputted to a json file and then read a different way. A value from a plist gets extracted with plutil. Information about a Mac gets collected and returned through a Jamf Pro Extension Attribute.

Eventually, you're not just running commands anymore. You're building workflows.

And there's one last command-line tool I'd add to the toolbox. It's my newest favorite, and unlike everything else on this list, it isn't built into macOS.

jamf-cli

Since it came out, the Jamf CLI in conjunction with many of these built-in macOS tools has leveled up my game as a Jamf Admin.

The macOS binaries give you information about the Mac in front of you. Jamf CLI gives you another way to interact with the Jamf platform around it.

Start combining the two, and some really interesting possibilities open up.

If you're a new Apple admin, don't feel like you need to memorize every command, option, or argument. I certainly didn't.

Start with the tools you need to solve the problem in front of you. Read the man page. Experiment. Break your command. Fix it. Pipe its output into something else. Turn it into a script. Eventually, you'll build your own toolbox.

That's how I built mine.

And apparently, I've been adding to it since 2015. Share your favorite tools in your toolbox in the comments so we can all use them!