1

How to stop tor in the most elegant way possible using only the command line? I'm ok with starting tor using tor -f [args] but what about a tor -stop command?Does it exist? I want to avoid systemctl because it doesn't accept args

4

Here's the answer:

torctl stop

Here's how I found it. I opened "/usr/lib/systemd/system/tor.service" and I saw that the commands that systemd uses are:

ExecStart=/usr/bin/torctl start
ExecReload=/usr/bin/torctl reload
ExecStop=/usr/bin/torctl stop

So you absolutely can use arguments with systemctl. You just have to put them into the .service config file.

Of course, this answer may vary slightly depending on your Linux distribution, but since you didn't specify which one you use, I am providing the answer for OpenSUSE which is the distro that I use.

1

What is wrong with pure unix-way?

kill -9 `pidof tor`

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.