Linux设置上网代理服务器

vi  /etc/profile,添加如下内容,保存退出

http_proxy=ip:port
https_proxy=ip:port
ftp_proxy=ip:port
export http_proxy https_proxy ftp_proxy 

最后执行source /etc/profile使其生效

执行wget  www.baidu.com验证是否能连接上代理服务器

注意:不要用ping命令验证,因为ping命令不走代理

猜你喜欢

转载自blog.csdn.net/xl_1803/article/details/112008190