To enable and start services on Alpine Linux, you can use the rc-update and service commands.
Here’s the basic process:
-
Enable the service:
# rc-update add [service-name] default
Replace
[service-name]with the name of the service you want to enable, such assshdfor the SSH daemon. Thedefaultargument sets the service to start at boot time. -
Start the service:
# service [service-name] start
Replace
[service-name]with the name of the service you want to start, such assshdfor 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.