Thursday, May 19, 2016

Enable or disable a service from autostarting on ubuntu and derivatives

To make a upsmon service to autostart during bootup:

sudo update-rc.d upsmon enable

The output looks like this:

update-rc.d: warning: /etc/init.d/upsmon missing LSB information
update-rc.d: see
 Disabling system startup links for /etc/init.d/upsmon ...
 Removing any system startup links for /etc/init.d/upsmon ...
   /etc/rc0.d/K06upsmon
   /etc/rc1.d/K06upsmon
   /etc/rc2.d/S61upsmon
   /etc/rc3.d/S61upsmon
   /etc/rc5.d/S61upsmon
   /etc/rc6.d/K06upsmon
 Adding system startup for /etc/init.d/upsmon ...
   /etc/rc0.d/K06upsmon -> ../init.d/upsmon
   /etc/rc1.d/K06upsmon -> ../init.d/upsmon
   /etc/rc6.d/K06upsmon -> ../init.d/upsmon
   /etc/rc2.d/K39upsmon -> ../init.d/upsmon
   /etc/rc3.d/K39upsmon -> ../init.d/upsmon
   /etc/rc5.d/K39upsmon -> ../init.d/upsmon


To disable autostart:

sudo update-rc.d upsmon disable


The output:

update-rc.d: warning: /etc/init.d/upsmon missing LSB information
update-rc.d: see
 Enabling system startup links for /etc/init.d/upsmon ...
 Removing any system startup links for /etc/init.d/upsmon ...
   /etc/rc0.d/K06upsmon                                                                          
   /etc/rc1.d/K06upsmon                                                                          
   /etc/rc2.d/K39upsmon                                                                          
   /etc/rc3.d/K39upsmon                                                                          
   /etc/rc5.d/K39upsmon                                                                          
   /etc/rc6.d/K06upsmon
 Adding system startup for /etc/init.d/upsmon ...
   /etc/rc0.d/K06upsmon -> ../init.d/upsmon
   /etc/rc1.d/K06upsmon -> ../init.d/upsmon
   /etc/rc6.d/K06upsmon -> ../init.d/upsmon
   /etc/rc2.d/S61upsmon -> ../init.d/upsmon
   /etc/rc3.d/S61upsmon -> ../init.d/upsmon
   /etc/rc5.d/S61upsmon -> ../init.d/upsmon

















To see available services:




service --status-all

No comments:

Second monitor no display after latest update - KDE-neon

 After latest update as of Oct 3, 2023, my second monitor was undetected with latest kernel (6.2.0-33-generic). If I boot with previous kern...