How to enable and start services on Alpine Linux

To enable and start services on Alpine Linux, you can use the rc-update and service commands.

Here’s the basic process:

  1. Enable the service:

     
    # rc-update add [service-name] default

    Replace [service-name] with the name of the service you want to enable, such as sshd for the SSH daemon. The default argument sets the service to start at boot time.

  2. Start the service:

     
    # service [service-name] start

    Replace [service-name] with the name of the service you want to start, such as sshd for the SSH daemon.

For example, to enable and start the SSH daemon on Alpine Linux, you can run the following commands:

 
# rc-update add ssh default
# service ssh start

You can check the status of the service using the service command:

 
# service [service-name] status

Replace [service-name] with the name of the service you want to check, such as sshd for the SSH daemon.

Note: You may need to run these commands as the root user or use sudo to temporarily elevate your privileges.

Leave a Comment