Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The man page to yum.conf describes several proxy related variables:

          proxy URL to the proxy server that yum should use.
          proxy_username username to use for proxy
          proxy_password password for this proxy

But how to specify a SOCKS proxy?

I assume that the above is just for normal HTTP proxies ...

share|improve this question
up vote 4 down vote accepted

The tsocks application can socksify every other applications

tsocks app args
share|improve this answer
Awesome, it is already available in the default Fedora repositories - via Google I just found 'socksify' (dante socks client) which is not available - and does not work on Fedora 17 when compiled from source. – maxschlepzig Jul 21 '12 at 18:36
How to use it exactly ? – Wildling Nov 25 '14 at 8:58

As pointed out by enzitib,tsocks can be used to use a SOCKS proxy with yum.

To be more detailed, one can use it like this:

$ export TSOCKS_CONF_FILE=$HOME/.tsocks.conf
$ cat .tsocks.conf
server =
server_port = 1080
$ tsocks yum ...

By default tsocks uses SOCKS version 4 - but you can configure 5 via the 'server_type' directive. For user/password options there are the 'default_user'/'default_pass' directives and the TSOCKS_USERNAME/TSOCKS_PASSWORD environment variables.

share|improve this answer

Add this line to /etc/yum.conf (got the idea from the post by DaPillow)


It worked for me using yum 3.4.3 on Fedora 21, hope this helps.

share|improve this answer
It doesn't work on RHEL 2.6.32 (64Bit) with yum 3.2.29 :-| ProxyChains is quite standard for such a purpose! – Jatin Kumar Jan 6 '15 at 14:29
proxychains seems fair enough. I've used it and I'm happy about it ;) But in your case, I think the yum version is the problem: 3.2.29 (mine is 3.4.3) – Klaus Jan 6 '15 at 22:19
Yes agreed, its just the yum version and 3.2.29 is the default for 6.5 Final Release. – Jatin Kumar Jan 7 '15 at 22:25

Proxychaines also is a good option for you!

first download it and set your socks info in proxychains.conf file and enter proxyxhanes before any command that you want use socks proxy!

share|improve this answer

Add this line to /etc/yum.conf and make sure to use the expected protocol (not http):

share|improve this answer
This doesn't work: Options Error: Error parsing "proxy = "socks5h://abc.mnl.xyz.com:9999/ # "": URL must be http, ftp or https not "socks5h" – Wildling Nov 25 '14 at 6:46

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.