跳至主要內容

Mac常用软件

大约 2 分钟

Mac常用软件

名称功能下载
Syntax Highlight快捷预览SourceCodeSyntaxHighlightopen in new window
brew install --cask syntax-highlight
Cursor代码提示https://www.cursor.so/open in new window
Android File Transfer文件管理https://www.android.com/filetransfer/open in new window
Synergy键鼠控制https://symless.com/synergyopen in new window
MASMac App Storebrew install mas
终端上的Mac App Store「mas」让应用的安装与更新无比轻松open in new window
ohmyzshshell 增强https://github.com/ohmyzsh/ohmyzshopen in new window
MountyNTFS读取brew cask install mounty
Mounty for NTFSopen in new window

ohmyzsh

sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

环境配置

加载顺序

bash

/etc/profile,/etc/bashrc,/etc/paths,/etc/paths.d/,~/.bash_profile

zsh

/etc/profile,/etc/zshrc,/etc/paths,/etc/paths.d/,~/.zshrc

查看配置

PATH echo $PATH

我的配置

# Go
# GOROOT=/usr/local/Cellar/go/1.12/libexec
# export GOROOT=/usr/local/Cellar/go/1.12/libexec
# export GOPATH=~/go
# export GOBIN=$GOPATH/bin
# export PATH=$PATH:$GOBIN:$GOROOT/bin
# 禁用homebrew自动更新
export HOMEBREW_NO_AUTO_UPDATE=1
export HOMEBREW_NO_INSTALL_CLEANUP=1
export PATH=/usr/local/sbin:$PATH


# export JAVA_HOME=/Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home
# export JAVA_HOME=~/Library/Java/JavaVirtualMachines/corretto-1.8.0_362/Contents/Home
export JAVA_HOME=~/Library/Java/JavaVirtualMachines/corretto-11.0.18/Contents/Home
# export JAVA_HOME=~/Library/Java/JavaVirtualMachines/corretto-17.0.6/Contents/Home
# export JAVA_HOME=~/Library/Java/JavaVirtualMachines/openjdk-19.0.2/Contents/Home
export CLASSPATH=$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export PATH=$JAVA_HOME/bin:$PATH
export GRADLE_USER_HOME=~/.gradle

# Android
export ANDROID_HOME=~/Library/Android/sdk
# export ANDROID_SDK_ROOT=~/.android
export PATH=$PATH:$GRADLE_USER_HOME/shell/bin:$ANDROID_HOME/tools:$ANDROID_HOME/tools/bin:$ANDROID_HOME/platform-tools:$JAVA_HOME/bin:$JAVA_HOME/jre/bin

# Flutter
export PUB_CACHE=~/.pub-cache
export PUB_HOSTED_URL=https://pub.flutter-io.cn
export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn
export FLUTTER_HOME=~/Library/flutter
export FLUTTER_ROOT=$FLUTTER_HOME
export DART_HOME=$FLUTTER_HOME/bin/cache/dart-sdk
export PATH=$PATH:$FLUTTER_HOME/bin:$DART_HOME/bin:$HOME/.pub-cache/bin

alias idea-ce="open -a /Applications/IntelliJ\ IDEA\ CE.app"

压缩解压

# 压缩 tar.gz | tgz
# 命令前添加 COPYFILE_DISABLE=1 
tar --exclude '.DS_Store' --exclude '__MACOSX' -cvzf xxxarchive.tar.gz xxxarchive
# 解压
tar -xvf xxxarchive.tar.gz

输入法

RIME | 中州韵输入法引擎open in new window

Mac 鼠须管 Squirrelopen in new window

Win 小狼毫 Weaselopen in new window

Linux fcitx-rimeopen in new windowibus-rimeopen in new window

Android 同文 Tongwenopen in new window

在线 My RIMEopen in new window

文件备份

文件备份还能怎么玩?试试这条命令open in new window

# rsync -av [源文件夹路径] [备份路径]
# rsync -av [源文件夹路径] [备份路径] --delete

添加Mac的Time Machine备份到smb网络硬盘(windows 共享文件夹)open in new window

sudo tmutil setdestination -p /Volumes/backup/

下载

除了会员,别无选择?6 款 Mac 下载工具帮你加速open in new window

Folx 5FDMLeech 3uTorrentTransmissionAria2

Dnsmasq

brew install dnsmasq
vim /usr/local/etc/resolv.dnsmasq.conf
vim /usr/local/etc/dnsmasq.conf
# /usr/local/etc/dnsmasq.d/*
# 清除DNS缓存
sudo killall -HUP mDNSResponder
# 重启
sudo brew services stop dnsmasq
sudo brew services start dnsmasq
sudo launchctl stop homebrew.mxcl.dnsmasq
sudo launchctl start homebrew.mxcl.dnsmasq

自定义解析

/usr/local/etc/dnsmasq.d/my.address.conf

# 加速GitHub访问
address=/github.com/192.30.253.112
address=/github.com/192.30.253.113

ipaddress ip-lookupopen in new window
dnsmasq-china-listopen in new window
利用Dnsmasq 部署DNS 服务- 运维之美open in new window
Mac上用dnsmasq配置DNS服务器open in new window

预览增强

增强 Mac「预览」功能(QuickLook)的教程open in new window
QuickLookPlugins.comopen in new window

黑苹果

国光的黑苹果安装教程open in new window

系统历史版本

如何下载和安装 macOSopen in new window

macOS Sonoma 14
macOS Ventura 13open in new window
macOS Monterey 12open in new window

旧版

macos-big-sur 11open in new window
macos-catalina 10.15open in new windowmacos-mojave 10.14open in new window
macos-high-sierra 10.13open in new window
macos-sierra 10.12open in new window
macos-sierra 10.12.dmgopen in new window

参考

如何禁用HomeBrew 自动更新open in new window

macOS/Linux 环境变量设置- 知乎open in new window