Mac 系统常用配置优化
系统配置优化:
触摸板优化,开启请按点击功能(个人没开,一些刚转过来的新用户喜欢打开)
defaults write com.apple.AppleMultitouchTrackpad Clicking -int 1 defaults -currentHost write NSGlobalDomain com.apple.mouse.tapBehavior -int 1 defaults write NSGlobalDomain com.apple.mouse.tapBehavior -int 1 # 开启三指拖拽 defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadThreeFingerDrag -bool true defaults write com.apple.AppleMultitouchTrackpad TrackpadThreeFingerDrag -bool true
2. 将 f1-f12用作标准功能键
defaults write -globalDomain com.apple.keyboard.fnState -int 1
3. 关闭 SIP
重启,开机立即按住 cmd+r 进入恢复模式,使用工具->终端,执行以下代码:
csrutil disable
4. 关闭第三方程序验证
我们基本上都会用到破解版或个人开发版应用,此时直接打开很可能被系统拒绝,或者直接报错,或者弹出各种授权弹框,可以执行以下命令关闭这保护机制:
sudo spctl --master-disable defaults write com.apple.LaunchServices LSQuarantine -bool false
5. 关闭镜像验证
在打开.dmg 格式软件安装包的时候,默认会先验证镜像文件,如果文件本身过大 你那么是非常耗时的,可以输入以下命令来直接关闭:
defaults write com.apple.frameworks.diskimages skip-verify -bool true defaults write com.apple.frameworks.diskimages skip-verify-locked -bool true defaults write com.apple.frameworks.diskimages skip-verify-remote -bool true
6. 完全键盘控制
很多操作的时候会弹出系统对话框,要求我们确认或取消,如果没有开启完全键盘控制我们只能按回车键确认,或者移动鼠标选择取消,当然如果你是 macbook 就完全不需要开启此功能
defaults write NSGlobalDomain AppleKeyboardUIMode -int 3
7. Finder 预览增强
此功能需要预先安装 brew
brew cask install qlcolorcode qlgradle qlmarkdown qlstephen qlvideo quicklook-json quicklookapk webpquicklook
8. 安装 brew
这是一个第三方包管理
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
9. brew 换源
# 替换brew.git: cd "$(brew --repo)" git remote set-url origin https://mirrors.aliyun.com/homebrew/brew.git # 替换homebrew-core.git: cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core" git remote set-url origin https://mirrors.aliyun.com/homebrew/homebrew-core.git # 应用生效 brew update # 替换homebrew-bottles: echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.aliyun.com/homebrew/homebrew-bottles' >> ~/.bash_profile source ~/.bash_profile
10. Oh My Zsh
Oh My Zsh is a delightful, open source, community-driven framework for managing your Zsh configuration. It comes bundled with thousands of helpful functions, helpers, plugins, themes, and a few things that make you shout...
简单的说就是对终端极大的增强
brew install zsh sh -c "$(wget https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
11. macOS 时光机器备份加速命令
时光机器是 mac 上的又一大神器,可以完全备份当前系统文件,但是有时候备份非常的慢,可以尝试输入以下指令:
sudo sysctl debug.lowpri_throttle_enabled=0
12. 开启显示和隐藏文件选项
# 显示隐藏文件 defaults write com.apple.finder AppleShowAllFiles -bool true
# 不显示隐藏文件 defaults write com.apple.finder AppleShowAllFiles -bool false
# 重启 Finder 后生效 killall Finder
13. 关闭系统更新红点
对于不想更新系统的用户或者黑苹果用户,红点的存在可能会让人很难受,下面一行代码解决:
defaults write com.apple.systempreferences AttentionPrefBundleIDs 0
如果小红点还没消失,输入:
killall Dock
一般来说,这样就 ok 了 如果还是不行那就用这个:
sudo defaults write /Library/Preferences/com.apple.SoftwareUpdate.plist LastUpdatesAvailable 0 sudo defaults write /Library/Preferences/com.apple.SoftwareUpdate.plist LastRecommendedUpdatesAvailable 0 sudo defaults delete /Library/Preferences/com.apple.SoftwareUpdate.plist RecommendedUpdates
评论