Alpine newbie apk packages

From Alpine Linux
Revision as of 22:03, 27 September 2019 by Mckaygerhard (talk | contribs)
Jump to: navigation, search

Packages provide the basic components of an operating system, along with shared libraries, applications, services, and documentation.

This document will guide most new users to only basic needs about. If wants more in deep information see the ALpine package management behavior section in this document page.

New users: post setup closes to others systems

After install Alpine, you will need post install preparation of your system, due new/common users will need some extra suggestions to proper usage, due all the Alpine system are busybox based:

Note: Due you just install we will assumed you already have network available by wired connection, if you have speciall need respect newtworking please read Alpine advanced - networking to property setup your internet connection
machine name

First setup your machine name, that are already used in the network if you will connect to any net:

hostname MyMachine
echo "MyMachine" > /etc/hostname
sed -i -r 's#*# MyMachine#g' /etc/hosts

network setup

New users: common needed package to install

Packages and programs on alpine are described on Alpine_newbie: Packages overall info

enable repository packages

Repositories are need due are where will be retrieve those packages of programs as described on Alpine_newbie: Packages overall info, run:

cat > /etc/apk/repositories << EOF$(cat /etc/alpine-release | cut -d'.' -f1,2)/main$(cat /etc/alpine-release | cut -d'.' -f1,2)/community

apk update

install basic tools

As explain in Alpine Linux:Overview, the system always will be minimalist, so if you expected a behavior like others linux those will be provided a minimal similitude to, runs:

apk add attr dialog dialog-doc bash bash-doc bash-completion grep grep-doc

apk add util-linux util-linux-doc pciutils usbutils binutils findutils readline

apk add man man-pages lsof lsof-doc less less-doc nano nano-doc curl curl-doc

export PAGER=less

manpages in alpine

You noted in previous section, that some packages has a "xxx-doc" related.. as explained beforein Alpine Linux:Overview, the system always will be minimalist, and if you wants a manpage of any program on a package of software, always must install the "program" and also "program-doc" related part package.

Take in consideration that in some earlier version of alpine not all package have a doc package yet available.

coreutils libc and utmps in alpine

Some programs like wall(1) depends on a libc feature named "utmp", that cannot be implemented in the libc in a secure way. For this reason, musl (the libc that Alpine uses) does not implement utmp; instead, it provides stubs that do nothing.

That is why programs that use utmps - such as wall, who or w - output nothing but still exit successfully. This is expected, a feature, and cannot be quick-fixed.

Some has pretty solution, utmps are only in "edge" repositories, so let's do that for some functionality aware, lest activate edge repository, install temprally software and later deactivating:

cat > /etc/apk/repositories << EOF$(cat /etc/alpine-release | cut -d'.' -f1,2)/main$(cat /etc/alpine-release | cut -d'.' -f1,2)/community

apk update

apk add utmps

cat > /etc/apk/repositories << EOF$(cat /etc/alpine-release | cut -d'.' -f1,2)/main$(cat /etc/alpine-release | cut -d'.' -f1,2)/community

apk update

apk add  coreutils coreutils-doc


configure system base
continue to desktop
Previous required What's next to read
Alpine newbie install manual Alpine newbie desktops

ALpine package management behavior

This section are not for new users, please go next to Alpine newbie desktops or Alpine Newbies: Xorg and Openbox if you only want to setup your system.

The programs, the software installed to Alpine comes from two places, a repository with the following structure: http://<host>/alpine/<version>/<brach> (an URl that can be invoked with apk listed in the /etc/apk/repositories file) and original upstream sources (those compiled as Unix-like traditional way).

As new user you can read the Alpine newbie apk packages page.. but please read the rest of this section to introduce to:

Alpine Software Packages

Alpine software repositories have main packages and contributions made:

  • About the main packages: Main packages are the Alpine package software that have direct support and updates from the Alpine core and main team, also have official special documentation. Are always available for all releases and will have almost substitutions if some are not continued from upstream. Commonly those packages are selected due their responsibility and stability respect upstream availability.
  • About the contribution ones: User package contribution repositories are those made by users in team with the official developers and well near integrated to the Alpine packages. Those have supported by those user contributions and could end if the user also ends respect with Alpine work, by example could not have substitution in next release due lack of support by upstream author.
Alpine APK user resources

Alpine new users have two resources for the packaging management, the page for search friendly way, and the Alpine newbie apk packages page that describes how to use the apk-tool easy.

Alpine APK quick infrastructure

Software packages for Alpine Linux are digitally signed tar.gz archives containing programs, configuration files, and dependency metadata. They have the extension .apk, and are often called "a-packs".

The apk command are located at /sbin/apk, admin and manages the getting of the packages of software, it uses /etc/apk/ place for the configurations files, and stores all downloaded "a-packs" files in /etc/apk/cache from the repositories before unpacks and put the package files compiled into the installed system.

Table of busybox sustitutions
Table of comparison with other Linux for packages
OS File Format Tools
Alpine .apk apk
Debian .deb apt,aptitude
Geento .tbz2 emerge
FreeBSD .txz pkg

Tutorial series

Previous required What's next to read
Alpine newbie install manual Alpine newbie desktops

See Also

  1. Alpine newbie
  2. Alpine newbie install manual
  3. Alpine newbie apk packages
  4. Alpine newbie desktops
  5. Alpine newbie developer
  6. Alpine newbie lammers