wiki

Help! I'm trapped in a wiki!

Site Tools


distros:alpine:alpine_linux

alpine linux

Lightweight distribution targeted at servers, containers, etc.

OpenRC

alpine uses the OpenRC init system called with rc-service. The syntax is rc-service <service-name> action

OpenRC is based on runlevels, so enabling/disabling a service means adding/removing it from a runlevel. This is done with rc-update.
The usual syntax is rc-update {add,delete,show} service [runlevel].
An example: to add sshd to the default runlevel, do rc-update add sshd default.

init.d scripts

Services are managed via scripts in /etc/init.d/. These scripts are more or less generalized, and can configure options such as commandline arguments via /etc/conf.d/.

apk

apline package manager. Syntax sometimes similar to apt.

install: apk add vim
remove: apk del vim

dropbear ssh

lightweight alternative to openSSH
configure at /etc/conf.d/dropbear

Adding certificates

At least on postmarketOS v24.12, curl fails connecting to some websites securely with HTTPS because it can't verify some CA certificates. Commonly, it's the Cisco Umbrella Root certificate.
The error is like curl: (60) SSL certificate problem: unable to get local issuer certificate

To add a certificate into the system store, place it in crt format under /usr/local/share/ca-certificates/ and run sudo update-ca-certificates.

UFW

See https://wiki.alpinelinux.org/wiki/Uncomplicated_Firewall on how to enable and configure ufw on alpine.
Check https://wiki.postmarketos.org/wiki/Firewall#Configuring_the_kernel_to_support_nftables for postmarketos support.

sudo ln -sf /usr/sbin/xtables-legacy-multi iptables to make iptables use the legacy backend for old devices without nftables support.

Logging

tail -f /var/log/messages

Oracle cloud install

See Alex's article on how to install alpine on OCI at https://alextsang.net/articles/20191006-063049/index.html

See also

distros/alpine/alpine_linux.txt · Last modified: by 127.0.0.1