Setting HTTP PROXY via Command Shell (Bash or Terminal) in Linux

February 14, 2012 at 10:35 pm (Linux)

If you are not using a GUI in Linux, how are we going to change the proxy setting using commands to a shell to gain access to the internet?

First, check what is your current settings by typing:

  • root@ubuntu:~# ENV | grep -i proxy

It will show you the current proxy settings you have. If not maybe you do not have ENV installed.

To change the settings type these commands:

  • root@ubuntu:~# export http_proxy=”http://:”
  • root@ubuntu:~# export ftp_proxy=”http://:”

for example:

  • root@ubuntu:~# export http_proxy=”http://192.168.0.10:3128″

After setting it up, try accessing the internet. If you still can’t connect to the internet, your settings are wrong.

If you decide to return the default settings type:

  • root@ubuntu:~# export HTTP_PROXY=”

Source: SetProxyLinux

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: