《macOS 常见问题与技巧》
记录 macOS 使用中的高频小问题与小技巧:禁用自带 httpd、关闭邮箱提示、触控板、输入法等。
1 禁用/启用 macOS 自带 httpd
macOS 自带 Apache(httpd),占用 80 端口时需关闭:
# 禁用
sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist
# 启用
sudo launchctl load -w /System/Library/LaunchDaemons/org.apache.httpd.plist
# 立即停止服务
sudo /usr/sbin/apachectl -k stop
2 关闭 “You have mail in” 提示
在 ~/.bashrc 或 ~/.zshrc 中取消 MAILCHECK:
unset MAILCHECK
3 触控板:三指查询
三指轻点触控板可以快速查词(如翻译英文)——系统偏好设置中开启查找与数据检测器。
系统设置 → 触控板 → 查询与数据检测器 → 三指轻点
4 切换默认输入法
以搜狗输入法为默认:
系统设置 → 语言与地区 → 移除英文输入法(点击 “-”)
系统设置 → 键盘 → 输入法,将搜狗排在第一位
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
出于安全考虑,尽量从官方渠道下载 dmg,本项请按需开启。
6 常用命令行工具
macOS 缺少 Linux 的 ip/readlink,可用 Homebrew 补齐:
# ip 命令(iproute2mac),用法与 Linux ip 基本一致
brew install iproute2mac
ip addr
ip route
# greadlink:模拟 Linux readlink
brew install coreutils # 提供 greadlink 等 GNU 命令前缀工具
7 常用软件下载渠道
- 软件站注意版权:优先官方站或 App Store,其次正规软件下载平台。
阅读 —
·
全站 —