From musings of k8
Jump to: navigation, search

Stuff for macOS and OS X

INFO: [2020-11-19] These notes aren't fully formatted yet as I've simply copied them from my personal notes. I'll fix them with time.



Keyboard Shortcut Symbols

Back up and share text replacements on Mac


Common symbols used by macOS.

Description Symbol Note
Apple ⌘-Option-K (works on a Mac, but might be different on other OSes)
Escape ⎋ / ␛
Fn-Left ↖︎
Fn-Right ↘︎
Power substitute as there isn't a good one;


Method 1: To type an accented or alternate version of a character, hold a key down until its alternate characters are displayed. (

Method 2: Request accent, then character. (

Method 3: Open Character Palette with Control-Command-Space. Find the desired character, then drag the character with the mouse into place to insert.

Name Example Shortcut + Char
Acute ó Ó Option-E, V
Circumflex ô Ô Option-I, V
Grave ò Ò Option-`, V
Tilde õ Õ Option-N, V (only works with a, n, and o)
Umlaut ö Ö Option-U, V


Letter Shortcut Description
å Option-A
ç Option-C
ø Option-O
ß Option-S Eszett
æ Option-'

Math Symbols

Approximately : (≈) Option-X Degree : (°) Shift-Option-8 Delta : (∆) Option-J Division : (÷) Option-/ GreaterOrEqual : (≥) Option-. Infinity : (∞) Option-5 Intergal : (∫) Option-B LessOrEqual : (≤) Option-, Micro : (µ) Option-M Ohm : (Ω) Option-Z PartialDerivative : (∂) Option-D PerMil : (‰) Shift-Option-R Pi : (π) Option-P Plus/Minus : (±) Shift-Option-= ProductPi : (∏) Shift-Option-P SquareRoot : (√) Option-V Sum : (∑) Option-W


Copyright : (©) Option+G Dagger : (†) Option+T Dot : (•) Option+8 EmDash : (—) Option+Shift+- EnDash : (–) Option+- Paragraph : (¶) Option+7 Registered : (®) Option+R Section : (§) Option+6 Trademark : (™) Option+2


Command-F2 : Act as external display on iMac Command-Delete : Delete a file Command-Shift-3 : Capture screen Command-Shift-4 : Capture window with cursor selection Command-Shift-4 + Space : Capture window Command-Shift-5 : Record cropped window Command-Shift-5 + Space : Record a window Command-Shift-Q : Log out with confirmation Command-Shift-Option-Q : Log out without confirmation


Key combination Description
⌘-B Boldface the selected text, or turn boldfacing on or off.
⌘-Option-C Copy Style: Copy the formatting settings of the selected item to the Clipboard.
⌘-D Select the Desktop folder from within an Open dialog or Save dialog.
⌘-Control-D Show or hide the definition of the selected word.
⌘-Option-F Go to the search field.
⌘-I Italicise the selected text, or turn italics on or off.
⌘-Option-I Show or hide the inspector window.
⌘-L During software installation, show a log of actions.
⌘-Shift-P Page setup: Display a window for selecting document settings.
⌘-Shift-S Display the ave As dialog, or duplicate the current document.
⌘-T Show or hide the Fonts window.
⌘-Option-T Show or hide a toolbar in the app.
⌘-U Underline the selected text, or turn underlining on or off.
⌘-Option-V Paste Style: Apply the copied style to the selected item.
⌘-Option-Shift-V Paste and Match Style: Apply the style of the surrounding content to the item pasted within that content.
⌘-; Fix misspelled words in the document.
⌘-Shift-: Display the Spelling and Grammar window
⌘-⌫ Select Delete or Don't Save in a dialog that contains a Delete or Don't Save button.

Command–DownArrow : Move the insertion point to the end of the document. Command–Equal : ... performs the same function. Command–LeftArrow : Move the insertion point to the beginning of the current line. Command–LeftCurlyBracket : Left align. Command–RightArrow : Move the insertion point to the end of the current line. Command–RightCurlyBracket : Right align. Command–Shift–DownArrow : Select the text between the insertion point and the end of the document. Command–Shift–LeftArrow : Select the text between the insertion point and the beginning of the current line. Command–Shift–Minus : Decrease the size of the selected item. Command–Shift–Plus : Increase the size of the selected item. Command–Shift–QuestionMark : Open the Help menu. Command–Shift–RightArrow : Select the text between the insertion point and the end of the current line. Command–Shift–UpArrow : Select the text between the insertion point and the beginning of the document. Command–Shift–VerticalBar : Center align. Command–UpArrow : Move the insertion point to the beginning of the document. Control-A : Move to the beginning of the line or paragraph. Control-B : Move one character backward. Control-D : Delete the character to the right of the insertion point. Or use Fn-Delete. Control-E : Move to the end of a line or paragraph. Control-F : Move one character forward. Control-H : Delete the character to the left of the insertion point. Or use Delete. Control-K : Delete the text between the insertion point and the end of the line or paragraph. Control-L : Center the cursor or selection in the visible area. Control-N : Move down one line. Control-O : Insert a new line after the insertion point. Control-P : Move up one line. Control-T : Swap the character behind the insertion point with the character in front of the insertion point. Fn-Delete : Forward delete on keyboards that don't have a Forward Delete key. Or use Control-D. Fn–DownArrow : Page Down: Scroll down one page. Fn–LeftArrow : Home: Scroll to the beginning of a document. Fn–RightArrow : End: Scroll to the end of a document. Fn–UpArrow : Page Up: Scroll up one page. Option-Delete : Delete the word to the left of the insertion point. Option–LeftArrow : Move the insertion point to the beginning of the previous word. Option–RightArrow : Move the insertion point to the end of the next word. Shift–DownArrow : Extend text selection to the nearest character at the same horizontal location on the line below. Shift–LeftArrow : Extend text selection one character to the left. Shift–Option–DownArrow : Extend text selection to the end of the current paragraph, then to the end of the following paragraph if pressed again. Shift–Option–LeftArrow : Extend text selection to the beginning of the current word, then to the beginning of the following word if pressed again. Shift–Option–RightArrow : Extend text selection to the end of the current word, then to the end of the following word if pressed again. Shift–Option–UpArrow : Extend text selection to the beginning of the current paragraph, then to the beginning of the following paragraph if pressed again. Shift–RightArrow : Extend text selection one character to the right. Shift–UpArrow : Extend text selection to the nearest character at the same horizontal location on the line above.


Key Desc
C Boot from CD/DVD
D / Option-D Diagnostics or Apple Hardware Test mode / via-Internet. 1) Unplug MacBook Pro from power, and fully power off the machine. 2) Power on and press-and-hold the D key. 3) Release when prompted to choose a language.
N Netboot
R PowerBook Display Reset
T Target disk mode
X Startup from OS X instead of from non-OS X startup
⌘-Option-P-R Reset PRAM. Do immediately after powering on, and release after 2nd Apple logo or 20sec, whichever comes first.
⌘-R / ⌘-Option-R OS X Recovery / over the Internet
Command-S Single User Mode
Command-V Verbose Boot
LeftShift-Control-Option-Power Reset SMC. Do with power off. Hold for 10 sec, then power on again.
Left_Mouse / F12 / mouse_button / trackpad_button Eject Media
Option Startup Manager
Option-D Diagnostics or Apple Hardware Test via Internet
Option-N NetBoot using default image
Shift Safe Mode


How to create a bootable installer for macOS

10.15 Catalina

sudo /Applications/Install\ macOS\ \
  --volume /Volumes/MyVolume

10.14 Mojave

sudo /Applications/Install\ macOS\ \
  --volume /Volumes/MyVolume

10.13 High Sierra

sudo /Applications/Install\ macOS\ High\ \
  --volume /Volumes/MyVolume

10.12 Yosemite

10.11 El Capitan

sudo /Applications/Install\ OS\ X\ El\ \
  --volume /Volumes/MyVolume \
  --applicationpath /Applications/Install\ OS\ X\ El\

10.10 Sierra

$ sudo /Applications/Install\ OS\ X\ \
  --volume /Volumes/MyVolume \
  --applicationpath /Applications/Install\ OS\ X\

10.9 Maverics

$ sudo /Applications/Install\ OS\ X\ \
  --volume /Volumes/MyVolume \
  --applicationpath /Applications/Install\ OS\ X\


See also:

File systems

Create ISO from CDR

Convert a CDR to ISO.

$ hdiutil makehybrid -iso -joliet -o diskimage.iso diskimage.cdr

Write ISO to USB

For bootable images, use one of:

  • Etcher -- recommended for bootable CD/DVD
  • UNetbootin -- useful if additional FreeDOS boot is needed (e.g. for firmware upgrades)

For data only…

Convert the file to a Disk Image. Note a .dmg extension will be added.

$ hdiutil convert -format UDRW -o /path/to/target /path/to/original.iso

Find current devices

$ diskutil list

Unmount device

$ diskutil unmountDisk /dev/diskN

Write to USB

$ sudo dd if=/path/to/target.dmg of=/dev/rdiskN bs=1m

Eject the disk

$ diskutil eject /dev/diskN

Format a disk from the command-line

Format with JHFS+ (Journaled HFS+) with a GPT partition layout.

diskutil eraseDisk jhfs+ "ICY BOX 500G" gpt /dev/diskX

Create custom CoreStorage drive

Create a CoreStorage volume. Will be using disk0 (SSD) and disk1 (HDD).

Partition all drives to be part of CS with single GUID partition, named 'Untitled'. Then determine their drive names

$ diskutil list

Create the logical volume group. Note the 1st drive is the SSD drive, and 2nd is drive is the HDD.

$ diskutil cs create Macintosh\ LVG disk0 disk1

List CS volumes

$ diskutil cs list

Create volume in the volume group using UUID of LVG

$ diskutil cs createVolume UUID jhfs+ Macintosh\ HD 100%

If desired, encrypt the logical volume just created

$ diskutil cs list
$ diskutil cs encryptVolume UUID

Delete a CS LVG.

$ diskutil cs delete UUID

Get serial number of drive

$ ioreg -l |less


Mirror directories in OS X, preserving all ownership and permission data.

# ditto -V /Users /Volumes/SecondaryHD/Users

Write DMG to disk

  1. Mount the destination drive
  2. Issue this command, replacing source and destination paths
$ asr restore \
--source /path-to-source-dmg-image \
--target /Volumes/path-to-destination-volume \
--erase \
--format HFS+ \
  • The --erase will erase the destination format
  • The --format is optional and only required if the destination needs to be reformatted
  • The --noverify is optional and skips verification - but obviously doesn't verify a successful restore.

Mount DMG as disk -- loopback

The upgrade from MacOS 10.12.1 to 10.12.2 broke my APFS formatted Ableton SDCard drive. Ugh :-(. Luckily I still had a machine running 10.12.1, so I figured I'd try to fix things.

I started by dumping the raw disk /dev/disk2 using dd.

$ dd if=/dev/disk2 of=/Volumes/Samsung_T1/Ableton-d2.dmg bs=1m

Mount the disk. Note: I could have added the -nomount option after attach to have prevented the disk from actually mounting.

$ hdiutil attach /Volumes/Samsung_T1/Ableton-d2.dmg
/dev/disk2              GUID_partition_scheme
/dev/disk2s1            EFI
/dev/disk2s2            Apple_APFS
/dev/disk2s2s1          41504653-0000-11AA-AA11-0030654



Sparse image

Create a sparse image with APFS.

$ hdiutil create -fs APFS -size 1GB foo.sparseimage

Physical disk

Partition the disk

$ sudo diskutil partitionDisk disk2 APFS Untitled 100%

Existing partition

Create APFS container.

$ diskutil apfs createContainer /dev/disk2s2

Create APFS volume in an APFS container.

$ diskutil apfs addVolume disk2s2 APFS newAPFS


$ fsck_apfs /dev/disk2s2


Change default behavior to work better with Linux servers.


# Generated automatically by NFS Manager 2016-10-19 23:06:36 +0000
nfs.client.allow_async = 1
nfs.client.nfsiod_thread_max = 128
nfs.client.mount.options = nfc,intr
nfs.client.is_mobile = 0

Restart autofs without rebooting.

Use the automount command.

$ sudo automount -vc

Alternatively, use launchctl.

$ sudo launchctl stop



Get list of info

$ diskutil list

Format an entire drive as APFS

# command verb disk boot_record filesystem name size
$ diskutil partitionDisk /dev/diskX GPT APFS NewName 0b


  • Boot Records
    • GPT (GUID Partition Table)
    • MBR (Master Boot Record)
  • Filesystems
    • APFS (Apple File System -- beta in Sierra 10.12.1)
    • ExFAT
    • FAT32
    • HFS+ (Apple HFS+)

Locked files or folders

Look at the current flags:

$ ls -lO /path/to/folder

Unlock them with:

$ chflags nouchg /path/to/locked/folder

or with:

$ SetFile -a l /path/to/locked/folder



The ftp and telnet are no longer included with macOS, but can be installed with Brew.

$ brew install inetutils

Resize a sparse bundle

Unmount the image, and follow commands below.

Compact the image (size stays the same).

hdiutil compact filename.sparsebundle

Increase the size of the image (e.g. 8G to 12G).

hdiutil resize -size 12G filename.sparsebundle

Paragraph Sorting Service

  1. Open Automator.
  2. Create a new "Service" workflow.
  3. Configure workflow. a. Service receives selected > text b. in > any application c. check < Replaces selected text 4.

Disable the Swoosh animation for Mac OS X Spaces

macOS [10.12)

System Preferences > Accessibility > Display > Reduce motion

macOS (10.11]

$ defaults write \
   workspaces-swoosh-animation-off \
   -bool YES &&
   killall Dock

Change screen capture behavior.

Disable shadow on screen capture.

$ defaults write disable-shadow -bool TRUE
$ killall SystemUIServer

Change the location of screen captures.

$ defaults write location ~/Pictures/Screenshots

Change the prefix of the screen capture filename.

$ defaults write name "Pretty Picture"
$ killall SystemUIServer

Take a screen capture as PDF (PNG is default).

$ defaults write type pdf

(En|Dis)able Bonjour Announcements (10.5+)


$ sudo launchctl unload -w /System/Library/LaunchDaemons/


$ sudo launchctl load -w /System/Library/LaunchDaemons/

To leave it enabled, but not announce things via multicast DNS, edit the plist and add this line to the mDNSResponder options.


Time Machine

Change backup frequency (10.5+)

Edit /System/Library/LaunchDaemons/ and update the StartInterval setting. 3600[s] is 1h.

Cron'd stuff

See entry at Oct 19, '10 08:03:30PM in


Sleep machine from command-line (10.5+)

$ pmset sleepnow


See 'man pmset' for more info. For 10.4 and prior, see

Figure out why machine isn't sleeping.

$ pmset -g assertions

Log sleep/wake messages

$ pmset -g pslog

View the logs later

$ pmset -g

(En|Dis)able swap


$ sudo launchctl unload -w /System/Library/LaunchDaemons/
$ sudo rm /private/var/vm/swapfile*


$ sudo launchctl load -w /System/Library/LaunchDaemons/


Get SMART status from the command-line

# diskutil list
# diskutil info diskX |grep SMART


Performance Tuning the Network Stack Mac OS X

Versions: [10.5-10.8)

Put data into /etc/sysctl.conf.


Change these values for [10.8)


# Enable support for 9000+ byte packets.

(old) Recommended values for /etc/sysctl.conf.

key default recommended notes
net.inet.tcp.mssdflt 512 1440
net.inet.tcp.win_scale_factor 3 10
net.inet.tcp.sendspace 65536 2097152 1/2 of kern.ipc.maxsockbuf
net.inet.tcp.recvspace 65536 2097152 1/2 of kern.ipc.maxsockbuf


Check status of Spotlight

# mdutil -s /

Enable Spotlight

# mdutil -i on /

Rebuilt database

# mdutil -E /

Restart Finder from the Terminal

Kill Finder

$ sudo killall Finder

Manually start if it doesn't automatically

$ open /System/Library/CoreServices/

If all else fails, reboot

$ shutdown -r

Extract contents of a Payload file

These are basically compressed cpio files.

$ cat Payload |gzip -d |cpio -id


List apps allowed/blocked by firewall.

$ sudo /usr/libexec/ApplicationFirewall/socketfilterfw --listapps

dtrace and other scripts

Power management

Get history of power management events

$ pmset -g log |less

Icon sets

Create PNG files.

Filename Image Size (in pixels)
icon_512x512@2x.png 1024 x 1024
icon_512x512.png 512 x 512
icon_256x256@2x.png 512 x 512
icon_256x256.png 256 x 256
icon_128x128@2x.png 256 x 256
icon_128x128.png 128 x 128
icon_32x32@2x.png 64 x 64
icon_32x32.png 32 x 32
icon_16x16@2x.png 32 x 32
icon_16x16.png 16 x 16

Create an myicon.iconset folder, and put all files in that folder.

Create a myicon.icns file.

$ iconutil -c icns /path/to/myicon.iconset

Get info about the drive / file, and copy the myicon.icns file over the drive icon of the file.

Kill parentalcontrolsd regularly

Create the following plist as /Library/LaunchDaemons/com.forestent.noparentalcontrolsd with root as owner.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">






Load the plist.

$ sudo launchctl load /Library/LaunchDaemons/com.forestent.noparentalcontrolsd

Install a package from the command-line

Use /usr/sbin/installer.

$ sudo installer -pkg /path/to/package.pkg -target /
sudo installer -pkg macOSUpd10.14.3.pkg -target / -verboseR -dumplog 2>&1 |tee ~/var/log/macOSUpd10.14.3.log

Upgrade software from the command-line

Use softwareupdate.

$ softwareupdate -l
Software Update Tool

Fining available software

If the updater is hitting problems, e.g. unable to contact update servers, consider resetting the catalogs. (Was needed for 10.14.3 at Google.)

sudo softwareupdate --clear-catalog

Change visibility of hidden folders

Use /usr/bin/chflags.

$ chflags nohidden ~/Library

Force RGB Mode (a.k.a. fix horrible fonts)

Misc. Utilities

Expansion Slot Utility

The utility is located in /System/Library/CoreServices and is used to configure the performance of the PCI slots.



Get the current settings

$ pmset -g
System-wide power settings:
Currently in use:
 standby              1
 Sleep On Power Button 1
 womp                 0
 autorestart          0
 hibernatefile        /var/vm/sleepimage
 powernap             1
 gpuswitch            2
 networkoversleep     0
 disksleep            10
 sleep                60 (sleep prevented by backupd, AddressBookSourceSync, nsurlsessiond, nsurlsessiond, nsurlsessiond, nsurlsessiond, nsurlsessiond)
 autopoweroffdelay    28800
 hibernatemode        0
 autopoweroff         1
 ttyskeepawake        1
 displaysleep         60
 standbydelay         10800


This is the reason my 2013 Mac Pro wakes so slowly from sleep each morning.

autopoweroff is enabled by default on supported platforms as an implementation of Lot 6 to the European Energy-related Products Directive. After sleeping for autopoweroffdelay seconds, the system will write a hibernation image and go into a lower power chipset sleep. Wakeups from this state will take longer than wakeups from regular sleep.


Utility to precisely modify the security settings on Apple Silicon Macs


This makes requests to each and every time an app is opened. Ugh.


Previous shutdown cause

Look at the log on the command-line, and compare to documented causes can be found on this blog.

$ log show --predicate 'eventMessage contains "Previous shutdown cause:"'
Skipping info and debug messages, pass --info and/or --debug to include.
Filtering the log data using "eventMessage CONTAINS "Previous shutdown cause:""
Timestamp                       Thread     Type        Activity             PID
2017-11-30 17:12:25.019394+0100 0x379      Default     0x0                  0      kernel: (AppleSMC) Previous shutdown cause: 3
2017-12-06 18:16:46.306853+0100 0x3ff      Default     0x0                  0      kernel: (AppleSMC) Previous shutdown cause: 5
Log      - Default:          2, Info:                0, Debug:             0, Error:          0, Fault:          0
Activity - Create:           0, Transition:          0, Actions:           0

Mouse Lag

Try turning off the mouse, removing it from the Bluetooth preferences window, and repairing the device.

On the Mac Pro (Late 2013) model, Wi-Fi seems to interfere with the Bluetooth signal such that the mouse lags. Disable Wi-Fi if possible, or use a hardwired mouse.

DNS resolution

Get dump of resolvers

$ scutil --dns

Reset DNS cache

OS X <= 10.9.* && >= 10.10.4

$ sudo killall -HUP mDNSResponder

OS X 10.10.0 - 10.10.3

$ sudo discoveryutil mdnsflushcache

Finder -- "File is damaged"

Finder is reporting "File is damaged" and "Move to Trash" or "Unmount disk". If you know the file is fine, remove the quarantine xattr, and try again.

$ xattr -d /path/to/file

Cannot verify installer

Installers downloaded before Feb 14 2016 will not validate because the certificate used to sign the installer expired. To work around the issue, quit out of the installer, set the date back, and rerun the installer.

$ date 0201010116

Alternatively, a newer version of the installer can be downloaded. Unfortunately, older OS X installs won't be available, so the date method must be used.

Look at available Wi-Fi networks

Scan for network BSSIDs.

/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport scan
                            SSID BSSID             RSSI CHANNEL HT CC SECURITY (auth/unicast/group)
                         Valerie c0:25:06:cf:0c:d3 -78  100,+1  Y  DE WPA2(PSK/AES/AES)
                         Valerie c0:25:06:cf:0c:d7 -69  11      Y  DE WPA2(PSK/AES/AES)

For <=10.6 use a different command.

/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport --associate=XXX --bssid=YYY

Downgrade from High Sierra to Sierra

Technically, a downgrade isn't possible from backup :-(

Erase a disk with the MacOS Extended (Journaled) format, with a name of Untitled.

Create install media, using /Volume/Untitled as destination volume.

  • The volume will again be erased, so it is OK to use the old volume name.
  • The --applicationpath must be the fully qualified path.
$ sudo /Applications/Install\ macOS\ High\ \
  --volume /Volumes/Untitled \
  --applicationpath "/Applications/Install macOS"
Ready to start.
To continue we need to erase the disk at /Volumes/Untitled.
If you wish to continue type (Y) then press return: y
Erasing Disk: 0%... 10%... 20%... 30%...100%...
Copying installer files to disk...
Copy complete.
Making disk bootable...
Copying boot files...
Copy complete.

Adjust macOS font smoothing

Font smoothing

Display the current font smoothing:

$ defaults -currentHost read -globalDomain AppleFontSmoothing

Change the font smoothing (0=off, 1=light, 2=Medium/flat panel, 3=strong/blurred) This is mostly needed for non-Apple displays. Restart applications to see the effect

$ defaults -currentHost write -globalDomain AppleFontSmoothing -int 0

Delete the setting completely (restore default)

$ defaults -currentHost delete -globalDomain AppleFontSmoothing

Set the font anti-aliasing minimum sizes, globally or per-application:

$ defaults -currentHost write .GlobalPreferences AppleSmoothFontsSizeThreshold -int 16
$ defaults -currentHost write .GlobalPreferences AppleFontSmoothing -int 0
$ defaults -currentHost write AppleAntiAliasingThreshold -int 16


Read the current value.

$ defaults read NSGlobalDomain AppleAntiAliasingThreshold

The anti-aliasing can be configured per application. (

$ defaults -currentHost write AppleAntiAliasingThreshold -int 16


Commands looking at profile enrollment at work.

Profile enrollment of some sort?

$ profiles status -type enrollment
$ sudo profiles list
_computerlevel[1] attribute: profileIdentifier:
_computerlevel[2] attribute: profileIdentifier:
_computerlevel[3] attribute: profileIdentifier:
_computerlevel[4] attribute: profileIdentifier:
_computerlevel[5] attribute: profileIdentifier:
_computerlevel[6] attribute: profileIdentifier:
_computerlevel[7] attribute: profileIdentifier:
_computerlevel[8] attribute: profileIdentifier:
_computerlevel[9] attribute: profileIdentifier:
_computerlevel[10] attribute: profileIdentifier:
_computerlevel[11] attribute: profileIdentifier:
_computerlevel[12] attribute: profileIdentifier:
_computerlevel[13] attribute: profileIdentifier:
_computerlevel[14] attribute: profileIdentifier:
_computerlevel[15] attribute: profileIdentifier:
_computerlevel[16] attribute: profileIdentifier:
_computerlevel[17] attribute: profileIdentifier:
There are 17 system configuration profiles installed
$ sudo profiles show -type enrollment
Device Enrollment configuration:
    AllowPairing = 1;
    AwaitDeviceConfigured = 1;
    ConfigurationURL = "";
    IsMDMUnremovable = 0;
    IsMandatory = 1;
    IsSupervised = 1;
    OrganizationAddress = "1600 Amphitheatre Parkway, n/a, , Mountain VIew, CA 94043";
    OrganizationAddressLine1 = "1600 Amphitheatre Parkway";
    OrganizationAddressLine2 = "n/a";
    OrganizationCity = "Mountain VIew";
    OrganizationCountry = USA;
    OrganizationEmail = "";
    OrganizationName = "Google LLC";
    OrganizationPhone = 12125658743;
    OrganizationZipCode = 94043;
    SkipSetup =     (

Kernel extensions

Get list of approved kernel extensions (e.g. TripMode and Intel Power).

$ echo 'select * from kext_policy; ' | sudo sqlite3 /var/db/SystemPolicyConfiguration/KextPolicy
78UFGP42EU|ch.tripmode.TripModeNKE|1|Ludovic LEGER|1
Z3L495V9L4||1|Intel Corporation Apps|1
$ echo 'select * from kext_policy_mdm;' | sudo sqlite3 /var/db/SystemPolicyConfiguration/KextPolicy
$ cat /var/db/ConfigurationProfiles/Settings/.cloudConfigRecordFound
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">

Code signing

Get code signing information about an app.

$ codesign -dvv /Applications/ESET\ Endpoint\
Executable=/Applications/ESET Endpoint
Format=bundle with Mach-O thin (x86_64)
CodeDirectory v=20200 size=759 flags=0x0(none) hashes=18+3 location=embedded
Signature size=9055
Authority=Developer ID Application: ESET, spol. s r.o. (P8DQRXPVLP)
Authority=Developer ID Certification Authority
Authority=Apple Root CA
Timestamp=22 Aug 2018 at 19:39:32
Info.plist entries=19
Sealed Resources version=2 rules=13 files=1
Internal requirements count=1 size=36


The new MacBook Pro machine chimes when it gets power. Annoying??

Set static route, and make persistent on boot

In the example below I assume the Ethernet router has the IP and the network behind the router is the network.

sudo route add -net

To make this route persistent add a launch daemon on your machines:

sudo nano /Library/LaunchDaemons/local.staticroute.shares.plist

with the content

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">

Save the file (Ctrl-O) and quit Nano (Ctrl-X).

Load the launch daemon with:

sudo launchctl load -w /Library/LaunchDaemons/local.staticroute.shares.plist

To access the shares enter afp://192.168.56.x, cifs://192.168.56.x or smb://192.168.56.x (with x= the last octet of the IP address of the share).

Open System Preferences as root

sudo /System/Applications/System\\ Preferences

macOS Big Sur

Change the menu bar date/time format

Update the format using Terminal.

defaults write DateFormat -string "EEE d MMM h:mm a"

My prefered version of the command. NOTE: spaces aren't needed.

defaults write DateFormat -string "EMdhhmmss"

System Extensions

Get list of loaded extensions.

$ kmutil showloaded

Get list of loaded auxillary extensions.

$ kmutil showloaded --collection auxiliary

macOS Catalina

Remove "default interactive" warning for bash.

macOS Catalina ships with zsh as the default shell for licensing reasons. To notify users, a warning is presented each time a bash interactive shell is started.

The default interactive shell is now zsh.
To update your account to use zsh, please run `chsh -s /bin/zsh`.
For more details, please visit

To disable the warning, add this to ~/.bash_profile or equivalent.