Skip to content

Instantly share code, notes, and snippets.

@melMass
Last active April 19, 2023 18:05
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save melMass/10b7aea78c3bf212befe1478bf72dc07 to your computer and use it in GitHub Desktop.
OSX cheatsheet

Boot

Boot in recovery

sudo nvram "recovery-boot-mode=unused" && sudo reboot recovery

Boot in Internet Recovery

  • Shift +Option + Cmd + R equivalent:
    sudo nvram internet-recovery-mode=RecoveryModeNetwork
  • Cmd + R equivalent:
    sudo nvram internet-recovery-mode=RecoveryModeDisk
  • D equivalent (aka local Hardware Diagnostics):
    sudo nvram internet-recovery-mode=DiagsModeDisk 
  • Option + D equivalent (aka internet Hardware Diagnostics):
    sudo nvram internet-recovery-mode=DiagsModeNetwork 

Show startup manager on boot

sudo nvram manufacturing-enter-picker=true

Power Managment (pmset)

Print the current configuration

sudo pmset -g live

Schedule computer to automatically wake up every weekday at 9 AM

sudo pmset repeat wake MTWRF 09:00:00

Restore to system defaults

sudo pmset -a displaysleep 10 disksleep 10 sleep 30 womp 1

Put only display to sleep

pmset displaysleepnow

System Query

Print the hardware informations, UUID and BootROM version

system_profiler SPHardwareDataType
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment