Home Ubuntu Proxy Config

Ubuntu Proxy Config

This is just a one-liner note to set up proxy for Ubuntu with authentication Setting up proxy at browser doesn’t affect terminal applicaitons such as aptitute package and so on. Also, system wide proxy requies you to touch network configuration like iptables. There are two easiest way to do.

There are 2 main files you should set up proxy:

 /etc/apt/apt/apt.conf #Acquire::
 /home/user/.bashrc #export 

For apt.conf,use vim, gedit or nano to open the file and add the proxy for each network protocols in the following format:

Acquire::http::proxy "http://username:password@proxy.server:port";
Acquire::https::proxy "http://username:password@proxy.server:port";
Acquire::ftp::proxy "http://username:password@proxy.server:port";

Alternative way is to put the following command in to .bashrc profile.

export http_proxy=http://username:password@proxy.server:port
export https_proxy=http://username:password@proxy.server:port
export ftp_proxy=http://username:password@proxy.server:port

Plain passwords in file is bad idea but this is the most straightforward methond with no headache.

This post is licensed under CC BY 4.0 by the author.

Reply to > "Core Difference between Firefox's and Chrome's private browsing mode"

Python Learning Sources