2

I have just installed tor:

sudo apt-get install tor.
After that, I rebooted and ran sudo systemctl status tor and noticed that it is active running. So I suppose it is enable by default. How to setup it in such a way that it will only run when I sudo systemctl start tor

Edit: I don't agree marking this question as duplicate of this since my question is about Systemd and the allegedly duplicate is in SysVinit. The way to enable/disable services is clearly difference between both.

1
  • 2
    I believe that the questioner is asking how to arrange things such that installing a package does not automatically enable and also start the service. The questioner is far from the first Debian user to ask this. See unix.stackexchange.com/questions/56195 for starters.
    – JdeBP
    Jan 12, 2017 at 22:24

1 Answer 1

2

To set it up to run only when needed:

  1. disable it:
    • sudo systemctl disable tor
  2. To run when needed just do:
    • sudo systemctl start tor
  3. To stop:
    • sudo systemctl stop tor

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