How to set proxy in terminal
Setting proxy in terminal is very straight forward. Use export command to set it.
Replace proxyip with the ip of the proxy and proxyport with the port of proxy.
In case your proxy requires authentication, use
For example, the command becomes (in my university)
You need to enter this command in each terminal you open or you can enter this in ~/.bashrc.
After setting proxy in the terminal, you may now use wget or apt-get/yum without getting error Connection refused.
You may be wondering, why I am posting only on proxy. The only reason is i got struck on proxy settings on my first installation of linux and removed it. It took a long time when i started using linux again. Also, i am behind a proxy server in my college and aim to provide simple articles for beginners.