alpine.rst
author Oleksandr Gavenko <gavenkoa@gmail.com>
Wed, 19 Dec 2018 14:07:30 +0200
changeset 2307 08aa10b9c7ff
parent 2296 2a1cf17e9552
child 2325 b127237b615f
permissions -rw-r--r--
Add timestamp to Vagrant log.

.. -*- coding: utf-8; -*-

=====================
 Alpine Linux distro
=====================
.. contents::
   :local:

Init system
===========

Manage run levels::

  rc-update add $SERVICE $LEVEL
  rc-update del $SERVICE $LEVEL

Run levels meaning:

Starting/stopping services::

  rc-service $SERVICE status
  rc-service $SERVICE start
  rc-service $SERVICE stop
  rc-service $SERVICE restart

Equivalent to shutdown -r now from traditional GNU/Linux systems::

  reboot

Equivalent to shutdown -h now from traditional GNU/Linux systems::

  halt

To turn off the machine::

  poweroff

https://wiki.alpinelinux.org/wiki/Alpine_Linux_Init_System
  Alpine Linux Init System

Package manager
===============

Update local package database::

  $ sudo apk update

Upgrade packages to latest version::

  $ sudo apk upgrade

Upgrade only specific package::

  $ sudo apk add -u busybox

Install package::

  $ sudo apk add bash
  $ sudo apk add --allow-untrusted /path/to/file.apk

Do not grab package index with ``--no-cache`` option to reduce installation size::

  $ apk add --no-cache bash

Remove package::

  $ sudo apk del openssh

Search for packages::

  $ apk search 'emacs*'
  $ apk search -v 'emacs*'

List of installed packages::

  $ apk info

Package owning file::

  $ apk info --who-owns `which apk`

Show package content::

  $ apk info -L  $PKG

Developing Apline
=================

::

  $ apk add -U build-base
  $ apk add -U alpine-sdk