I wanted to install a program on terminal but it's blocked. How do I torfiy my terminal to fetch the package over Tor?

  • 1
    It will probably be easier to (try to) torify the tool you're trying to use inside the terminal, rather than the terminal itself. What command are you trying to use for the install? – Richard Horrocks May 23 '16 at 16:11
  • Trying to install jdk. – Vesal75 May 23 '16 at 17:37

Assuming you want to do this using apt-get, rather than building from source, you can use torify in the following way:

# torify apt-get update
# torify apt-get install <jdk_packages>

[A similar solution was offered here: https://tor.stackexchange.com/a/839/1730]

  • If just the package download process needs to be torified you can try apt-transport-tor, and change http in the sources.list to tor+http. – cacahuatl May 24 '16 at 3:48

You can send any command over Tor with torify or torsocks.


torsocks wget https://path/to/file


torify apt-get update


torsocks git clone https://path/to/git

or even ssh, scp or sftp over Tor

torsocks ssh user@host

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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