# How do i set up tor command line

I'm using the tor expert bundle for a project and need to configure tor to make a password for control port access to use for an auto switcher. Tried to do tor --hash-password Password but seems like tor is not in the system yet.

• What do you mean "Tor is not in the system yet"? If you've just unzipped the directory you downloaded, then Tor will be in there, it won't have been "installed" in the normal way. (So just typing tor at the command prompt won't work because it's not been placed into a directory that's in your path.) – Richard Horrocks Jan 5 '16 at 14:18
• i tried adding ;"path to tor" in the environmental variables path but that didnt work. All i need is to access the tor command line so i can set up that password – Tor Scrub Jan 5 '16 at 15:47
• If you know where Tor is, then just run it from there instead of adding it to your path. For example, on the command line, and assuming a Linux machine (change as appropriate for Windows): /<path>/<to>/<tor>/tor --hash-password <password> – Richard Horrocks Jan 5 '16 at 15:55
• I attempted to run tor that way but this is what i shows when i add "| more". C:\Users\The Black Box\Downloads\tor-win32-0.2.7.6\Tor>tor --hash-password password | more Jan 05 10:01:44.129 [warn] Path for GeoIPFile (<default>) is relative and will r esolve to C:\Users\The Black Box\Downloads\tor-win32-0.2.7.6\Tor\<default>. Is t his what you wanted? Jan 05 10:01:44.129 [warn] Path for GeoIPv6File (<default>) is relative and will resolve to C:\Users\The Black Box\Downloads\tor-win32-0.2.7.6\Tor\<default>. Is this what you wanted? 16:DBB32F0387AED56E602FD2D97E3E9017C082D513CB889E2A76C2DF55C2 – Tor Scrub Jan 5 '16 at 16:03
• Okay - that's the output you want. The string at the end is the hash of your password. To know what to do with it, have a look at this quick tutorial. (i.e. Basically add it to your torrc file.) – Richard Horrocks Jan 5 '16 at 17:01

If you used a TBB, especially on Windows - of course it's not in your PATH, so just typing tor xxxx will trigger an error. In your TBB install folder find tor.exe(Windows) or tor(non-windows) binary, change directory into this folder and make a command call there. In non-windows use ./tor instead of tor if it still fails. NEVER add tor binary to your PATH variable regardless of the OS you're using : it's insecure.
• it can be easily detected by commands like which tor with even an unprivileged users, it can be possibe abused by malware attempting to attack the host by starting with alternative options and command protocol and later be configured through it. And many more – Alexey Vesnin Mar 16 '18 at 14:15