Ubuntu - How to perform updates through a proxy

December 2016


Ubuntu - How to perform updates through a proxy


Issue

The Synaptic Package Manager allows you to install and upgrade software packages on Ubuntu. If you are using the internet via a proxy, you will have to enable proxy support feature of Synaptic, to be able to download the latest security updates.

Enabling proxy support on Synatics

  • Launch Synaptic.
  • Click on the Settings menu > Preferences.
  • Go to the Network tab.
  • Enter the address and port of the proxy.
  • Click on Validate.

Using a proxy with apt-get and aptitude

Method 1 - configure the http_proxy

  • Open the /etc/profile for editing:
    • gksudo gedit/etc/profile
  • Add the following line:
  • Replace: the proxy.myISP.com:3128 by the address and port number of the proxy that you want to use.
  • If your proxy requires a password, use the following notation:
    • http://login:password@proxy.myISP.com:3128 

Method 2: Configure apt

  • Create a configuration file to "force" the use of the proxy:

sudo echo 'Acquire::http::Proxy "[http://proxy.myISP.com:3128]";' > /etc/apt/apt.conf.d/proxy
  • Replace: the proxy.myISP.com:3128 by the address and port number of the proxy that you want to use.

Related :

This document entitled « Ubuntu - How to perform updates through a proxy » from CCM (ccm.net) is made available under the Creative Commons license. You can copy, modify copies of this page, under the conditions stipulated by the license, as this note appears clearly.