How to run "sudo proper - get upgrade" via proxy in commandline?

In my workplace i intend to upgrade and also download and install via (wget) and also below they are making use of proxy?

Just how can i do this by commandline?

0
2019-05-18 21:40:01
Source Share
Answers: 3
export http_proxy=http://proxyusername:[email protected]:proxyport
sudo apt-get update

The export should not require sudoing and also if your proxy is confidential, simply ditch the proxyusername:[email protected] component.

0
2019-05-21 06:07:47
Source

If it is a short-lived arrangement , you can attempt this: sudo celebration - c 'http_proxy = "http:// < proxy_host >: < proxy_port >/" apt - get upgrade'

You require this, due to the fact that the setting variable demands to be specified for the "origin" account. Doing and also export prior to needs to not function.

For a irreversible arrangement , you will certainly need to change a system documents. This is currently defined in the adhering to solution concerning How to check Network proxy is really applied?.

0
2019-05-21 05:51:51
Source

Did you attempt editing and enhancing /etc/apt/apt.conf? I utilize this to make use of proper behind our company proxy.

Acquire::http::proxy "http://user:[email protected]:port/";

I think that proper usages this value unless $http_proxy is specified in your covering setting (i.e. $http_proxy takes priority).

0
2019-05-21 03:58:57
Source