User Tools

Site Tools


Mac OS Tricks

Change the hostname

sudo scutil --set HostName testhostname.local

Create a bootable OS X USB installation disk

sudo /Applications/Install\ OS\ X\ --volume /Volumes/Untitled --applicationpath /Applications/Install\ OS\ X\ --nointeraction

F11 on a Mac for ESX Installs

  * Fn+Ctrl+option+F11
  * Or Go into the Mission Control settings and set 'Show Desktop' to be any other F- key besides F11. Go into the keyboard settings and check the box that says 'Use all F1, F2, etc. keys as standard function keys.
  * Or if you are using VMware Fusion, you can send key using Virtual Machine -> Send Key -> F11.

Install Homebrew

ruby -e "$(curl -fsSL"
brew doctor
brew update

Mount from directory to directory

brew install bindfs
# brew install pkg-config if needed
bindfs <src_directory> <dest_directory>

Install useful unix utility ssh-copy-id

curl -L | sh

Schedule tasks in Mac OS X

cat >> ~/me.hackerzhou.backup.plist <<EOF
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "">
<plist version="1.0">
sudo cp /Users/hackerzhou/me.hackerzhou.backup.plist /Library/LaunchDaemons/
sudo launchctl load /Library/LaunchDaemons/me.hackerzhou.backup.plist

Use Time Machine via NFS
dev/tricks/macos.txt · Last modified: 2020/06/06 19:32 (external edit)