xiaocrab.net 中文

macOS 常用系統設置命令

2018-11-04 · 2 min read
Apple

macOS 系統設置除了打開「系統偏好設定」進行設置之外,還有一部分系統設置只能採用執行命令操作來完成。本文主要介紹常用的採用命令對系統設置的操作。

  • 允許任何來源的軟件運行
sudo spctl --master-disable
  • 開啟 apt-X
sudo defaults write bluetoothaudiod "Enable AptX codec" -bool true
  • 關閉 apt-X
sudo defaults write bluetoothaudiod "Enable AAC codec" -bool true
  • 顯示隱藏文件(重啟 Finder 生效)
defaults write com.apple.finder AppleShowAllFiles -bool true
  • 調整鼠標捲動方向
    系統偏好設定-滑鼠-取消勾選「捲動方向:自然」

  • 啟用次像素抗鋸齒渲染

defaults write -g CGFontRenderingFontSmoothingDisabled -bool NO
  • 淺色字體平滑
defaults -currentHost write -globalDomain AppleFontSmoothing -int 1 
  • 中等字體平滑
defaults -currentHost write -globalDomain AppleFontSmoothing -int 2 
  • 重字體平滑
defaults -currentHost write -globalDomain AppleFontSmoothing -int 3 
  • 沒有字體平滑
defaults -currentHost write -globalDomain AppleFontSmoothing -int 0 
  • 查看字體渲染設置
defaults read -g CGFontRenderingFontSmoothingDisabled
defaults -currentHost read -globalDomain AppleFontSmoothing