Configure proxy for APT? - Ask Ubuntu


i need configure proxy. there wasn't apt.conf file in etc/apt/ i've created using nano.

but don't understand need write there. i've written http_proxy = http://lgn:pwd@192.168.1.254:8080/ there , restarted networking. when try apt-get update - doesn't work.

actually don't understand port , ip should write in apt.conf file(there example 192.168.1.254 ip , 8080 port decided use them).

to use proxy, need proxy server. ip , port have proxy server. login , pwd must user , password on proxy server (if proxy requires login).

from help.ubuntu.com site:

apt configuration file method

this method uses apt.conf file found in /etc/apt/ directory. method useful if want apt-get (and not other applications) use http-proxy permanently.

on installations there no apt-conf file set up. edit apt-conf file (or create new 1 if have no 1 yet) using editor of choice.

sudo nano /etc/apt/apt.conf 

add line /etc/apt/apt.conf file (substitute details yourproxyaddress , proxyport).

acquire::http::proxy "http://yourproxyaddress:proxyport"; 

save apt.conf file.

if proxy needs login/password, substitute:

"http://yourproxyaddress:proxyport"; 

with:

"http://username:password@yourproxyaddress:proxyport"; 

using username , password proxy server.


Comments

Popular posts from this blog

download - Firefox cannot save files (most of the time), how to solve? - Super User

windows - "-2146893807 NTE_NOT_FOUND" when repair certificate store - Super User

sql server - "Configuration file does not exist", Event ID 274 - Super User