Stopping services from starting

From WTFwiki
Jump to navigation Jump to search

Overview

This is a trick to install packages on a Debian or Ubuntu system without automatically starting services. policy-rc.d

$ sudo -i
# cat >/usr/sbin/policy-rc.d <<EOF
#!/bin/sh

exit 101
EOF
# chmod +x /usr/sbin/policy-rc.d

You can now install things like ssh or apache without anything starting until you remove the file again.