Unix-Cheatsheet
Setting Proxy
First of all,
Configure using GUI
Open the network settings and set the your system wide network proxy. Network -> Network proxy -> Configure -> Apply system wide.
~ Denotes Home Folder
Add the following lines to ~/.bashrc
export http_proxy=http://USERNAME:PASSWORD@SERVER:PORT/
export https_proxy=https://USERNAME:PASSWORD@SERVER:PORT/
Add the following lines to /etc/apt/apt.conf
Acquire::http::Proxy "http://USERNAME:PASSWORD@SERVER:PORT";
Acquire::https::Proxy "https://USERNAME:PASSWORD@SERVER:PORT";
Add the following lines to /etc/bash.bashrc
export http_proxy=http://USERNAME:PASSWORD@SERVER:PORT/
export https_proxy=https://USERNAME:PASSWORD@SERVER:PORT/
Add the following lines to /etc/environment
export http_proxy="http://USERNAME:PASSWORD@SERVER:PORT/"
export https_proxy="https://USERNAME:PASSWORD@SERVER:PORT/"
If Ony Server and Port Given
Example especially for NIT Silchar LAN User's, thanks to CCC :D
SERVER: 172.16.20.20 PORT: 8080
Add the following lines to ~/.bashrc
export http_proxy=http://172.16.20.20:8080/
export https_proxy=https://172.16.20.20:8080/
Add the following lines to /etc/apt/apt.conf
Acquire::http::Proxy "http://172.16.20.20:8080";
Acquire::https::Proxy "https://172.16.20.20:8080";
Add the following lines to /etc/bash.bashrc
export http_proxy=http://172.16.20.20:8080/
export https_proxy=https://172.16.20.20:8080/
Add the following lines to /etc/environment
export http_proxy="http://172.16.20.20:8080/"
export https_proxy="https://172.16.20.20:8080/"
Referred From: