In many cases you need to work with service boot persistence in Linux, which means all those services like ssh, HTTP is started automatically when you boot the system. The best example of the need for this service is when you are installing a remote Linux server which will be accessed using ssh. When you boot the system these services are automatically started in the system.
How to Automatically Start Service on Boot?
To automatically start any service like ssh as an example you just need to type the simple command that is
update-rc.d ssh enable
Similarly for HTTP service, we can use the below command.
update-rc.d apache2 enable
After this, both these services should persist on the next reboot.
There are also tools available to do the same as rcconf and sysv-rc-conf which will help you do the same task in a much efficient way. To use rcconf we would simply type “rcconf” in terminal and rcconf is launched.
- How to find time taken by a command/program on Linux Shell?
- Terminal Mail and Linux Security Mail
- Linux Virtualization - Chroot Jail
- Linux Virtualization : Linux Containers (lxc)
- Linux Kernel Module Programming: Hello World Program
- Formatted text in Linux Terminal using Python
- Some useful Linux Hacks
- Daily life Linux Commands
- Basic Linux Commands for day to day life
- Initializing and Cache Mechanism in Linux Kernel
- How to add "graphics.h" C/C++ library to gcc compiler in Linux
- Working with Magic numbers in Linux
- Reset a lost Linux administrative password and Explanation
- dup() and dup2() Linux system call
- Encrypt/Decrypt Files in Linux using Ccrypt