黑苹果的一些常用操作记录
Easul Lv6

常用图形化软件

命令行软件

安装brew

BASH
1
2
3
4
# 官方安装
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
# 中科大镜像
/usr/bin/ruby -e "$(curl -fsSL https://cdn.jsdelivr.net/gh/ineo6/homebrew-install/install)"

参考

brew修改镜像源

替换为阿里源

BASH
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# 查看 brew.git 当前源
$ cd "$(brew --repo)" && git remote -v
origin https://github.com/Homebrew/brew.git (fetch)
origin https://github.com/Homebrew/brew.git (push)

# 查看 homebrew-core.git 当前源
$ cd "$(brew --repo homebrew/core)" && git remote -v
origin https://github.com/Homebrew/homebrew-core.git (fetch)
origin https://github.com/Homebrew/homebrew-core.git (push)

# 修改 brew.git 为阿里源
$ git -C "$(brew --repo)" remote set-url origin https://mirrors.aliyun.com/homebrew/brew.git

# 修改 homebrew-core.git 为阿里源
$ git -C "$(brew --repo homebrew/core)" remote set-url origin https://mirrors.aliyun.com/homebrew/homebrew-core.git

# zsh 替换 brew bintray 镜像
$ echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.aliyun.com/homebrew/homebrew-bottles' >> ~/.zshrc
$ source ~/.zshrc

# bash 替换 brew bintray 镜像
$ echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.aliyun.com/homebrew/homebrew-bottles' >> ~/.bash_profile
$ source ~/.bash_profile

# 刷新源
$ brew update

替换为清华源

BASH
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# 替换各个源
$ git -C "$(brew --repo)" remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git
$ git -C "$(brew --repo homebrew/core)" remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git
$ git -C "$(brew --repo homebrew/cask)" remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-cask.git

# zsh 替换 brew bintray 镜像
$ echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles' >> ~/.zshrc
$ source ~/.zshrc

# bash 替换 brew bintray 镜像
$ echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles' >> ~/.bash_profile
$ source ~/.bash_profile

# 刷新源
$ brew update

替换为中科大源

BASH
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# 替换各个源
$ git -C "$(brew --repo)" remote set-url origin https://mirrors.ustc.edu.cn/brew.git
$ git -C "$(brew --repo homebrew/core)" remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git
$ git -C "$(brew --repo homebrew/cask)" remote set-url origin https://mirrors.ustc.edu.cn/homebrew-cask.git

# zsh 替换 brew bintray 镜像
$ echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles' >> ~/.zshrc
$ source ~/.zshrc

# bash 替换 brew bintray 镜像
$ echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles' >> ~/.bash_profile
$ source ~/.bash_profile

# 刷新源
$ brew update

换回官方源

BASH
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# 重置 brew.git 为官方源
$ git -C "$(brew --repo)" remote set-url origin https://github.com/Homebrew/brew.git

# 重置 homebrew-core.git 为官方源
$ git -C "$(brew --repo homebrew/core)" remote set-url origin https://github.com/Homebrew/homebrew-core.git

# 重置 homebrew-cask.git 为官方源
$ git -C "$(brew --repo homebrew/cask)" remote set-url origin https://github.com/Homebrew/homebrew-cask

# zsh 注释掉 HOMEBREW_BOTTLE_DOMAIN 配置
$ vi ~/.zshrc
# export HOMEBREW_BOTTLE_DOMAIN=xxxxxxxxx

# bash 注释掉 HOMEBREW_BOTTLE_DOMAIN 配置
$ vi ~/.bash_profile
# export HOMEBREW_BOTTLE_DOMAIN=xxxxxxxxx

# 刷新源
$ brew update

参考

安装txray

BASH
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# 安装wget
brew install wget
# 创建文件夹
mkdir -p ~/software/github && cd ~/software/github
# 进行安装
wget https://github.com/hsernos/Txray/releases/download/v3.0.3/Txray-macos-64.zip
unzip Txray-macos-64.zip
rm -rf Txray-macos-64.zip
mv Txray-macos-64 txray && cd txray
wget https://github.com/XTLS/Xray-core/releases/download/v1.5.2/Xray-macos-64.zip
unzip Xray-macos-64.zip
rm -rf Xray-macos-64.zip
echo "alias txray='/Users/easul/software/github/txray/Txray'" >> ~/.zshrc
source ~/.zshrc

安装ffmpeg

BASH
1
2
3
4
# 开启代理
cmdproxy
# 安装ffmpeg
brew install ffmpeg

添加命令行代理

BASH
1
2
3
echo "'alias cmdproxy='export http_proxy=127.0.0.1:2080 && export https_proxy=127.0.0.1:2080 && export socks5_proxy=127.0.0.1:1080'" >> ~/.zshrc
echo "alias uncmdproxy='unset http_proxy && unset https_proxy && unset socks5_proxy'" >> ~/.zshrc
source ~/.zshrc

