The graphical proxy settings of the new software manager are clear. Here we will introduce the network proxy settings of the terminal command line, so that you can perform apt-Get through the proxy.
Method 1:
If you only want to temporarily use the HTTP proxy, you can enter: Export http_proxy = "http: // username: password @ proxy IP: proxy port" in the terminal before using apt-Get"
Method 2: (method 1 persistence)
If you want apt-Get and other applications to always use HTTP proxy, you can do this:
Edit in Terminal ~ /. Bashrc file: Vim ~ /. Bashrc
Add the following sentence at the end of the file:
Http_proxy = http: // username: password @ proxy address: proxy Port
Export http_proxy
Method 3:
If you only want apt-get to use a proxy, you can:
Add/etc/APT/apt. conf to the following line in the terminal,
Acquire: http: proxy "http: // yourproxyaddress: proxyport ";
Save and exit apt. conf.
4. For RedHat Linux, SET related environment variables in the profile file.
# Vi/etc/profile
Http_proxy = http: // username: password @ proxy server address: Port
In this way, you can access the Internet through the proxy under the terminal ^_^
Network proxy settings for apt-Get In ubuntu (network proxy settings for terminal command lines)