Skip to content

Instantly share code, notes, and snippets.

@huiyonghkw
Last active March 31, 2017 16:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save huiyonghkw/3c8b2f95c60b83525173a153c4073018 to your computer and use it in GitHub Desktop.
Save huiyonghkw/3c8b2f95c60b83525173a153c4073018 to your computer and use it in GitHub Desktop.
macOS/Linux commands
# brew service list
brew services list
# macOS 查看TCP端口
lsof -nP -iTCP -sTCP:LISTEN
安装macOS Sierra后,会发现系统偏好设置的“安全与隐私”中默认已经去除了允许“任何来源”App的选项,无法运行一些第三方应用。
如果需要恢复允许“任何来源”的选项,即关闭Gatekeeper,请在终端中使用spctl命令:
sudo spctl --master-disable
输入密码后回车
久违的“任何来源”回来了
# clear the local DNS cache on macOS Sierra 10.12.0
sudo killall -HUP mDNSResponder
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment