Ask Your Question

Proxy Internet & Terminal

asked 2012-01-03 15:27:02 +0000

Chetan Patil gravatar image

I have my netconnection via proxy with username and password.

I am able to browse using browser however not able to use internet via terminal for yum,wget etc.

Prosy settings is like : pqr.abc.def.ghi:80

Any solution?

edit retag flag offensive close delete

5 Answers

Sort by » oldest newest most voted

answered 2012-01-03 15:58:28 +0000

hhlp gravatar image

updated 2012-01-04 17:11:08 +0000

for WGET

editing sudo vim /etc/wgetrc and edited the following:

# You can set the default proxies for Wget to use for http, https, and ftp.
# They will override the value in the environment.
#https_proxy = http://proxy.yoyodyne.com:18023/
#http_proxy = http://proxy.yoyodyne.com:18023/
#ftp_proxy = http://proxy.yoyodyne.com:18023/

# If you do not want to use proxy at all, set this to off.
#use_proxy = on

You need to remove the comment (#) at the beginning of the last 4 lines shown here.

for YUM

we are going to configure YUM software to use proxy to get LINUX updated with new softwares all the times with repositories available on internet.

1) Configure yum.conf

sudo vim /etc/yum.conf

enter following lines at bottom of [main] section


2) Open a Terminal and Export http_proxy variable

export http_proxy=”http://yourproxyaddress:port/”
export ftp_proxy=”http://yourproxyaddress:port/”

3) Export http_proxy variable in bash login script

gedit /home/<username>/.bashrc_profile &

export http_proxy=”http://yourproxyaddress:port/”
export ftp_proxy=”http://yourproxyaddress:port/”

This will help you to export http_proxy variable automatically everytime you login.

Now use “yum list” command to check for its working.

yum list


man yum.conf

edit flag offensive delete publish link more


Getting following error for yum list : "Couldn't resolve proxy"

Chetan Patil ( 2012-01-04 15:49:07 +0000 )edit

answered 2012-01-04 18:09:49 +0000

asto gravatar image

If you want to do everything through a proxy, rather than setup proxies for individual software packages, I would recommend changing the global settings. Open up "gnome-control-center" from the terminal, go to network settings and edit the proxy configuration there.

edit flag offensive delete publish link more


I tested both method in a virtual machine with an free proxy server port 80 and both method work perfectly of course @asto method is the esiest...

hhlp ( 2012-01-04 19:04:15 +0000 )edit

there is no system proxy settings in gui network in fedora 17 now.

yanglifu90 ( 2012-06-05 17:40:05 +0000 )edit

@yanglifu90 There is in KDE. Go to system settings -> Network settings. I am not sure of Gnome, I have stopped using it.

asto ( 2012-07-02 11:38:30 +0000 )edit

answered 2014-05-05 13:32:45 +0000

linux.alder gravatar image

If you are using a system in an environment that requires username & password (which should change regularly). You can use this. I place it in my .bashrc file. Replacing the PROXYSERVER:PORT with the on that is appropriate for your environment.

Open a new shell, type "proxy" and it will ask for the username and a (non-echoed) password. I ask for the username as my systems are in a shared-user environment as well. This has worked for yum, wget and everything else I have tried so far.

function proxy(){
echo -n "username: "
read -e username
echo -n "password: "
read -es password
export http_proxy="http://$username:$password@PROXYSERVER:PORT"
export ftp_proxy="http://$username:$password@PROXYSERVER:PORT"
export HTTP_PROXY="http://$username:$password@PROXYSERVER:PORT"
export FTP_PROXY="http://$username:$password@PROXYSERVER:PORT"
edit flag offensive delete publish link more

answered 2012-01-03 15:52:38 +0000

Check the link below if that helps -

Yum under proxy

edit flag offensive delete publish link more

answered 2012-03-23 03:03:08 +0000

RDKcodes gravatar image

I have no proxy for my network. I set the network settings to automatic.

Now what do I export http_proxy= to?

As, I have no proxy, it should probably be http_proxy="No Proxy"(something like that).

The CPAN should also be configured using o conf, what should I set the network to here ?

edit flag offensive delete publish link more


If you don't have any proxy set up and you connect automatically via LAN or Wifi then you don't need to edit anything.

Chetan Patil ( 2012-03-23 09:22:01 +0000 )edit

Thanks man :)

RDKcodes ( 2012-03-25 12:05:06 +0000 )edit

Your answer

Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

Add answer

[hide preview]

Use your votes!

  • Use the 30 daily voting points that you get!
  • Up-vote well framed questions that provide enough information to enable people provide answers.
  • Thank your helpers by up-voting their comments and answers. If a question you asked has been answered, accept the best answer by clicking on the checkbox on the left side of the answer.
  • Down-voting might cost you karma, but you should consider doing so for incorrect or clearly detrimental questions and answers.

Question tools



Asked: 2012-01-03 15:27:02 +0000

Seen: 16,236 times

Last updated: May 05 '14