Using Tor browser can help us stay anonymous. But I not always browse the web when I am on my PC. What about the command line utilities like wget and so.

For example, some command line utility might send user data over the web, information like IP address might get exposed.

So my question is how can I use my command line utilities, or say whole operating system using Tor? To stay anon 100%?

  • you should use tails, made by same guys
    – user10225
    Commented Dec 17, 2015 at 5:18
  • I think the question is too generic for a useful answer
    – U. Windl
    Commented Feb 22, 2023 at 8:28

2 Answers 2


Use proxychains. It is already configured to send tcp through tor via If you're paranoid, make sure you block all udp traffic with iptables and use ip addresses as dns queries of hostnames will be a dead givaway of your targeted nodes.

Usage: ./proxychains [application] [args]


I found a few answers on Google, like this one and a similar question has been asked before on this site This solution should work for those who have installed Tor (rather than Tor Browser) and it has some good links.

As said by michael g and one of the answers on askubuntu: Tor Browser users can use proxychains here is the How To. By default it is configured to use SOCKS4 which means it cannot use remote DNS as shown in this table which is probably why michael g suggested it might be worth configuring your firewall to drop all UDP packets and use IP addresses. This is however not an appealing solution to most users as it will break DNS on you non Tor browser (if you use one) and break any programs that rely on UDP. Then there's the fact that you will have to somehow get the required IP address anonymously and configure the command line program to use that IP address (as opposed to make a DNS query). So instead of all that, simply edit /etc/proxychains.conf and configure proxychains to use SOCKS5 then make sure that proxychains is properly proxying your DNS.

Here is a helpful link: http://www.switchroot.com/how-to-run-apt-get-wget-whois-etc-via-socks-proxy-using-proxychains

So my question is how can I use my command line utilities, or say whole operating system using Tor? To stay anon 100%?

It won't be for everyone but using whonix forces you to use Your whole OS (including command line) through Tor and should make leaks of your real IP address very unlikely, the other two methods may leak your real IP address in certain circumstances. Whonix prevents this, here is a quote from their website

Whonix consists of two parts: One solely runs Tor and acts as a gateway, which we call Whonix-Gateway. The other, which we call Whonix-Workstation, is on a completely isolated network. Only connections through Tor are possible. With Whonix, you can use applications and run servers anonymously over the internet. DNS leaks are impossible, and not even malware with root privileges can find out the user's real IP.

It's not for everyone because it may involve changing operating systems but I thought it was worth mentioning. 100% anonymity is impossible but whonix is pretty good.

Edit to answer question:

Tails is a very powerful anonymity tool. However I suggested Whonix because I believe it is less likely to leak your real IP address than anything else and that includes Tails. Here is why:

Tails knows your IP address. Tails uses iptables/firewall rules to prevent proxy bypass but it can still leak your IP address, look at this recent bug in Tails that was fixed in Tails 1.7. Part of your question was how to use the command line through Tor and you gave the example wget the bug (now fixed) allowed Tails to leak the IP addresses of people using wget for FTP in some situations. Tails has opened another ticket to find out if Nautilus and/or Tor Browser are also leaking users IP addresses when they use FTP. There has been no research added to the ticket yet.

As far as I know this would not be possible on Whonix. Whonix workstation does not know your real IP address so it is very unlikely to leak it.

Tails or Whonix?

That depends on what exactly you are looking for in an OS. I cannot possibly cover everything here but the Whonix website does have a pretty good comparison of how different systems deal with attacks (the whole page is probably interesting to you). I don't think it's too biased :)

  • Tails or Whonix? Tails is newer, but you still suggested Tails. Commented Dec 28, 2015 at 2:05
  • @SantoshKumar I answered your question in an edit. I had too much to say for a comment...
    – Joey
    Commented Dec 28, 2015 at 20:46

Not the answer you're looking for? Browse other questions tagged .