ISO image file
https://dl-cdn.alpinelinux.org/alpine/latest-stable/releases/x86_64/
⇨ Extended ISO [~1.1GB]
• Standard ISO [~270MB]
There is no sudo. Alpine Linux uses doas.
Install man pages
$ apk add docs
docs is a metapackage that pulls in mandoc
Fix lacking lsusb and lspci output
$ apk add usbutils hwdata
Install desktop environment
$ setup-desktop
Install device manager (eudev is a drop-in replacement for systemd udev)
$ setup-devd udev
Install D-Bus if needed
$ apk add dbus dbus-x11
$ rc-update add dbus
$ rc-service dbus start
Install polkit and elogind
$ apk add polkit-elogind
$ rc-update add polkit
$ rc-service polkit start
$ apk add xfce-polkit
$ apk add elogind
$ rc-update add elogind
$ rc-service elogind start
Install PipeWire and related components
$ apk add pipewire wireplumber pipewire-pulse pipewire-alsa pavucontrol
Install fonts
$ apk add font-terminus font-inconsolata font-dejavu font-noto font-noto-cjk font-awesome font-noto-extra
Start login manager
$ rc-service lightdm start
Alpine Package Keeper (apk)
Search for a package name
$ apk search vim
and show description too
$ apk search -v vim
Search for exact match (-e or -x or --exact)
$ apk search -e vim
Search in description (--description)
$ apk search -d vim
Search reverse dependencies / required by (--rdepends)
$ apk search -r gvim
Add (install)
$ apk add vim
or manually edit package list
$ vim /etc/apk/world
$ apk fix
Delete (remove/uninstall)
$ apk del vim
and recursively delete dependencies
$ apk del -r vim
Fix (reinstall)
$ apk fix vim
and also fix dependencies (--depends)
$ apk fix -d vim
Update package list and upgrade all packages
$ apk update
$ apk upgrade
or both actions combined
$ apk -U upgrade
Upgrade specific package(s)
$ apk upgrade vim screen mc htop nmap
or
$ apk add -u vim
Prevent package upgrade
$ apk add 'vim=9.1.1415-r0'
or
$ apk add 'vim<9.1.1415'
then allow upgrading later
$ apk add 'vim>9.1.1415'
Ask for confirmation (--interactive)
$ apk -i upgrade
Do not make any changes (--simulate)
$ apk -s upgrade
Remove old packages from cache
$ apk cache clean
List all packages (show license and installation status by default)
$ apk list
List specific package(s)
$ apk list vim
and also show description
$ apk list -v vim
List upgradable packages
$ apk list -u
but do not show license and status (--quiet)
$ apk list -u -q
List installed packages
$ apk list -I
List orphaned packages
$ apk list -O
Show installed packages
$ apk info
and show version information
$ apk info -v
and include version and description
$ apk info -vv
Show "required by" reverse dependencies (--rdepends)
$ apk info -r xxd
Show "depends on" package dependencies (--depends)
$ apk info -R vim
Show "contains" – files provided by package (--contents)
$ apk info -L vim
Show "is owned by" – which package owns the specific file (--who-owns)
$ apk info -W /etc/rc.conf
Show all information about package (--all)
$ apk info -a vim
Show statistics about all packages
$ apk stats
1. Edit /etc/apk/repositories and change all instances of the release version number
$ setup-apkrepos
Alternatively, instead of specific version, use "latest-stable" which will always trigger release upgrades whenever version changes. Beware.
2. Update repository index / package list
$ apk update
3. First, upgrade apk package manager itself if needed
$ apk add --upgrade apk-tools
or
$ apk upgrade --self-upgrade-only
4. Then upgrade all available packages
$ apk upgrade --available
Option --available forces all packages to be upgraded, even if they have the same version numbers.
Start, stop, restart, status of services
$ rc-service sshd start
$ rc-service lightdm stop
$ rc-service networking restart
$ rc-service networking status
Add, delete services
$ rc-update add sshd
$ rc-update delete sshd
Show all services and their corresponding runlevels
$ rc-update show
include all services, even without runlevel
$ rc-update show -v
Show services at specific runlevel
$ rc-update show default
$ rc-update show boot
View active runlevel and services
$ rc-status
List runlevels
$ rc-status -l
Change runlevel
$ openrc single
$ openrc default
There is no glibc. Alpine Linux uses musl C library.
Install the compatibility layer and then run glibc binaries as usual
$ apk add gcompat