Tom's wiki

macOS

Apple's Unix-like OS.

Launchd

https://www.launchd.info

A system and service manager for macOS (like systemd for Linux). Launchd services are called agents (user) and daemons (root). The launchctl command is used to interact with launchd.

Scripting

Key remapping

With hidutil (builtin):

With Karabiner-Elements (3rd party):

Terminal

macOS-only tools:

Gatekeeper

Disable:

⚠️ Warning
Quarantine stores information about downloads by all kinds of applications.

UTI

A Uniform Type Identifier is a unique string describing a file format, e.g. com.microsoft.word.doc for a Microsoft Word documents.

Get the UTI of a file:

mdls -name kMDItemContentType -name kMDItemKind path/to/file

💡 Hint
Use duti to set default applications for document types.

Misc

How to

Authenticate sudo with TouchID:

cd /etc/pam.d
sudo mv sudo_local.template sudo_local
## uncomment the last line

Enable Metal HUD:

launchctl setenv MTL_HUD_ENABLED 1