Terminal cheat sheet
Here's a small reference for working with postmarketOS/Alpine Linux.
The package manager in postmarketOS is called
apk, the Alpine Package Keeper. The list of packages can be found on https://pkgs.alpinelinux.org/packages and https://pkgs.postmarketos.org/packages as both repositories are added to postmarketOS installations.
Installing a package
$ apk add vim
Uninstalling a package
$ apk del vim
Upgrading the system. The
-a option allows downgrading packages to what's available in the repository. This is sometimes needed when packages are moved from a git version to a stable release.
$ apk upgrade -a
The repositories are stored in
/etc/apk/repositories as one repository url per line. There's also
/etc/apk/world which is a list of packages that are explicitly installed. It's possible to add/remove packages from this list and then running
apk fix to apply those changes.
The service manager in postmarketOS is openrc. The basic service management is done with the familiar
$ service networkmanager status $ service networkmanager start $ service networkmanager stop $ service networkmanager restart
To enable or disable services on boot you use the
List the services that are added to a runlevel $ rc-update bootmisc | boot chronyd | default dbus | default devfs | sysinit dmesg | sysinit gdm | default haveged | default hostname | boot hwclock | boot killprocs | shutdown Start NetworkManager on boot (in the default runlevel) $ rc-update add networkmanager default Stop NetworkManager starting on boot $ rc-update del networkmanager default
By default postmarketOS uses the busybox logging daemon for the syslog and it's configured to log to memory only. The
logread command is used to read the in-memory log.
Man pages are not installed by default and are seperate from the normal packages. The
docs package is a metapackage that will pull in all the documentation for the software you have installed. You can also install only the documentation you need by not installing the
but installing the specific documentation subpackage. For example for vim documentation you can install
the mandoc package is the man page reader itself the man-apropos adds the apropos manpage search tool the man-pages package will add the pages for core software like chmod but also linux headers the docs package is a metapackage that pulls in the -doc package for everything you install $ apk add mandoc man-apropos man-pages docs $ man vim