9to5Mac Security Bite is exclusively brought to you by Mosyle, the only Apple Unified Platform. Making Apple devices work-ready and enterprise-safe is all we do. Our unique integrated approach to management and security combines state-of-the-art Apple-specific security solutions for fully automated Hardening & Compliance, Next Generation EDR, AI-powered Zero Trust, and exclusive Privilege Management with the most powerful and modern Apple MDM on the market. The result is a totally automated Apple Unified Platform currently trusted by over 45,000 organizations to make millions of Apple devices work-ready with no effort and at an affordable cost. Request your EXTENDED TRIAL today and understand why Mosyle is everything you need to work with Apple.
You can stop holding your breath. Down the rabbit hole of neat, lesser-known Terminal commands is back! ICYMI, I’ve recently found myself fascinated by all the helpful tricks Terminal can do to improve my productivity and overall make me more proficient behind a Mac as a security practitioner. In previous editions, I covered everything from enabling Touch ID for sudo authentication to cleaning up public Wi-Fi connections. This week, I share even more commands I’ve since discovered.

Set an alarm inside Terminal
If you have trouble taking breaks between punching in Terminal commands like a sleep-deprived toddler and creating shareholder value better than Steve Jobs convincing the world that $1,000 monitor stands were a necessary part of the human experience, I have news…
You can quickly set alarms from the command line in Terminal in just seconds.
Enter leave [time]. For example this:
leave 1846
This also works using your local time–just omit the semicolon in the middle. For example, 641 would be 6:41 am or pm, depending on which is first.

Detailed battery info in one command
I’m obsessed with maximizing the battery health of my Apple devices, especially my 2024 M3 MacBook Air, which I’m proud to say is holding up well. In addition to proving the maximum capacity, the command below will give you other useful stats like condition, the serial number of the battery, cycle count, and firmware/hardware versions.
system_profiler SPPowerDataType

Find any password you’ve ever saved
While it’s common knowledge that Apple’s Passwords app also contains every saved Wi-Fi network password, there’s a quicker way to search and find them in Terminal. Use this command:
Security find-generic-password -wa [Wi-Fi Network]
This command will search through your iCloud Keychain much like the Password app does behind the scenes. If you entered it correctly, with a familiar Wi-Fi network name, Terminal will prompt you to enter your local password, and boom!
Flush all your hidden downloads
Your Mac keeps a database of everything you’ve ever downloaded, even if you proactively clear your browser history. If you want a truly clean slate and don’t want someone to see what you’ve been up to, run the first command to view the contents and the second to purge the log.
sqlite3 ~/Library/Preferences/com.apple.LaunchServices.QuarantineEventsV* 'select LSQuarantineDataURLString from LSQuarantineEvent'sqlite3 ~/Library/Preferences/com.apple.LaunchServices.QuarantineEventsV* 'delete from LSQuarantineEvent'
Change the default screenshot file name
If you’re like me, Screenshot is one of the most frequently used utilities on my Mac. But by default, each screenshot begins with “Screenshot” in the file name, which can get a little confusing when you’re working between applications and taking captures of each. Instead of having dozens of “Screenshot” file names on your desktop, you can use this command to name them based on the tasks you’re working on.
defaults write com.apple.screencapture name <Name>
Replace <Name> with whatever you’d like to help you identify the screenshot files more easily. For example, I used “Security Bite” below. Now, all screenshots I take will start with this until I change it back to the default or something else entirely.
Change the default screenshot file format
We can also tweak the screenshot file types. By default, new grabs will resort to PNG, which is great for image quality but can take up more space than one would like.
Supported formats include PNG, JPG, PDF, GIF, and TIFF.
For example, if you’d like to save a screenshot of a PDF, do this:
defaults write com.apple.screencapture name SecurityBite type pdf
Bonus: ASCII Aquarium
This one will provide zero productivity or security benefit, serving only the sacred purpose of pure unadulterated Terminal-tainment (Copyright pending). If you already have Brew installed, you can skip the first command; otherwise, enter both and watch your window turn into a live aquarium.
install brew(If this gives you a command not found: brew error message, try this:/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)")brew install asciiquarium- Then,
asciiquariumto launch it
Security Bite is 9to5Mac’s weekly deep dive into the world of Apple security. Each week, Arin Waichulis unpacks new threats, privacy concerns, vulnerabilities, and more, shaping an ecosystem of over 2 billion devices.
Have another Security Bite
Follow Arin: Twitter/X, LinkedIn, Threads


FTC: We use income earning auto affiliate links. More.

