Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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

Is there a way to change the IP address which is given by Tor from the terminal?

I have the Tor service, and I want to change the IP address which Tor gives me from the terminal. Or in other words: How do I request a new IP address from Tor on the command line?

share|improve this question
an even better way to say it is how to "change identity" from a terminal – mchid Jul 19 '14 at 20:04
I added another command that I found for when running the tor daemon on Ubuntu in the background. – mchid Jul 19 '14 at 20:29
up vote 7 down vote accepted

For tor daemon running on Ubuntu, first try this:

killall -HUP tor

If that does not work, enable the control port in your torrc file.

Then, set a password for the control port with tor --hash-password password.

Open a telnet connection to the control port and issue the NEWNYM command:

printf "AUTHENTICATE \"password\"\r\nSIGNAL NEWNYM\r\n" | nc 9051



share|improve this answer
For the newbs out there, you must first set the hashed password on your torrc like this. – Ciro Santilli 巴拿馬文件 六四事件 法轮功 Nov 15 '15 at 23:06

You can simply type or insert in your bash script:

service tor reload
share|improve this answer

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.