Steps to set an http proxy for apt-get permanently
1. Create a new file apt.conf in /etc/apt . Add the following line in it
Acquire::http::proxy "http://<proxyip>:<port>/";
2. Edit the file named environment in /etc .Add the following line to it.
http_proxy=http://<proxyip>:<port>
If you want to add the proxy temporarily for a session, you can use the command
1. Create a new file apt.conf in /etc/apt . Add the following line in it
2. Edit the file named environment in /etc .Add the following line to it.
If you want to add the proxy temporarily for a session, you can use the command
export http_proxy=http://yourproxyaddress:proxyport
PS: if you want to add proxy exception for local addresses in your network, add the following command to /etc/environment
no_proxy = localhost,<hostname>
Thanks Julia
ReplyDelete