vmware如何走主机代理

1.编辑vim /etc/profile

2.编辑文本内容为

1
2
3
# 在文件后添加以下内容:
export http_proxy='http://代理服务器IP:端口号'
export https_proxy='http://代理服务器IP:端口号'

例如:

1
2
3
4
5
export http_proxy=192.168.16.181:10808
export https_proxy=192.168.16.181:10808

# 使用命令将设置立即生效。
source /etc/profile
  1. 应用修改
1
source /etc/environment
  1. 查看当前代理设置
1
env | grep -i proxy

关闭代理

1
2
3
unset http_proxy
unset https_proxy
unset no_proxy