This is useful for office or school environments where the PCs has access to the internet only via a proxy server and not NATed. Usually, in this type of senario, you cannot install packages using the standard sudo apt-get install package_name as there's no direct access to the net.
This can be fixed by setting the proxy details in /etc/bash.bashrc file like this :
From the command line, run :
- Code: Select all
sudo echo "export http_proxy=http://username:password@proxyserver.net:port/" >> /etc/bash.bashrc
If a single > was used, it will overwrite the /etc/bash.bashrc and you will lose the command line!
For example :
If the proxy server is 192.168.1.100 on port 8080 and there's no user name or password the code will be :
- Code: Select all
sudo echo "export http_proxy=http://192.168.1.100:8080/" >> /etc/bash.bashrc
- Code: Select all
sudo echo "export http_proxy=http://ProxyUser:ProxyPass:192.168.1.100:8080/" >> /etc/bash.bashrc


