Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  1. Remaining Battery Percentage
  2.  
  3. pmset -g batt | egrep "([0-9]+\%).*" -o --colour=auto | cut -f1 -d';'
  4. Remaining Battery Time
  5.  
  6. pmset -g batt | egrep "([0-9]+\%).*" -o --colour=auto | cut -f3 -d';'
  7.  
  8. Prevent sleep for 1 hour:
  9.  
  10. caffeinate -u -t 3600
  11.  
  12. Show All Power Management Settings
  13.  
  14. sudo pmset -g
  15.  
  16. Put Display to Sleep after 15 Minutes of Inactivity
  17.  
  18. sudo pmset displaysleep 15
  19. Put Computer to Sleep after 30 Minutes of Inactivity
  20.  
  21. sudo pmset sleep 30
  22. Check System Sleep Idle Time
  23.  
  24. sudo systemsetup -getcomputersleep
  25. Set System Sleep Idle Time to 60 Minutes
  26.  
  27. sudo systemsetup -setcomputersleep 60
  28. Turn Off System Sleep Completelyhh
  29.  
  30. sudo systemsetup -setcomputersleep Never
  31.  
  32. sudo scutil --set ComputerName "newhostname" && \
  33. sudo scutil --set HostName "newhostname" && \
  34. sudo scutil --set LocalHostName "newhostname" && \
  35. sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server NetBIOSName -string "newhostname"
  36.  
  37. SSH
  38.  
  39. Remote Login
  40.  
  41. # Enable remote login
  42. sudo launchctl load -w /System/Library/LaunchDaemons/ssh.plist
  43.  
  44. # Disable remote login
  45. sudo launchctl unload -w /System/Library/LaunchDaemons/ssh.plist
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement