1

How can I prevent starting processes automatically. (e.g. I used mysql database about a year ago). I killed the mysqld processs and now I see it's running again. And many other processes I don't know what are they good for.

I'd like to have more control over the processes that are running, what I can turn off, what will start periodically etc.

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 12.04.2 LTS
Release:    12.04
Codename:   precise
6
  • Please add your distribution and version to the question. Dec 28, 2016 at 12:38
  • @RuiFRibeiro done
    – xralf
    Dec 28, 2016 at 12:40
  • 1
    If you mean daemons that start during boot, you can use update-rc.d name disable to disable it from starting (this works on Debian, please update your post with distro/version numbers)
    – Zwans
    Dec 28, 2016 at 12:41
  • Not clear what you are asking. At a very low level processes (apart from process number 1) start as a result of the fork or clone system calls. Something like mysqld will probably be started at boot time because of files in /etc/rc?.d, /lib/systemd/system or /etc/systemd/system depending on the init system you are running.
    – icarus
    Dec 28, 2016 at 12:46
  • 1
    @xralf yes that's possible, I check this by using the ls /etc/rc*.d command.
    – Zwans
    Dec 28, 2016 at 13:16

1 Answer 1

1

You can create an override for the service.

Search for the service in /etc/init/. I have no mysql so I dont't know the exakt name.

I take pulseaudio for example.

ls -al /etc/init/ | grep pulse
-rw-r--r--   1 root root  1890 Apr  4  2014 pulseaudio.conf

Then create the override-file for your Service

sudo touch /etc/init/pulseaudio.override

Then we will set the Service to manual.

echo "manual" | sudo tee -a /etc/init/pulseaudio.override

If you need the service you can start him manually with sudo service pulseaudio start

If you need your Service at boot again remove the createt file.

Could not better explain, my english ist very bad.

You must log in to answer this question.

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