I. Proxy Internet access:
Method 1
This is a temporary method. If you only need to use apt-Get through HTTP Proxy temporarily, you can use this method.
Before using apt-Get, enter the following command in the terminal (replace yourproxyaddress and proxyport according to your actual situation ).
Run export http_proxy = "http: // User name: password @ proxy IP: proxy port" on the terminal.
Method 2
This method requires the apt. conf file in the/etc/APT/folder. If you want apt-Get (instead of other applications) to always use HTTP proxy, you can use this method.
Note: In some cases, the apt configuration file is not created during system installation. The following operations modify the existing configuration file or create a new configuration file as needed.
Sudo gedit/etc/APT/apt. conf
Add the following line to your apt. conf file (replace yourproxyaddress and proxyport according to your actual situation ).
Acquire: http: proxy "http: // yourproxyaddress: proxyport ";
Save the apt. conf file.
Method 3
This method adds two lines to the. bashrc file in your home directory. If you want apt-Get and other applications such as wget to use HTTP proxy, you can use this method.
Gedit ~ /. Bashrc
Add the following content at the end of your. bashrc file (replace yourproxyaddress and proxyport according to your actual situation ).
Http_proxy = http: // yourproxyaddress: proxyport
Export http_proxy
Save the file. Close the current terminal and open another terminal.
Use apt-Get update or any network tool you want to use to test the proxy. I use firestarter to view active network connections.
If you modify the configuration file again to correct the error, close the terminal and open it again.
FAQ:
Network Proxy does not work! You must set up web brower, APT, and Gaim !!
System -- preferences -- network proxy cannot be set to automatic proxy configuration!
Firfox web brower must set its proxy.
Gain Internet Messenger also requires a proxy.
The problem is that APT through proxy cannot be used. I use porxy to authenticate the user name and password, while the user name is a domain user, for example, user user123 and domain is domain123, in Windows, use the user "domain123 \ user123"
Now n methods are used:
1, system -- preferences -- network proxy cannot be set to automatic proxy configuration!
2. You cannot modify the file by http://wiki.ubuntu.org.cn/index/system/configaptproxy!
3. Add/etc/APT/apt. conf
Acquire: http: proxy "http: // user123: password@111.222.xxxx.xxx: 8080 ";
Or
Acquire: http: proxy "http: // domain123 \ user123: password@111.222.xxxx.xxx: 8080 ";
Or
Acquire: http: proxy "http: // user123: password@proxyabc.xxx.com.cn: 8080 ";
Or
"Http: // user123: password@proxyabc.xxx.com.cn ";
--------------------------------