How to access internet from shell prompt in linux
Sometimes we need to access internet from the bash shell through proxy server such as Squid so this post is to explain how we can achieve this.
export http_proxy=http://192.168.1.1:3128
export https_proxy=http://192.168.1.1:3128
export ftp_proxy=http://192.168.1.1:3128
Now we can access internet from the shell prompt.
For a particular user put this variables in /home/username/.bash_profile file.
To setup the proxy environment variable as a global variable put this variables in /etc/profile file.
For Yum we can set proxy setting in /etc/yum.conf file such as.
proxy=http://192.168.1.1:3128
For RHN registration through proxy we need to configure /etc/sysconfig/rhn/up2date file with settings.
enableProxy=1
httpProxy=192.168.1.9:3128
Comments
Post a Comment