Linux – Set Network Proxy Linux

linuxPROXYraspberry pi

I have a raspberry pi and I need to set a network proxy for both apt and browser.

How do I do this?

The only thing I have found is to use the following lines in the bash.bashrc file

export http_proxy=http://username:password@proxyhost:port/
export ftp_proxy=http://username:password@proxyhost:port/

However I do not have a username or password as the proxy does not require authentication.

Best Answer

Just add to your .bashrc:

export http_proxy=http://proxyhost:port

export ftp_proxy=http://proxyhost:port

If you don't neeed authentication just don't add it.

Related Question