Ubuntu – How to set proxy settings in ubuntu software center

PROXYsoftware-center

I have been using windows 7 and to update windows i configured netsh winhttp settings by using command: netsh winhttp set proxy 10.0.0.21:3128. That worked for windows update and many other softwares. Is there a way i can put proxy settings throughout the computer that would work for software center and other softwares?

Best Answer

As Mahyar Pasarzangene said, you can set the proxy using System settings -> Network -> Network Proxy and then choosing "Manual" proxy and setting your host and port no. and then applying the settings system-wide.

However, if you are using authenticated proxy, i.e. you have a username and password for your proxy, you need to set it as follows:

Open a terminal(Ctrl+Alt+t) and then type the following:

sudo nano /etc/apt/apt.conf

and set your username and password as follows:

Acquire::http::proxy "http://username:password@host:port_no/";
Acquire::https::proxy "https://username:password@host:port_no/";
Acquire::ftp::proxy "ftp://username:password@host:port_no/";
Acquire::socks::proxy "socks://username:password@host:port_no/";

You will not have username@password when you open this document, but you should put your username and password as shown above, separated by a : and then separated by @ with the host.

If you have any special characters in your password, replace it with its HTML code.