mac基础使用

使用技巧

mac终端打开<文本/目录/软件>

open -a TextEdit settings.xml   #参数说明:-a指定应用
open -e settings.xml            #参数说明:-e使用文本编辑器打开
open -t settings.xml            #参数说明:-t使用默认编辑器打开
open lib/temp                   #打开目录

终端关键词

whereis 程序名称                  #程序名的搜索
which 程序名称                    #程序名的搜索
tail -f 文件名                   #查看实时日志
mkdir 目录名                     #创建一个目录
cp 文件 拷贝的地址                 #拷贝
rm 文件或者目录名                  #删除 如果是目录需要-r
cat  文件名                      #打印文件内容
# mac下的终端软件管理器
brew install 软件名              #安装软件      

mac终端工具在打开的时候,执行配置

如果bash,把配置文件配置到 ~/.bashrc 的末尾.

如果zsh,把配置文件配置到 ~/.zshrc 的末尾.

一键开启 macOS HiDPI

https://github.com/xzhih/one-key-hidpi/blob/master/README-zh.md

设置字体平滑渲染的强度

控制台输入 : defaults -currentHost write -globalDomain AppleFontSmoothing -int 2(可以使用1到3作为该命令的最后一个参数,表示字体平滑渲染的强度)
想要恢复默认设置: defaults -currentHost delete -globalDomain AppleFontSmoothing

关闭SIP/开启SIP

S1 重启MAC,按住cmd+R直到屏幕上出现苹果的标志和进度条,进入Recovery模式;
S2 在屏幕最上方的工具栏找到实用工具(左数第3个),打开终端,输入:csrutil disable 或者 csrutil enable
S3 关掉终端,重启mac;
S4 重启以后可以在终端中查看状态确认。

Read-only file system

关闭系统目录写保护 (macOS 10.15)
macOS 10.15 Cataline 开始系统目录默认为只读模式,禁用 SIP 以后,仍需开放文件系统写入权限。

 sudo mount -uw /

-u 选项表示修改已挂在文件系统的模式,-w选项表示将模式改为可读写 (read-write),/为根目录即系统挂载点。

MAC里“微软雅黑”字体标准体和粗体无法同时使用问题的解决方法

1. 下载,微软雅黑forMac.zip;
2. 打开Finder,按shift+command+G组合键;
3. 在对话框中输入:/Library/Fonts ,把之前的微软雅黑字体删除(名称如:Microsoft Yahei.ttf、msyh.ttf 和 msyhbd.ttf),
再把下载好的字体解压后复制到Fonts文件夹,重启电脑后就大功告成了。

<<设置>>

mac如何修改DNS

终端走代理

export all_proxy=socks5://127.0.0.1:10010
export http_proxy="socks5://127.0.0.1:10010"
export http_proxy="socks5://127.0.0.1:12333"
export https_proxy=http://127.0.0.1:12333
export all_proxy="socks5://127.0.0.1:12333"

让 SSH 走代理连接服务器

# 安装Corkscrew
brew install corkscrew
# 编辑文件 ~/.ssh/config (如果没有就创建一个新)
Host *
        ProxyCommand corkscrew 127.0.0.1 6152 %h %p


软件集合

Mac软件推荐

Awesome Mac

proxifier for

终端软件

Homebrew 软件管理

用法

brew install 软件名称       #安装
brew update                #更新软件库 

国内镜像源(中科大)

# 步骤一
cd "$(brew --repo)"
git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git
 
# 步骤二
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git
 
#步骤三
brew update

复原

cd "$(brew --repo)"
git remote set-url origin https://github.com/Homebrew/brew.git
 
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://github.com/Homebrew/homebrew-core
 
brew update

WebTorrent Desktop BT软件

iterm2


开发工具

Navicat数据库图形化

IntelliJ IDEA

虚拟机

Parallels Desktop

VMware Fusion


效率工具

Alfred

其他记录

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章