Mac Commands

Enable remote management

sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -access -on -users admin -privs -all -restart -agent -menu

Enable other remote management options

sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart –help

Wake up Screen

/usr/bin/caffeinate -u -t 1

Force enable TRIM on non apple-branded SSDs

sudo trimforce enable

Transfer Profiles

sudo profiles renew -type enrollment

Remove Sleep from Apple Menu

sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.PowerManagement SystemPowerSettings -dict SleepDisabled -bool YES

Add Sleep to Apple Menu

sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.PowerManagement SystemPowerSettings -dict SleepDisabled -bool NO

Restart Computer

sudo shutdown -r now

Restart Computer at specific time

sudo shutdown -r hhmm


Diskutil Commands

List disks

Diskutil list

Shrink 250gb Partition to leave room for overprovisioning and SSD

Diskutil resizevolume disk0s2 224g

Grow disk to full size

Diskutil resizevolume disk1s2 0g

Core Storage disks get resized differently

Diskutil cs resizestack / 224g


This page is maintained by Jason Jones  /  Last Updated: Friday, August 14, 2020