Skip to content

Instantly share code, notes, and snippets.

@Vitawt-The-Duke
Forked from dan-palmer/swap-commands.txt
Created June 24, 2024 15:56
Show Gist options
  • Save Vitawt-The-Duke/6ce9142cacf9f04d4980e76d2261dfc8 to your computer and use it in GitHub Desktop.
Save Vitawt-The-Duke/6ce9142cacf9f04d4980e76d2261dfc8 to your computer and use it in GitHub Desktop.
Enable Disable OSX Swap etc
# check swap usage
sysctl vm.swapusage
# disable encrypted swap - SNOW LEOPARD
sudo defaults write /Library/Preferences/com.apple.virtualMemory UseEncryptedSwap -boolean no
# disable encrypted swap - LION
sudo defaults write /Library/Preferences/com.apple.virtualMemory DisableEncryptedSwap -boolean yes
# disable swap
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dynamic_pager.plist
sudo rm /private/var/vm/swapfile*
# enable swap
sudo launchctl load -wF /System/Library/LaunchDaemons/com.apple.dynamic_pager.plist
# disable spotlight
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist
# enable spotlight
sudo launchctl load -wF /System/Library/LaunchDaemons/com.apple.metadata.mds.plist
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment