1. block端口:
sudo cp /etc/pf.conf /etc/pf443.conf
编辑pf443.conf,vim /etc/pf443.conf,如
block on en0 proto udp from any to any port 9000 # block UDP port 9000
block on en0 proto tcp from any to any port 5004 # block TCP port 5004
执行 sudo pfctl -ef /etc/pf443.conf
查看:sudo pfctl -sr
stop:sudo pfctl -d
恢复原来的:sudo pfctl -ef /etc/pf.conf
2. 电脑443端口被限制了,可以做一下端口转发,即修改/etc/pf.conf:
rdr-anchor "com.apple/*"
rdr pass on en0 inet proto tcp from any to any port 8443 -> 127.0.0.1 port 443
然后sudo pfctl -ef /etc/pf.conf
3. 安装命令:brew install
4. 查看文件夹大小:du -sh ./*
5.设置环境变量:
sudo vim ~/.bash_profile
source ~/.bash_profile
6. 查看系统log