Ubuntu - How to perform updates through a proxy

August 2017


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


Published by aakai1056. Latest update on December 28, 2014 at 03:57 AM by jak58.
This document, titled "Ubuntu - How to perform updates through a proxy," is available under the Creative Commons license. Any copy, reuse, or modification of the content should be sufficiently credited to CCM (ccm.net).