# ubuntu设置代理

# 1、GUI设置方式

设置 > 网络 > 网络代理 > 手动(Settings > Network > Network Proxy > Manual)

测试方式:打开浏览器访问 google.com 即可

# 2、apt包设置代理

sudo vim /etc/apt/apt.conf.d/80proxy

Acquire::http:proxy "http://192.168.0.101:8080";
Acquire::https:proxy "https://192.168.0.101:8080";
Acquire::ftp:proxy "ftp://192.168.0.101:8080";
1
2
3
4
5

# 3、wget 及命令行设置代理

vim ~/.bashrc

use_proxy=on
http_proxy=http://192.168.0.101:8080
https_proxy=http://192.168.0.101:8080
ftp_proxy=http://192.168.0.101:8080

source ~/.bashrc

# 测试
wget www.google.com
1
2
3
4
5
6
7
8
9
10
11
上次更新: 11/9/2023, 7:04:43 PM