How to configure a proxy server in Ubuntu for Linux PCs and servers.
sudo vim /etc/environment
export http_proxy="http://username:[email protected]:12345"
export https_proxy="http://username:[email protected]:12345"
export ftp_proxy="http://username:[email protected]:12345"
export HTTP_PROXY="http://username:[email protected]:12345"
export HTTPS_PROXY="http://username:[email protected]:12345"
export FTP_PROXY="http://username:[email protected]:12345"
By doing this, you can configure the proxy server.
To check the proxy server configuration, execute the following command:
env | grep -i proxy
Also, to remove the proxy server configuration, execute the following command:
unset http_proxy
unset https_proxy
unset ftp_proxy
unset HTTP_PROXY
unset HTTPS_PROXY
unset FTP_PROXY
Finally, to apply the proxy server configuration, execute the following command:
source /etc/environment
Thatโs all.