
1.创建root用户使用最高权限
sudo passwd root
一般情况下,使用临时获取最高权限
sudo vim /etc/shells
2. apache操作
#启动Apache
sudo apachectl -k start
#停止Apache
sudo apachectl -k stop
#重启Apache
sudo apachectl -k restart
3. git clone 加速
在配置文件中添加配置项/etc/hosts
192.30.253.112 github.com
151.101.13.194 github.global.ssl.fastly.net
注意:IP地址可以通过站长工具去获取到最新的一个IP地址并修改即可
配置完成之后,刷新本地的dns缓存
sudo killall -HUP mDNSResponder
# 网卡的启动与关闭:
ifconfig en0 up/down