
Next, use this command to enable the Tor control port and insert our previously hashed password:.$ torpass=$(tor -hash-password "my-tor-password") We’re using my-tor-password in this example. To start, we will password protect the Tor connection with the following command.Once enabled, Tor will accept connections on the control port and allow you to control the Tor process through various commands. In order to interact with the Tor installation on our system, we need to enable Tor’s control port. If you need to toggle torsocks mode off again, just enter:.To turn torsocks on permanently for all new shell sessions and after reboot, use this command: If you open new terminals or reboot your PC, the shell will default back to your ordinary connection. The torified shell will only persist for the current session.To make sure it worked, try retrieving your IP address without using the torsocks command prefix:.Every command will be torified for this shell. If you want to use the Tor network by default for shell commands, you can torify your shell with this command: Obviously, prefacing every network related command with torsocks will get old quickly.That means our request was routed through the Tor network successfully. You should see a different IP address now. This way, the command is run through our Tor client instead. Then, we’ll run the same command but preface it with torsocks.First, check what your current IP address is: We’ll do this by obtaining an external IP address from the Tor network. Let’s see Tor in action and make sure it’s functioning how it’s supposed to.State Recv-Q Send-Q Local Address:Port Peer Address:Port ProcessĪnother quick way to check if Tor is installed and see what version you’re running is with this command: $ tor -version You can confirm that Tor is up and running correctly by using the ss command in terminal:

First, we need to install Tor on our system. Open a terminal and type the following command to install it:.
