To enable and start services on Alpine Linux, you can use the rc-update
and rc-service
commands.
rc-update
command with the add
option followed by the name of the service and the runlevel. For example, to enable the sshd
service at boot time, you can use the following command:rc-update add sshd default
This will add the sshd
service to the default runlevel, which is the runlevel that is used when the system boots.
rc-service
command with the start
option followed by the name of the service. For example, to start the sshd
service, you can use the following command:rc-service sshd start
This will start the sshd
service.
Note that the rc-update
and rc-service
commands are part of the OpenRC init system, which is used by Alpine Linux.