1

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!

1

Try this:

sudoedit /etc/environment

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

http_proxy="http://hostname:port"
ftp_proxy="ftp://hostname:port"
https_proxy="https://hostname:port"

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

| improve this answer | |
  • 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
0

I solve this by doing these steps, How to Set the Proxy for APT on Ubuntu 18.04:

  1. sudoedit /etc/environment
  2. http_proxy="http://proxy.server:port"
  3. sudo touch /etc/apt/apt.conf.d/proxy.conf
  4. sudo nano /etc/apt/apt.conf.d/proxy.conf
  5. Acquire::http::Proxy "http://proxy.server:port/";
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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