author | Oleksandr Gavenko <gavenkoa@gmail.com> |
Wed, 08 Aug 2018 23:14:45 +0300 | |
changeset 2263 | 0243bb26fe02 |
parent 2235 | eb6107487d83 |
child 2287 | fcdd583e8795 |
permissions | -rw-r--r-- |
2234 | 1 |
.. -*- coding: utf-8; -*- |
2 |
||
3 |
===================== |
|
4 |
Alpine Linux distro |
|
5 |
===================== |
|
6 |
.. contents:: |
|
7 |
:local: |
|
8 |
||
2235
eb6107487d83
Alpine Linux Init System.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2234
diff
changeset
|
9 |
Init system |
eb6107487d83
Alpine Linux Init System.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2234
diff
changeset
|
10 |
=========== |
eb6107487d83
Alpine Linux Init System.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2234
diff
changeset
|
11 |
|
eb6107487d83
Alpine Linux Init System.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2234
diff
changeset
|
12 |
Manage run levels:: |
eb6107487d83
Alpine Linux Init System.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2234
diff
changeset
|
13 |
|
eb6107487d83
Alpine Linux Init System.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2234
diff
changeset
|
14 |
rc-update add $SERVICE $LEVEL |
eb6107487d83
Alpine Linux Init System.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2234
diff
changeset
|
15 |
rc-update del $SERVICE $LEVEL |
eb6107487d83
Alpine Linux Init System.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2234
diff
changeset
|
16 |
rc-service $SERVICE start |
eb6107487d83
Alpine Linux Init System.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2234
diff
changeset
|
17 |
rc-service $SERVICE restart |
eb6107487d83
Alpine Linux Init System.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2234
diff
changeset
|
18 |
rc-service $SERVICE stop |
eb6107487d83
Alpine Linux Init System.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2234
diff
changeset
|
19 |
|
eb6107487d83
Alpine Linux Init System.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2234
diff
changeset
|
20 |
Equivalent to shutdown -r now from traditional GNU/Linux systems:: |
eb6107487d83
Alpine Linux Init System.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2234
diff
changeset
|
21 |
|
eb6107487d83
Alpine Linux Init System.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2234
diff
changeset
|
22 |
reboot |
eb6107487d83
Alpine Linux Init System.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2234
diff
changeset
|
23 |
|
eb6107487d83
Alpine Linux Init System.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2234
diff
changeset
|
24 |
Equivalent to shutdown -h now from traditional GNU/Linux systems:: |
eb6107487d83
Alpine Linux Init System.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2234
diff
changeset
|
25 |
|
eb6107487d83
Alpine Linux Init System.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2234
diff
changeset
|
26 |
halt |
eb6107487d83
Alpine Linux Init System.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2234
diff
changeset
|
27 |
|
eb6107487d83
Alpine Linux Init System.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2234
diff
changeset
|
28 |
To turn off the machine:: |
eb6107487d83
Alpine Linux Init System.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2234
diff
changeset
|
29 |
|
eb6107487d83
Alpine Linux Init System.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2234
diff
changeset
|
30 |
poweroff |
eb6107487d83
Alpine Linux Init System.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2234
diff
changeset
|
31 |
|
eb6107487d83
Alpine Linux Init System.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2234
diff
changeset
|
32 |
https://wiki.alpinelinux.org/wiki/Alpine_Linux_Init_System |
eb6107487d83
Alpine Linux Init System.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2234
diff
changeset
|
33 |
Alpine Linux Init System |
eb6107487d83
Alpine Linux Init System.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2234
diff
changeset
|
34 |
|
2234 | 35 |
Package manager |
36 |
=============== |
|
37 |
||
38 |
Update local package database:: |
|
39 |
||
40 |
$ sudo apk update |
|
41 |
||
42 |
Upgrade package to latest version:: |
|
43 |
||
44 |
$ sudo apk upgrade |
|
45 |
||
46 |
Install package:: |
|
47 |
||
48 |
$ sudo apk add bash |
|
49 |
||
50 |
Do not grab package index with ``--no-cache `` option to reduce installation size:: |
|
51 |
||
52 |
$ apk add --no-cache bash |
|
53 |