MacOS tips

Created on Sun, 06 Oct 11:32AM

Last changed on 2023-01-27 20:37:24

Restart mac network with specific interface

sudo ifconfig en7 down
sudo ifconfig en7 up

Preventing slee when close the lid

# 禁止自动睡眠
sudo pmset -b sleep 0; sudo pmset -b disablesleep 1
# 恢复关盖睡眠
sudo pmset -b sleep 5; sudo pmset -b disablesleep 0

Sudo with Touch ID

# /etc/pam.d/sudo
sudo gsed -i '1aauth	   sufficient 	  pam_tid.so' /etc/pam.d/sudo
sudo sed -i '' -e '1a\
auth       sufficient     pam_tid.so' /etc/pam.d/sudo #sudo touch id

Check listen port

Nmap or nc check

iTerm2 zmodem

Git user base on remote url

MacOS remove quarantine

Other assets

Last updated

Was this helpful?