Managing startup services

Although being much more conservative (and sound) than M$ Windows, also linux systems have several programs and services run at startup. Here is how you can manage, add and remove them.

Since Ubuntu Karmic 9.10 more and more services are switched from Init to Upstart. This means the above mentioned procedures are not valid any more for the transitioned services. At the time of writing we can manage these startup services only by hand moving out their script.

Basically those services we do not want to load automatically at boot time should have their config script moved to another directory, let’s say init-disabled

mv /etc/init/apport.conf /etc/init-disabled/apport.conf

——

Init services scripts are located in

(on Ubuntu, Debian, SuSE)

/etc/init.d/ 

(on RedHat, Fedora)

/etc/rc.d/init.d

you can manually act with those scripts:
sudo /etc/init.d/[script] start/stop/restart/force-reload

scripts managers:

on Ubuntu
System -> Administration -> Services

on Ubuntu,Debian

update-rc.d [daemon] defaults/remove

note: in order for the script to be added (defaults) it must be present in /etc/init.d, on the other hand for the script to be removed it must be either delated/renamed from the same folder or must be used the force -f option. The latter is more convenient since enables you and other programs to start the daemon when needed.

update-rc.d -f [daemon] remove

on RedHat

redhat-config-services

on Fedora

system-config-services

other useful utilities to accomplish these tasks (installable via apt-get install are:

sysv-rc-conf
chkconfig
sysvconfig [deprecated]
bum

Related posts:

  1. Runlevels
  2. Run a program at startup in Windows
  3. eee-control – the best device control tray icon for Eee-PCs
  4. Speed up Ubuntu Linux!
  5. fast deployment of secure (APOP) Qpopper email pop3 server
  6. Compiling conky from sources
  7. Disk quota management
| Print This Post Print This Post | Email This Post Email This Post
RSS 2.0 | Trackback | Comment

3 Responses to “Managing startup services”

  1. darshan says:

    I tried stopping some services(apache,tomcat etc) via Gnome.It didn’t work.What could be the reason.Should I place a script in my bash profile to do the same?

    • aldeby says:

      darshan,
      do you actually have apache, tomcat, etc servers up and running on your desktop??

      If you need a local webserver for testing your own website/blog consider using XAMPP which is far more easy to manage and you can easily start only when needed.

      Generally speaking if you do not need those services uninstalling them via Package Manager is the wisest solution. Otherwise you may shut them down via this command
      sudo /etc/init.d/apache stop
      which of course can be added to a batch file, although this makes really nonsense to me.

      I hope to have spoken clearly…

  2. [...] to tweak services startup refer to post Managing startup services Comments on what some services actually are meant to can be found here [...]

Leave a Reply

XHTML: You can use these tags: b, cite, code, em, i, q cite="", strike, strong.