Skip to content

Instantly share code, notes, and snippets.

@smuda
Last active December 1, 2018 12:37
Show Gist options
  • Save smuda/6a724c2979d7b70a21bcc5d8012b7c79 to your computer and use it in GitHub Desktop.
Save smuda/6a724c2979d7b70a21bcc5d8012b7c79 to your computer and use it in GitHub Desktop.
Commands to run on a new Mac
# Disable creating '.ds_store' on USB volumes
defaults write com.apple.desktopservices DSDontWriteUSBStores -bool true
# Disable creating '.ds_store' on network volumes
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true
# Destroy vault keys on standby
sudo pmset destroyfvkeyonstandby 1
# Disable guest account
sudo /usr/bin/defaults write /Library/Preferences/com.apple.loginwindow GuestEnabled -bool NO
sudo /usr/bin/defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server AllowGuestAccess -bool NO
sudo /usr/bin/defaults write /Library/Preferences/com.apple.AppleFileServer guestAccess -bool NO
# Power off memory during standy
sudo pmset hibernatemode 25
# Save to Disk by Default, not iCloud
defaults write NSGlobalDomain NSDocumentSaveNewDocumentsToCloud -bool false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment