2

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

2 Answers 2

4

Here's the answer:

torctl stop

Here's how I found it. I opened the /usr/lib/systemd/system/tor.service file and saw that the commands used by systemd 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.

2

What is wrong with pure unix-way?

kill -9 `pidof tor`

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .