1.put proxy in networks tab

2.internet works from browsers, terminal or ubuntu updater can't connect to internet!

3.updated .bashrc , .profile in /home and /etc with below:

export $http_proxy=http://proxy_url:proxy_port/

export $ftp_proxy=ftp://proxy_url:proxy_port/

export $https_proxy=https://proxy_url:proxy_port/

4.created and updated apt.conf file in /etc/apt/ with below:

Acquire::http::Proxy “http://proxy_url:proxy_port/”;

Acquire::ftp::Proxy “http://proxy_url:proxy_port/”;

apt upgrade command worked after step 4 but still can't connect ,install ping any server or program or websites!

Can anyone help ? Strange to see there's no question thread running regarding this!


Try this:

sudoedit /etc/environment

Paste your network proxy and port from the second line like this:


This works for the terminal and software center. If you ever want to change the network configuration for the terminal and software center, just edit the file again. The GUI app in settings works for all other software like browsers. Hope you find this helpful

  • Thanks a lot.adding these variables here solves it all but along with it I had to edit apt config too to get the apt running behind proxy. – Sunandan Adhikary Sep 19 '18 at 6:32

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.