I am using Ubuntu 18.04. I want to set up a proxy server for all users. Here's what I have:

$ cat /etc/environment
> http_proxy="http://proxy.foo.com:8080"
> https_proxy="http://proxy.foo.com:8080"
> no_proxy="localhost,, *.foo.com"

If I now open e.g. Firefox, I'm not able to access any website. When I go to the Network Settings, I still see "Network Proxy" ass "Off". After setting it to "Manual" and typing the proxy settings from above, I can connect to the internet with Firefox.

How can I set up a proxy in the Network Settings from the command line?

1 Answer 1


When I used proxy some years ago I used those commands on terminal:

set http_proxy=http://proxy.foo.com:8080
set https_proxy=http://proxy.foo.com:8080
export http_proxy=http://proxy.foo.com:8080
export https_proxy=http://proxy.foo.com:8080

And you can verify this configuration doing "env | grep proxy". At least to command-line it worked to me.

  • Thanks. I have tried this, but it still won't work.
    – pfnuesel
    Sep 8, 2020 at 12:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .