Because the company must be through the agent to sisu the network, so the agent's setup
First, the browser settings agent
Add the following to your. BASHRC or. Bash_profile inside.
Export all_proxy= ' sockets://proxy_ip:proxy_port/' export ftp_proxy= ' http://proxy_ip:proxy_port/' export http_proxy= ' http://proxy_ip:proxy_port/' export https_proxy= ' http://proxy_ip:proxy_port/'
Then execute:
$ source ~/.BASHRC
This allows the browser to use the proxy.
Second, Apt-get set up the agent
in Ubuntu 10.10 and later versions, Apt-get no longer reads the $http_proxy variable, and the workaround is to modify the Apt-get configuration file:
$ sudo vim/etc/apt/apt.confacquire::http::p Roxy "http://proxy_ip:proxy_port/"; acquire::ftp::p Roxy "FTP://PROXY_IP: proxy_port/"; Acquire::https::p Roxy "https://proxy_ip:proxy_port/";
Apt-get also supports the-C mode specifying configuration files and-O Specifying configuration entries:
If you add the above configuration to ~/apt_proxy.conf, you can use it so that the default configuration is not modified and the proxy is executed
$ sudo apt-get-c ~/apt_proxy.conf update
Or use a configuration item:
$ sudo apt-get-o acquire::http::p roxy= "http://proxy_ip:proxy_port/" update
Linux proxy settings