92

I went through some manuals and I didn't understand yet. How do I disable autostart nginx service?

techraf
  • 3,316
Alex Malex
  • 2,692
  • 9
  • 28
  • 26

2 Answers2

121

Try this command:

sudo update-rc.d -f nginx disable
SirCharlo
  • 40,096
66

Update:
I made changes to supports more distributions:

use this:

sudo systemctl disable nginx

It will disable it and if you like to stop running service use this:

sudo systemctl stop nginx

works on Ubuntu and any Systemd based distributions

S.M.Mousavi
  • 1,176