In Ubuntu 14.04, in order to use some commands in the terminal (for example, apt-get) through the company proxy, I need to make the following changes, except for the system settings> Network> Network proxy> "Apply the whole system" (shame on you, Ubuntu )
/etc/environment (actually this is the only file modified by System Settings)
http_proxy="http://[webproxy]:[port]/"
https_proxy="https://[webproxy]:[port]/"
ftp_proxy="ftp://[webproxy]:[port]/"
socks_proxy="socks://[webproxy]:[port]/"
/etc/profile
export http_proxy=http:
export https_proxy=http:
export ftp_proxy=http:
sudo visudo
Defaults env_reset
Defaults env_keep = "http_proxy https_proxy ftp_proxy DISPLAY XAUTHORITY"
/etc/apt/apt.conf
Acquire::http::proxy "http://[username]:[password]@[webproxy]:[port]/";
Acquire::https::proxy "https://[username]:[password]@[webproxy]:[port]/";
Acquire::ftp::proxy "ftp://[username]:[password]@[webproxy]:[port]/";
Acquire::socks::proxy "socks://[username]:[password]@[webproxy]:[port]/";
or the same changes in
/etc/apt/apt.conf.d/95proxies
I think at least the following command (from here )
sudo http_proxy='http://[username]:[password]@[webproxy]:[port]' apt-get update
should work, right?
What I remember right now. I’m not even sure that all of them are really necessary. However, I made all these changes in Ubuntu 16.04, but still I can’t make it sudo apt-get updatework through the same proxy (another computer in the same room). there is
Temporary failure resolving '[webproxy]'
What am I missing?