Get the App
SLTechnology News&Howtos  ›  Servers  › 

Boot settings in Debian and Ubuntu systems

Shulou Source: shulou.com Published: 2022-06-03 09:51:18 12月06日 Update

Linux system is widely used in Unix system, and there are many other systems based on Linux kernel, such as Debian and Ubuntu. Under Linux system, the usual boot / etc/rc.local or / etc/rc.d/rc.local is gone, so when you need to start boot under Debian or Ubuntu, you need to use update-rc.d to define boot command. Take a simple example to boot iptables in Debian and Ubuntu:

Iptables is not made into a service similar to that under Linux in Debian and Ubuntu, so update-rc.d is used when you need to start. We know from the man manual that update-rc.d needs to have startup files in the / etc/init.d directory, so you can open iptables under Debian or Ubuntu in the following ways:

Root@localhost:/usr/local/scripts# vim iptables.shemaking raceme binapachedbashUnitionsbintablesRestoration < / usr/local/scripts/iptablesroot@localhost:/usr/local/scripts# ln-sv / usr/local/scripts/iptables.sh / etc/init.d/iptablesroot@localhost:/usr/local/scripts# update-rc.d iptables defaults

In this way, the self-defined iptables file will be imported and enabled at boot time, and it is easy to define the self-starting service in some systems in update-rc.d, such as enabling the self-starting ssh service:

Root@localhost:/usr/local/scripts# update-rc.d ssh enable

This enables the boot ssh service, which is similar to chkconfig and systemctl in Linux systems. Of course, for more information on how to use it, please refer to the man help manual.

Tags: Systems services manuals files under usage examples kernels available through commands methods methods more directories help derivation Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Tech Info Microsoft Apple Huawei NVidia