Mac OS Commands

Table of Contents

Some Mac OS commands.

Play audio file

1
afplay <file>

Plist content

1
plutil -p <file>

Launch Control

1
2
3
launchctl list # List services
launchctl load <plist file> # Start service
launchctl unload <plist file> # Stop service

System Service Location

  • /Library/LaunchDaemons/
  • /System/Library/LaunchDaemons/

Change Hostname

1
sudo scutil --set HostName <hostname>

Mouse Speed

  • Get Current
1
defaults read -g com.apple.mouse.scaling
  • Set New value
1
defaults write -g com.apple.mouse.scaling your_mouse_speed

May need reboot.

dns-sd(mdns)

Get address of hostname

1
dns-sd -G v4v6 <hostname>

Kernel Extension

  • List all kernel extension
1
kextstat
  • List all non-Apple extension
1
kextstat | grep -v com.apple

Safe Mode

Boot and hold Shift during boot.

Using command line:

1
2
sudo nvram boot-args="-x"
sudo nvram boot-args="-x -v"

Change back to normal:

1
sudo nvram boot-args=""
John Siu
Minimize the Effort, Maximize the Effect!
comments powered by Disqus