edge

关闭Microsoft AutoUpdate

BASH
1
2
3
4
# 打开访达,
# 点击顶部菜单栏的前往=》前往文件夹
# 进入这个目录 /Library/Application Support/Microsoft/
# 然后删除里边的Microsoft AutoUpdate即可

快捷键

默认按键解释

BASH
1
2
3
4
5
6
⌘ (Command 键,即win键)- 在部分 Apple 键盘上,此键也可能印有 Apple 标志 (  ) option+Shift+k
⌃ (Control 键,即ctrl键)
⌥ (Option 键,即alt键)
⇧ (Shift 键)
⇪ (Caps Lock 键)
Fn(功能键)

参考

调换command和control键的位置

BASH
1
2
3
# 系统偏好设置=》键盘=》键盘=》修饰键
# Control换成win键,Command换成Ctrl键
# 可以顺便调节一下按键重复为更快,重复前延迟也更快

输入法调节

BASH
1
2
3
4
5
6
# 系统偏好设置=》键盘=》快捷键=》聚焦
# 改成win + space
# 输入法的上一个输入法
# 改成ctrl + space
# 输入法的下一个输入法
# 改成ctrl + shift + space

截图录屏调节

BASH
1
2
3
4
5
# 系统偏好设置=》键盘=》快捷键=》截屏
# 将所选区域的图片存储为文件
# 改成ctrl + alt + A
# 截屏和录制选项
# 改成ctrl + alt + R

鼠标滚轮调节

BASH
1
# 系统偏好设置=》鼠标=》取消勾选滚动方向

调整后的常用快捷键

YAML
1
程序坞隐藏快捷键: ctrl + alt + D

常用操作

连接ftp

BASH
1
# 访达=》菜单栏的前往=》连接服务器

挂载NTFS到Mac

BASH
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# -----------------------
# 挂载后只能命令行操作、
# -----------------------
# 查看自己的磁盘名,会出现如下的字符串
# 3: Microsoft Basic Data windows 128.3 GB disk0s3
# 可以通过磁盘名称进行判断挂载哪个盘,也可以通过磁盘大小判断挂载哪个盘,磁盘标志就是最后的 disk0s3
diskutil list
# 在用户目录创建目录用于挂载磁盘
mkdir /Users/easul/windowsDisk
# 使用自带的挂载程序将磁盘挂载到刚刚创建的目录,挂载模式为读写
sudo mount_ntfs -o rw,nobrowse /dev/disk0s3 /Users/easul/windowsDisk
# 取消挂载
sudo umount /dev/disk0s3
# 接着就可以cp进行复制了

〉 如果有空盘,直接格式化为exFAT格式即可在各个系统通用
参考

压缩解压为zip且加密目录

BASH
1
2
3
4
5
# -e: 用于加密文件与文件夹目录
# -r: 递归压缩文件与文件夹
zip -er ~/Desktop/test.zip floder
# 解压,需要输入密码
unzip test.zip

删除当前目录及子目录中._的隐藏文件

BASH
1
find . -type f -name '._*' -delete

一口气关闭所有程序

BASH
1
2
3
4
# ctrl + space打开聚焦,输入auto打开自动控制
# 文件=》新建=》应用程序
# 实用工具=》退出所有应用程序拉到右边
# command + S保存桌面即可使用

快捷键打开Terminal

BASH
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# ctrl + space打开聚焦,输入auto打开自动控制
# 文件=》新建=快速操作
# 实用工具=》运行AppleScript拉到右边
# 工作流程收到:没有输入
# 位于:任何应用程序
# 粘贴如下代码并保存
on run {input, parameters}

(* Your script goes here *)
tell application "Terminal"
reopen
activate
end tell

return input
end run
# 系统偏好设置=》键盘=》快捷键=》服务=》通用
# 找到刚刚的脚本命令设置快捷键即可使用

OC操作

开启关闭啰嗦模式

BASH
1
2
# 打开OpenCore Configurator=>NVRAM=>7C436110-AB2A-4BBB-A880-FE41995C9F82=>boo-args
# 添加-v是啰嗦模式,去掉-v是简洁模式

clover卡加号

换成OC即可

直接进入苹果系统

BASH
1
2
3
# 在OpenCore Configurator的Misc--boot--ShowPicker去掉勾,Timeout设置为0(Timeout无所谓)
# 或者在config.plist的Misc--Boot--ShowPicker设置为false
# 如果没有反应,可以在系统偏好设置——启动磁盘——选择MacOS再重新启动

远景链接
百度快照

浏览器插件

YAML
1
2
3
4
5
6
7
8
常用:
- adblock
- markdown viewer
- 沙拉查词
其他:
Decentraleyes: edge和firefox用于加速某些不能访问的静态文件
LocalCDN: chrome用
万能复制: edge

推荐软件

推荐网站

 评论