• Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • News
  • Tutorials
  • Forums
  • Tags
  • Users
Tutorial News Comments FAQ Related Articles

How to Manage Services with update-rc.d on Ubuntu 21.04

  • 00:46 systemctl is-active apache2 && systemctl is-active mariadb
  • 00:52 lsb_release -a
  • 01:24 update-rc.d -f apache2 remove
  • 01:48 update-rc.d -f mariadb remove
  • 02:08 service apache2 stop && service mariadb stop
  • 02:46 systemctl is-active apache2 && systemctl is-active mariadb
  • 03:30 update-rc.d apache2 defaults
  • 03:52 update-rc.d mariadb defaults
  • 04:09 update-rc.d apache2 defaults 90 90
  • 04:40 update-rc.d mariadb defaults 10 10
  • 05:04 update-rc.d apache2 enable 2 3 4 5
  • 05:27 update-rc.d mariadb enable 2 3 4 5
  • 05:48 service apache2 start
  • 05:58 service mariadb start
{{postValue.id}}

To Manage Services with update-rc.d on Ubuntu 21.04

Introduction:

Update-rc.d updates the System V style init script links which updates the System V style init script. Init runs these links when changing run levels. In general, they are used to start and stop system services such as daemons.

Installation Procedure:

Step 1: Check the OS version by using the below command

root@linuxhelp:~# lsb_release -a 
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 21.04
Release:	21.04
Codename:	hirsute

Step 2: Check the Activity status of the services by using the below command

root@linuxhelp:~# systemctl is-active apache2 && systemctl is-active mariadb 
active
active

Step 3: Remove all the starting scripts on apache2 service by using the below command

root@linuxhelp:~# update-rc.d -f apache2 remove

Step 4: Remove all the starting scripts on mariadb services by using the below command

root@linuxhelp:~# update-rc.d -f mariadb remove 

Step 5: Stop the services by using the below command

root@linuxhelp:~# service apache2 stop && service mariadb stop 

Step 6: Recheck the Activity status of the services by using the below command

root@linuxhelp:~# systemctl is-active apache2 && systemctl is-active mariadb 
inactive

Step 7: Enable the apache2 service as defaults by using the below command

root@linuxhelp:~# update-rc.d apache2 defaults 

Step 8: Enable the mariadb service as defaults

root@linuxhelp:~# update-rc.d mariadb defaults 

Step 9: Start and kill the apache2 service with custom priorities

root@linuxhelp:~# update-rc.d apache2 defaults 90 90

Step 10: Start and kill the mariadb service with custom priorities

root@linuxhelp:~# update-rc.d mariadb defaults 10 10

Step 11: Enable the apache2 service with custom run levels

root@linuxhelp:~# update-rc.d apache2 enable 2 3 4 5

Step 12: Enable the mariadb service with custom run levels

root@linuxhelp:~# update-rc.d mariadb enable 2 3 4 5

Step 13: Start the apache2 service by using the below command

root@linuxhelp:~# service apache2 start 

Step 14: Start the mariadb service by using the below command

root@linuxhelp:~# service mariadb start 

By this to Manage Services with update-rc.d on Ubuntu 21.04 have been completed.

Tags:
connor
Author: 

Comments ( 0 )

No comments available

Add a comment
{{postCtrl.cmtErrMsg}}

Frequently asked questions ( 5 )

Q

What are the service managing commands for Debian and Ubuntu systems?

A

Service commands are used by Debian and Ubuntu to manage services and update-rc.d is used to add and remove services from the startup menu.

Q

What mean command?

A

This command means that the init.d script will be disabled for the named service.

Q

What does that the -f do in update-rc.d?

A

The option -f will Force the removal of symlinks even if /etc/init.d/name still exists.

Q

How to view all services in the system?

A

To view all services in the system use command

Q

How to set Start and Kill priority for services?

A

To set Start and Kill priority for services use command

Back To Top!
Rank
User
Points

Top Contributers

userNamenaveelansari
135850

Top Contributers

userNameayanbhatti
92510

Top Contributers

userNamehamzaahmed
32150

Top Contributers

1
userNamelinuxhelp
31040

Top Contributers

userNamemuhammadali
24500
Can you help Lucas ?
Various options in Top command

Am using Top command only to view the load average, what are the various options in Top command..??

Networking
  • Routing
  • trunk
  • Netmask
  • Packet Capture
  • domain
  • HTTP Proxy
Server Setup
  • NFS
  • KVM
  • Memory
  • Sendmail
  • WebDAV
  • LXC
Shell Commands
  • Cloud commander
  • Command line archive tools
  • last command
  • Shell
  • terminal
  • Throttle
Desktop Application
  • Linux app
  • Pithos
  • Retrospect
  • Scribe
  • TortoiseHg
  • 4Images
Monitoring Tool
  • Monit
  • Apache Server Monitoring
  • EtherApe 
  • Arpwatch Tool
  • Auditd
  • Barman
Web Application
  • Nutch
  • Amazon VPC
  • FarmWarDeployer
  • Rukovoditel
  • Mirror site
  • Chef
Contact Us | Terms of Use| Privacy Policy| Disclaimer
© 2025 LinuxHelp.com All rights reserved. Linux™ is the registered trademark of Linus Torvalds. This site is not affiliated with linus torvalds in any way.