You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A curated list of useful command line apps, in celebration of the TUI.
“Knowledge brings fear” (Mars University Mission Statement)
If you want to contribute, you are highly encouraged to do so. Please read the contribution guidelines.
Women Empowerment in Zanzibar
Send a little karma down the way and support women empowerment in Zanzibar by
helping to fund the local production of reusable female hygiene
products. A very
dear friend of mine runs the project. They were already able to buy hundreds of
educational books. Sometimes, it takes so little to make a huge impact. If
you'd like to thank me or support this work, donate. Additionally, any current
and future sponsoring of my work via GitHub or other channels will flow one
hundred percent to the NGO.
A curated list of shell commands and tools specific to macOS.
“You don’t have to know everything. You simply need to know where to find it
when necessary.” (John Brunner)
If you want to contribute, you are highly encouraged to do so. Please read the
contribution guidelines.
For more terminal shell goodness, please also see this list's sister list
Awesome Command Line Apps.
A Personal Note
Not all information contained in this list is always up-to-date with the latest
OS releases. Apple does support devices for an extended time frame but they're
also costly to purchase. Currently, I don't have the ability to replace my
Mid-2014 15" MacBook Pro and it doesn't run Monterey or above. On one hand, the
fact that this machine is still running mostly intact is a testament to its
hardware and build quality. On the other, the fact that my older OS release
will very soon not receive any security updates and bug fixes is a bit
unsettling. And well, it directly affects my ability to provide timely updates.
So maybe someone from Apple reads this and can do something about that
situation.
Furthermore, looking at almost 26k GitHub stars for this repository, if only
about 14% of the people who this resource is useful for, sponsored me with a
one time amount of a single Euro, I could order a new machine that probably
lasted me another eight years. It's not something I'd expect, nor think I
should. It's entirely my issue. Still, something to think about.
On top of everything, I'm currently out of a job, have little prospects, am
very short on money and am going through a tough time. To help me out, the
easiest way is to sponsor me via GitHub, either recurring or as a one-time
donation. Every little bit helps. Thank you for considering it.
You are very welcome to send me patches for changes and additions via email. If
you are unfamiliar with the git am workflow, you can find an easy
introduction to it here: https://git-send-email.io
Foreword
There's really only one thing I'd like to note here: man
pages. Man
pages. Man
pages. Okay, three things. But this one thing seemed
so important, I had to mention it multiple times. If you're not doing it
already, you should get into the habit of consulting man pages before searching
anywhere else. Unix-style man pages are an excellent source of documentation.
There's even a man page for the man command itself:
man man
It also explains what the numbers in the man pages refer to --- like man(1).
This is useful for older applications that run properly but haven't been
updated to work properly with dark mode. Change app name Notes to the
actual application you want to target.
# Up to OS X 10.8 (Mountain Lion)
osascript -e 'tell application "Finder" to set desktop picture to POSIX file "/path/to/picture.jpg"'# Since OS X 10.9 (Mavericks)
sqlite3 ~/Library/Application\ Support/Dock/desktoppicture.db "update data set value = '/path/to/picture.jpg'"&& killall Dock
Applications
App Store
List All Apps Downloaded from App Store
# Via find
find /Applications -path '*Contents/_MASReceipt/receipt' -maxdepth 4 -print |\sed 's#.app/Contents/_MASReceipt/receipt#.app#g; s#/Applications/##'# Via Spotlight
mdfind kMDItemAppStoreHasReceipt=1
# Activate And Restart the ARD Agent and Helper
sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -restart -agent -console
# Deactivate and Stop the Remote Management Service
sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -deactivate -stop
Remote Desktop Sharing
# Allow Access for All Users and Give All Users Full Access
sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -configure -allowAccessFor -allUsers -privs -all
# Disable ARD Agent and Remove Access Privileges for All Users (Default)
sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -deactivate -configure -access -off
Works up to OS X 10.10 (Yosemite). System Integrity Protection was introduced
in OS X 10.11 (El Capitan) which prevents system Launch Agents from being
unloaded.
# Stop Responding to Key Presses
launchctl unload -w /System/Library/LaunchAgents/com.apple.rcd.plist
# Respond to Key Presses (Default)
launchctl load -w /System/Library/LaunchAgents/com.apple.rcd.plist
From OS X 10.11 (El Capitan) on, you can either disable SIP or resort to a kind
of hack, which will make iTunes inaccessible to any user, effectively
preventing it from starting itself or its helpers. Be aware that for all
intents and purposes this will trash your iTunes installation and may conflict
with OS updates down the road.
The AppleScript code below will quit Mail, vacuum the SQLite index, then
re-open Mail. On a large email database that hasn't been optimized for a while,
this can provide significant improvements in responsiveness and speed.
(*Speed up Mail.app by vacuuming the Envelope IndexCode from: http://web.archive.org/web/20071008123746/http://www.hawkwings.net/2007/03/03/scripts-to-automate-the-mailapp-envelope-speed-trick/Originally by "pmbuko" with modifications by RomuloUpdated by Brett Terpstra 2012Updated by Mathias Törnblom 2015 to support V3 in El Capitan and still keep backwards compatibilityUpdated by Andrei Miclaus 2017 to support V4 in Sierra*)tellapplication"Mail"to quit
setos_versiontodo shell script"sw_vers -productVersion"setmail_versionto"V2"
considering numeric stringsif"10.10"<= os_version thensetmail_versionto"V3"if"10.12"<= os_version thensetmail_versionto"V4"if"10.13"<= os_version thensetmail_versionto"V5"if"10.14"<= os_version thensetmail_versionto"V6"if"10.15"<= os_version thensetmail_versionto"V7"if"11"<= os_version thensetmail_versionto"V8"endconsideringsetsizeBeforetodo shell script"ls -lnah ~/Library/Mail/"& mail_version &"/MailData | grep -E 'Envelope Index$' | awk {'print $5'}"do shell script"/usr/bin/sqlite3 ~/Library/Mail/"& mail_version &"/MailData/Envelope\\ Index vacuum"setsizeAftertodo shell script"ls -lnah ~/Library/Mail/"& mail_version &"/MailData | grep -E 'Envelope Index$' | awk {'print $5'}"display dialog ("Mail index before: "& sizeBefore &return&"Mail index after: "& sizeAfter &return&return&"Enjoy the new speed!")
tellapplication"Mail"toactivate
Since the above AppleScript mainly uses shell commands anyway, here's a shell
script version of the same functionality. It's usable from Big Sur onwards.
Feel free to send a patch for newer systems. I currently don't have the money
for a machine capable of running macOS 12+.
#!/bin/zsh## Speed up Mail.app by vacuuming the Envelope Index# Written by Marcel Bischoff# AppleScript original by "pmbuko" with modifications by Romulo#
OS_VERSION=$(sw_vers -productVersion | cut -d. -f 1,2)
MAIL_RUNNING=$(ps aux | grep -v grep | grep -c "Mail\$")
MAIL_VERSION="V2"if [ $MAIL_RUNNING-gt 0 ];then osascript -e 'tell application "Mail" to quit';fiif [ 1 -eq"$(echo "11 <= ${OS_VERSION}"| bc)" ];then MAIL_VERSION="V8";fi
SIZE_BEFORE=$(ls -lnah ~/Library/Mail/${MAIL_VERSION}/MailData | grep -E 'Envelope Index$'| awk {'print $5'})
/usr/bin/sqlite3 ~/Library/Mail/${MAIL_VERSION}/MailData/Envelope\ Index vacuum
SIZE_AFTER=$(ls -lnah ~/Library/Mail/${MAIL_VERSION}/MailData | grep -E 'Envelope Index$'| awk {'print $5'})printf"Mail index before: %s\nMail index after: %s\n"$SIZE_BEFORE$SIZE_AFTER
Since macOS 10.13 (High Sierra), you cannot disable local snapshots. Time
Machine now always creates a local APFS snapshot and uses that snapshot as the
data source to create a regular backup, rather than using the live disk as the
source, as is the case with HFS formatted disks.
Manage Backup Volumes
# Info
tmutil destinationinfo
# Remove current destination
tmutil removedestination
# Set physical disk destination
tmutil setdestination /path/to/volume/or/volume/name
# Set network destination
tmutil setdestination -p smb://10.20.30.40/share
Prevent Time Machine from Prompting to Use New Hard Drives as Backup Volume
# List all backups
tmutil listbackups
# Show differences
tmutil calculatedrift /path/to/backup/folder/plus/machine/name/folder
Verify Backup
Beginning in OS X 10.11, Time Machine records checksums of files copied into
snapshots. Checksums are not retroactively computed for files that were copied
by earlier releases of OS X.
sudo tmutil verifychecksums /path/to/backup
Developer
Vim
Compile Sane Vim
Compiling MacVim via Homebrew with all bells and whistles, including overriding
system Vim.
brew install macvim --HEAD
Neovim
Install the modern Vim drop-in alternative via Homebrew.
Fully resize your Dock's body. To resize change the 0 value as an integer.
defaults write com.apple.dock tilesize -int 0 && \
killall Dock
Scroll Gestures
Use your touchpad or mouse scroll wheel to interact with Dock items. Allows you
to use an upward scrolling gesture to open stacks. Using the same gesture on
applications that are running invokes Exposé/Mission Control.
Supported formats are plain text, rich text (rtf) and Microsoft Word (doc/docx).
textutil -convert html file.ext
Files, Disks and Volumes
Create an Empty File
Creates an empty 10 gigabyte test file.
mkfile 10g /path/to/file
Disable Sudden Motion Sensor
Leaving this turned on is useless when you're using SSDs.
sudo pmset -a sms 0
Eject All Mountable Volumes
The only reliable way to do this is by sending an AppleScript command to
Finder.
osascript -e 'tell application "Finder" to eject (every disk whose ejectable is true)'
Repair File Permissions
You don't have to use the Disk Utility GUI for this.
sudo diskutil repairPermissions /
Beginning with OS X 10.11 (El Capitan), system file permissions are
automatically protected. It's no longer necessary to verify or repair
permissions with Disk Utility.
(Source)
Set Boot Volume
# Up to OS X 10.10 (Yosemite)
bless --mount "/path/to/mounted/volume" --setBoot
# From OS X 10.11 (El Capitan)
sudo systemsetup -setstartupdisk /System/Library/CoreServices
Show All Attached Disks and Partitions
diskutil list
View File System Usage
A continuous stream of file system access info.
sudo fs_usage
APFS
Present since macOS 10.13 (High Sierra). There is no central utility and usage
is inconsistent as most functionality is rolled into tmutil.
This command applies to .iso, .img and .dmg images.
hdiutil burn /path/to/image_file
Create Temporary High-Performance Disk
The disk is backed by physical RAM and will be several times faster than an
SSD. The contents of the disk cannot be recovered after it has been ejected.
The example below is for a 500 MiB RAM disk, adjust as needed.
You need to restart Dock because Launchpad is tied to it.
# Up to OS X 10.10 (Yosemite)
rm ~/Library/Application\ Support/Dock/*.db && \
killall Dock
# From OS X 10.11 (El Capitan)
defaults write com.apple.dock ResetLaunchPad -bool true&& \
killall Dock
Media
Audio
Convert Audio File to iPhone Ringtone
afconvert input.mp3 ringtone.m4r -f m4af
Create Audiobook From Text
Uses "Alex" voice, a plain UTF-8 encoded text file for input and AAC output.
say -v Alex -f file.txt -o "output.m4a"
Disable Sound Effects on Boot
sudo nvram SystemAudioVolume=""
Mute Audio Output
osascript -e 'set volume output muted true'
Set Audio Volume
osascript -e 'set volume 4'
Play Audio File
You can play all audio formats that are natively supported by QuickTime.
Permanently Add Private Key Passphrase to SSH Agent
Prior to macOS 10.12 (Sierra), ssh would present a dialog asking for your
passphrase and would offer the option to store it into the keychain. This UI
was deprecated some time ago and has been removed.
Instead, a new UseKeychain option was introduced in macOS 10.12 (Sierra)
allowing users to specify whether they would like for the passphrase to be
stored in the keychain. This option was enabled by default on macOS 10.12
(Sierra), which caused all passphrases to be stored in the keychain.
This was not the intended default behavior, so this has been changed in macOS
10.12.2.
(Source)
defaults write com.apple.print.PrintingPrefs "Quit When Finished" -bool true
Security
Application Firewall
Firewall Service
# Show Status
sudo /usr/libexec/ApplicationFirewall/socketfilterfw --getglobalstate
# Enable
sudo /usr/libexec/ApplicationFirewall/socketfilterfw --setglobalstate on
# Disable (Default)
sudo /usr/libexec/ApplicationFirewall/socketfilterfw --setglobalstate off
# Up to macOS 10.12 (Sierra)
open /System/Library/Frameworks/ScreenSaver.framework/Versions/A/Resources/ScreenSaverEngine.app
# From macOS 10.13 (High Sierra)
/System/Library/CoreServices/ScreenSaverEngine.app/Contents/MacOS/ScreenSaverEngine
The tccutil command manages the privacy database, which stores decisions the
user has made about whether apps may access personal data. You need to close
all applications except Terminal before running any of these commands.
# Full Reset for All Applications
sudo tccutil reset All
# Reset Adress Book Access
sudo tccutil reset AddressBook
# Reset All Permission for Terminal.app
sudo tccutil reset All com.apple.Terminal
Wiping Data
Note: The srm command appears to have been removed on MacOS after 10.9. There
is a note on an Apple support page
hinting as to why:
With an SSD drive, Secure Erase and Erasing Free Space are not available in
Disk Utility. These options are not needed for an SSD drive because a
standard erase makes it difficult to recover data from an SSD.
When logging into a Mac remotely via Apple Remote Desktop or VNC, you are
sometimes required to enter your password a second time after connecting to the
Mac. While you can disable this behavior, it is explicitly not recommend to
turn this functionality off unless you are certain that no one else will be
able to access your Mac physically when you are away.
The identifier can be found via softwareupdate --list. In the example below,
being on macOS 10.14 (Mojave), will ignore all update prompts to macOS 10.15
(Catalina), since the latter removes 32-bit support.
This should only be done for testing purposes or unmanaged clients. To use
network-wide, either correctly set up DNS along with Apple SUS
service
and bind your clients via OpenDirectory. Alternatively, use
Reposado together with correct network DNS
settings to make resolution transparent.
Margarita looks nice to have as
well.
# Use own SUS
sudo defaults write /Library/Preferences/com.apple.SoftwareUpdate CatalogURL http://su.example.com:8088/index.sucatalog
# Reset to Apple SUS
sudo defaults delete /Library/Preferences/com.apple.SoftwareUpdate CatalogURL
Software Version
Show System Software Version
There are several ways to obtain different levels of detail.
# Disable
mdutil -i off -d /path/to/volume
# Enable (Default)
mdutil -i on /path/to/volume
Erase Spotlight Index and Rebuild
mdutil -E /path/to/volume
Search via Spotlight
mdfind -name 'searchterm'
Show Spotlight Indexed Metadata
mdls /path/to/file
System Integrity Protection
Reboot while holding Cmd + R and open the Terminal
application. You will need to reboot for the commands to take effect.
# Status
csrutil status
# Enable (Default)
csrutil enable# Disable
csrutil disable
Date and Time
List Available Timezones
sudo systemsetup -listtimezones
Set Timezone
sudo systemsetup -settimezone Europe/Berlin
Set Clock Using Network Time
# Status
sudo systemsetup getusingnetworktime
# Enable (Default)
sudo systemsetup setusingnetworktime on
# Disable
sudo systemsetup setusingnetworktime off
Set Menu Bar Clock Output Format
# System Preferences > Date & Time > Time options# Analogue
sudo defaults write com.apple.menuextra.clock IsAnalog -bool true# Digital (Default)
sudo defaults write com.apple.menuextra.clock IsAnalog -bool false# System Preferences > Date & Time > Flash the time separators# Enable
sudo defaults write com.apple.menuextra.clock FlashDateSeparators -bool true# Disable (Default)
sudo defaults write com.apple.menuextra.clock FlashDateSeparators -bool false# Thu 18 Aug 23:46:18# System Preferences > Date & Time > Display time with seconds - Checked [:ss]# System Preferences > Date & Time > Use a 24-hour clock - Checked [HH:mm]# System Preferences > Date & Time > Show AM/PM - Unchecked# System Preferences > Date & Time > Show the day of the week - Checked [EEE]# System Preferences > Date & Time > Show date - Checked [d MMM]
sudo defaults write com.apple.menuextra.clock DateFormat -string "EEE d MMM HH:mm:ss"# Thu 23:46:18# System Preferences > Date & Time > Display time with seconds - Checked [:ss]# System Preferences > Date & Time > Use a 24-hour clock - Checked [HH:mm]# System Preferences > Date & Time > Show AM/PM - Unchecked# System Preferences > Date & Time > Show the day of the week - Checked [EEE]# System Preferences > Date & Time > Show date - Unchecked
sudo defaults write com.apple.menuextra.clock DateFormat -string "EEE HH:mm:ss"# 18 Aug 23:46:18# System Preferences > Date & Time > Display time with seconds - Checked [:ss]# System Preferences > Date & Time > Use a 24-hour clock - Checked [HH:mm]# System Preferences > Date & Time > Show AM/PM - Unchecked# System Preferences > Date & Time > Show the day of the week - Unchecked# System Preferences > Date & Time > Show date - Checked [d MMM]
sudo defaults write com.apple.menuextra.clock DateFormat -string "d MMM HH:mm:ss"# 23:46:18# System Preferences > Date & Time > Display time with seconds - Checked [:ss]# System Preferences > Date & Time > Use a 24-hour clock - Checked [HH:mm]# System Preferences > Date & Time > Show AM/PM - Unchecked# System Preferences > Date & Time > Show the day of the week - Unchecked# System Preferences > Date & Time > Show date - Unchecked
sudo defaults write com.apple.menuextra.clock DateFormat -string "HH:mm:ss"# Thu 18 Aug 11:46:18 pm# System Preferences > Date & Time > Display time with seconds - Checked [:ss]# System Preferences > Date & Time > Use a 24-hour clock - Unchecked# System Preferences > Date & Time > Show AM/PM - Checked [a]# System Preferences > Date & Time > Show the day of the week - Checked [EEE]# System Preferences > Date & Time > Show date - Checked [d MMM]
sudo defaults write com.apple.menuextra.clock DateFormat -string "EEE d MMM h:mm:ss a"# Thu 11:46:18 pm# System Preferences > Date & Time > Display time with seconds - Checked [:ss]# System Preferences > Date & Time > Use a 24-hour clock - Unchecked# System Preferences > Date & Time > Show AM/PM - Checked [a]# System Preferences > Date & Time > Show the day of the week - Checked [EEE]# System Preferences > Date & Time > Show date - Unchecked
sudo defaults write com.apple.menuextra.clock DateFormat -string "EEE h:mm:ss a"# 18 Aug 11:46:18 pm# System Preferences > Date & Time > Display time with seconds - Checked [:ss]# System Preferences > Date & Time > Use a 24-hour clock - Unchecked# System Preferences > Date & Time > Show AM/PM - Checked [a]# System Preferences > Date & Time > Show the day of the week - Unchecked# System Preferences > Date & Time > Show date - Checked [d MMM]
sudo defaults write com.apple.menuextra.clock DateFormat -string "d MMM h:mm:ss a"# 11:46:18 pm# System Preferences > Date & Time > Display time with seconds - Checked [:ss]# System Preferences > Date & Time > Use a 24-hour clock - Unchecked# System Preferences > Date & Time > Show AM/PM - Checked [a]# System Preferences > Date & Time > Show the day of the week - Unchecked# System Preferences > Date & Time > Show date - Unchecked
sudo defaults write com.apple.menuextra.clock DateFormat -string "h:mm:ss a"# Thu 18 Aug 11:46:18# System Preferences > Date & Time > Display time with seconds - Checked [:ss]# System Preferences > Date & Time > Use a 24-hour clock - Unchecked# System Preferences > Date & Time > Show AM/PM - Unchecked# System Preferences > Date & Time > Show the day of the week - Checked [EEE]# System Preferences > Date & Time > Show date - Checked [d MMM]
sudo defaults write com.apple.menuextra.clock DateFormat -string "EEE d MMM h:mm:ss"# Thu 11:46:18# System Preferences > Date & Time > Display time with seconds - Checked [:ss]# System Preferences > Date & Time > Use a 24-hour clock - Unchecked# System Preferences > Date & Time > Show AM/PM - Unchecked# System Preferences > Date & Time > Show the day of the week - Checked [EEE]# System Preferences > Date & Time > Show date - Unchecked
sudo defaults write com.apple.menuextra.clock DateFormat -string "EEE h:mm:ss"# 18 Aug 11:46:18# System Preferences > Date & Time > Display time with seconds - Checked [:ss]# System Preferences > Date & Time > Use a 24-hour clock - Unchecked# System Preferences > Date & Time > Show AM/PM - Unchecked# System Preferences > Date & Time > Show the day of the week - Unchecked# System Preferences > Date & Time > Show date - Checked [d MMM]
sudo defaults write com.apple.menuextra.clock DateFormat -string "d MMM h:mm:ss"# 11:46:18# System Preferences > Date & Time > Display time with seconds - Checked [:ss]# System Preferences > Date & Time > Use a 24-hour clock - Unchecked# System Preferences > Date & Time > Show AM/PM - Unchecked# System Preferences > Date & Time > Show the day of the week - Unchecked# System Preferences > Date & Time > Show date - Unchecked
sudo defaults write com.apple.menuextra.clock DateFormat -string "h:mm:ss"# Thu 18 Aug 23:46# System Preferences > Date & Time > Display time with seconds - Unchecked# System Preferences > Date & Time > Use a 24-hour clock - Checked [HH:mm]# System Preferences > Date & Time > Show AM/PM - Unchecked# System Preferences > Date & Time > Show the day of the week - Checked [EEE]# System Preferences > Date & Time > Show date - Checked [d MMM]
sudo defaults write com.apple.menuextra.clock DateFormat -string "EEE d MMM HH:mm"# Thu 23:46# System Preferences > Date & Time > Display time with seconds - Unchecked# System Preferences > Date & Time > Use a 24-hour clock - Checked [HH:mm]# System Preferences > Date & Time > Show AM/PM - Unchecked# System Preferences > Date & Time > Show the day of the week - Checked [EEE]# System Preferences > Date & Time > Show date - Unchecked
sudo defaults write com.apple.menuextra.clock DateFormat -string "EEE HH:mm"# 18 Aug 23:46# System Preferences > Date & Time > Display time with seconds - Unchecked# System Preferences > Date & Time > Use a 24-hour clock - Checked [HH:mm]# System Preferences > Date & Time > Show AM/PM - Unchecked# System Preferences > Date & Time > Show the day of the week - Unchecked# System Preferences > Date & Time > Show date - Checked [d MMM]
sudo defaults write com.apple.menuextra.clock DateFormat -string "d MMM HH:mm"# 23:46# System Preferences > Date & Time > Display time with seconds - Unchecked# System Preferences > Date & Time > Use a 24-hour clock - Checked [HH:mm]# System Preferences > Date & Time > Show AM/PM - Unchecked# System Preferences > Date & Time > Show the day of the week - Unchecked# System Preferences > Date & Time > Show date - Unchecked
sudo defaults write com.apple.menuextra.clock DateFormat -string "HH:mm"# Thu 18 Aug 11:46 pm# System Preferences > Date & Time > Display time with seconds - Unchecked# System Preferences > Date & Time > Use a 24-hour clock - Unchecked# System Preferences > Date & Time > Show AM/PM - Checked [a]# System Preferences > Date & Time > Show the day of the week - Checked [EEE]# System Preferences > Date & Time > Show date - Checked [d MMM]
sudo defaults write com.apple.menuextra.clock DateFormat -string "EEE d MMM h:mm a"# Thu 11:46 pm# System Preferences > Date & Time > Display time with seconds - Unchecked# System Preferences > Date & Time > Use a 24-hour clock - Unchecked# System Preferences > Date & Time > Show AM/PM - Checked [a]# System Preferences > Date & Time > Show the day of the week - Checked [EEE]# System Preferences > Date & Time > Show date - Unchecked
sudo defaults write com.apple.menuextra.clock DateFormat -string "EEE h:mm a"# 18 Aug 11:46 pm# System Preferences > Date & Time > Display time with seconds - Unchecked# System Preferences > Date & Time > Use a 24-hour clock - Unchecked# System Preferences > Date & Time > Show AM/PM - Checked [a]# System Preferences > Date & Time > Show the day of the week - Unchecked# System Preferences > Date & Time > Show date - Checked [d MMM]
sudo defaults write com.apple.menuextra.clock DateFormat -string "d MMM h:mm a"# 11:46 pm# System Preferences > Date & Time > Display time with seconds - Unchecked# System Preferences > Date & Time > Use a 24-hour clock - Unchecked# System Preferences > Date & Time > Show AM/PM - Checked [a]# System Preferences > Date & Time > Show the day of the week - Unchecked# System Preferences > Date & Time > Show date - Unchecked
sudo defaults write com.apple.menuextra.clock DateFormat -string "h:mm a"# Thu 18 Aug 11:46# System Preferences > Date & Time > Display time with seconds - Unchecked# System Preferences > Date & Time > Use a 24-hour clock - Unchecked# System Preferences > Date & Time > Show AM/PM - Unchecked# System Preferences > Date & Time > Show the day of the week - Checked [EEE]# System Preferences > Date & Time > Show date - Checked [d MMM]
sudo defaults write com.apple.menuextra.clock DateFormat -string "EEE d MMM h:mm"# Thu 11:46# System Preferences > Date & Time > Display time with seconds - Unchecked# System Preferences > Date & Time > Use a 24-hour clock - Unchecked# System Preferences > Date & Time > Show AM/PM - Unchecked# System Preferences > Date & Time > Show the day of the week - Checked [EEE]# System Preferences > Date & Time > Show date - Unchecked
sudo defaults write com.apple.menuextra.clock DateFormat -string "EEE h:mm"# 18 Aug 11:46# System Preferences > Date & Time > Display time with seconds - Unchecked# System Preferences > Date & Time > Use a 24-hour clock - Unchecked# System Preferences > Date & Time > Show AM/PM - Unchecked# System Preferences > Date & Time > Show the day of the week - Unchecked# System Preferences > Date & Time > Show date - Checked [d MMM]
sudo defaults write com.apple.menuextra.clock DateFormat -string "d MMM h:mm"# 11:46# System Preferences > Date & Time > Display time with seconds - Unchecked# System Preferences > Date & Time > Use a 24-hour clock - Unchecked# System Preferences > Date & Time > Show AM/PM - Unchecked# System Preferences > Date & Time > Show the day of the week - Unchecked# System Preferences > Date & Time > Show date - Unchecked
sudo defaults write com.apple.menuextra.clock DateFormat -string "h:mm"# Apply changes immediately
sudo killall SystemUIServer
Homepage - Zsh is a shell designed for interactive use,
although it is also a powerful scripting language.
Oh My Zsh - An open source, community-driven framework for
managing your Zsh configuration.
Prezto - A speedy Zsh framework.
Enriches the command line interface environment with sane defaults, aliases,
functions, auto completion, and prompt themes.
zgen - Another open source framework
for managing your zsh configuration. Zgen will load oh-my-zsh compatible
plugins and themes and has the advantage of both being faster and
automatically cloning any plugins used in your configuration for you.
Terminal Fonts
Anonymous Pro - A
family of four fixed-width fonts designed with coding in mind.
Codeface - A gallery and
repository of monospaced fonts for developers.