Alpine Linux¶
Reference guide for Alpine Linux covering package management, OpenRC service management, and user administration.
Package Management¶
Alpine Linux uses apk as its package manager.
Service Management¶
Alpine Linux uses OpenRC for service management.
User Management¶
Alpine ships with BusyBox utilities. The adduser syntax differs slightly from GNU/Linux distributions.
SSH Server¶
The SSH daemon configuration is at /etc/ssh/sshd_config.
Authorized keys for a user go in ~/.ssh/authorized_keys with permissions 600, and the .ssh directory must be 700.
Set up authorized_keys for a user
mkdir -p /home/username/.ssh
chmod 700 /home/username/.ssh
echo "ssh-ed25519 AAAA... comment" >> /home/username/.ssh/authorized_keys
chmod 600 /home/username/.ssh/authorized_keys
chown -R username:username /home/username/.ssh
Timezone¶
Set timezone to Asia/Tokyo
apk add tzdata
cp /usr/share/zoneinfo/Asia/Tokyo /etc/localtime
echo "Asia/Tokyo" > /etc/timezone