How to prevent Tor from starting automatically on Ubuntu server?

20,991

Solution 1

This is quite confusing. But generally you can edit /etc/default/tor and change RUN_DAEMON="yes" to RUN_DAEMON="no". Now Vidalia should start its own tor and tor should not start at startup.

Solution 2

Small update. Since 15.04, Ubuntu uses systemd instead of upstart by default so now to disable tor on startup we should run:

sudo systemctl disable tor.service

Solution 3

You have several options here. For a GUI user I'd suggest using bum (Boot-Up Manager) like this answer. However you are using a server and at the moment Tor has not moved to upstart, so you can use update-rc.d or rm.

  1. Enter sudo update-rc.d -f tor remove. This removes all symlinks and at the next reboot Tor will not start. The answer to "Chkconfig alternative for Ubuntu Server?" discusses this.
  2. Enter sudo update-rc.d tor disable. This changes the start script to a stop script and effectively also disables Tor starting at boot time. The answer to "how to stop apache2, mysql from starting automatically as computer starts?" discusses this method.
  3. As SystemV only uses symbolic links, you can use rm to remove these: sudo rm /etc/rc?.d/S*tor. This deletes every file in the rcX.d subdirectories (X stands for a number or S) which starts with the letter S (for Start script) and ends with tor.
  4. The same effect has a combination of find and rm: find /etc/rc?.d -type l -name "S*tor" -exec rm {} \;. This looks specific for symbolic links.
Share:
20,991

Related videos on Youtube

qbi
Author by

qbi

Updated on September 18, 2022

Comments

  • qbi
    qbi over 1 year

    How do I stop Tor from starting automatically on startup? It is Ubuntu Server so I don't have any GUI.

  • lmat - Reinstate Monica
    lmat - Reinstate Monica about 10 years
    That doesn't seem confusing to me. Thanks for the advice!