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
命令行更改主机名
scutil --set HostName lucky # 重启终端
hostname #查看主机名
- 备注: 还有在mac中使用vim, 可以有更好的方法 使用sublime
vim a.txt
# 可以用
subl a.txt
open a.txt
以下看情况设置
- 如果不能用则设置
设置网络的DNS.
打开–wifi
—>> 高级
—> 设置 DNS ,
添加
114.114.114.114
8.8.8.8
修改/etc/hosts
不推荐 修改这个文件啦
找到一个更好用的软件, https://gitee.com/docmirror/dev-sidecar 因此可以不设置
/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
下一节,讲解软件的安装(主要用homebrew
),如果上述不设置,可能软件安装不了