I would like to set apt-get to use a proxy on my ubuntu box. I have successfully configured synaptic to use a proxy, so I can install packages, but I would like to be able to use the command line.
My work proxy requires both a username and password, both of which have special characters in them.
In my .bashrc I have
export http_proxy="http://user@company:P@$$1234@10.20.30.40:80/"
however, this doesn’t work.
I’ve also tried escaping the special characters but that doesn’t seem to work either:
export http_proxy="http://user\@company:P\@\$\$1234@10.20.30.40:80/"
Seemed to be a combination of 2 things. I needed to use escape codes for the special characters and I needed to add entries to
/etc/apt/apt.conf. (Supposedly, exporting the _proxy environment variables should make apt-get work, but I did not have that luck.)/etc/apt/apt.conf:.bashrc: