mac 系统的设置

mac 系统的设置

新系统, 首先我们要安装一些必要的软件,和做一些基本的设置.

本文做一些基本的设置

更改终端的颜色

sudo echo "export CLICOLOR=1" >> ~/.bash_profile
sudo echo "export LSCOLORS=gxfxcxdxbxegedabagacad" >> ~/.bash_profile
sudo echo "export PS1='\[\e[01;33m\][\[\e[01;35m\]\u\[\e[01;33m\]@\[\e[01;34m\]\h:\[\e[01;33m\]] \[\e[01;36m\]\w \[\e[01;32m\]\$ '">> ~/.bash_profile

source ~/.bash_profile 

参考:

2019-11-19mac终端样式PS1

设置网络的DNS.

打开–wifi —>> 高级—> 设置 DNS ,

添加

114.114.114.114
8.8.8.8

修改/etc/hosts

$ sudo vim /etc/hosts
#### 把下面的信息添加到 该文件中即可
199.232.69.194   github.global.ssl.fastly.net
140.82.113.4      github.com
199.232.69.194    github.global.ssl.fastly.net
185.199.110.153   assets-cdn.github.com
140.82.113.4      gist.github.com

#192.30.253.119    gist.github.com
#199.232.28.133    assets-cdn.github.com
199.232.68.133    raw.githubusercontent.com
199.232.68.133    gist.githubusercontent.com
199.232.68.133    cloud.githubusercontent.com
199.232.68.133    camo.githubusercontent.com
199.232.68.133    avatars0.githubusercontent.com
199.232.68.133    avatars1.githubusercontent.com
199.232.68.133    avatars2.githubusercontent.com
199.232.68.133    avatars3.githubusercontent.com

链接1

链接2

下一节,讲解软件的安装(主要用homebrew),如果上述不设置,可能软件安装不了


次;