https://wiki.alpinelinux.org/w/api.php?action=feedcontributions&user=Guest09248&feedformat=atomAlpine Linux - User contributions [en]2024-03-29T01:15:21ZUser contributionsMediaWiki 1.40.0https://wiki.alpinelinux.org/w/index.php?title=Apk&diff=22318Apk2022-09-13T17:40:48Z<p>Guest09248: Changed redirect target from Package management to Alpine Package Keeper</p>
<hr />
<div>#REDIRECT [[Alpine Package Keeper]]</div>Guest09248https://wiki.alpinelinux.org/w/index.php?title=Talk:Package_management&diff=22317Talk:Package management2022-09-13T17:40:17Z<p>Guest09248: Guest09248 moved page Talk:Package management to Talk:Alpine Package Keeper: Moved to be more consistent with other docs/wikis</p>
<hr />
<div>#REDIRECT [[Talk:Alpine Package Keeper]]</div>Guest09248https://wiki.alpinelinux.org/w/index.php?title=Talk:Alpine_Package_Keeper&diff=22316Talk:Alpine Package Keeper2022-09-13T17:40:17Z<p>Guest09248: Guest09248 moved page Talk:Package management to Talk:Alpine Package Keeper: Moved to be more consistent with other docs/wikis</p>
<hr />
<div>== note on apk update ==<br />
<br />
There is an --update-cache or -U option which can be used together with ''apk <anything>'' that will first perform an ''apk update''. Might be worth mentioning that. --[[User:Ncopa|Ncopa]] 11:02, 16 August 2010 (UTC)<br />
<br />
There is an --initdb option that does not even show in apk help command. Is this deprecated ? --[[User:Vkrishn|Vkrishn]] ([[User talk:Vkrishn|talk]]) 10:32, 2 May 2013 (UTC)<br />
<br />
== "Packages and Repositories" section - ftp still being used? ==<br />
<br />
The stated section currently has the following example of a valid repo:<br />
<nowiki>ftp://dl-3.alpinelinux.org/alpine/v2.6/main</nowiki><br />
Is the '''ftp''' protocol still being used? <br />
The passage could then be updated to "v3.7".<br />
--[[User:John3-16|John3-16]] ([[User talk:John3-16|talk]]) 22:43, 19 January 2018 (UTC)<br />
<br />
== Troubleshooting - "apk-tools is old" ==<br />
<br />
Could the following instruction be added? This may not yet have been tested on a system that is still exhibiting this error message:<br />
<br />
If edge is not tagged, upgrade from one of the edge/main mirrors. For example:<br />
<br />
<pre>sudo apk add --upgrade apk-tools --update-cache --repository http://dl-2.alpinelinux.org/alpine/edge/main/ --allow-untrusted</pre><br />
<br />
--[[User:John3-16|John3-16]] ([[User talk:John3-16|talk]]) 04:58, 1 February 2018 (UTC)</div>Guest09248https://wiki.alpinelinux.org/w/index.php?title=Package_management&diff=22315Package management2022-09-13T17:40:17Z<p>Guest09248: Guest09248 moved page Package management to Alpine Package Keeper: Moved to be more consistent with other docs/wikis</p>
<hr />
<div>#REDIRECT [[Alpine Package Keeper]]</div>Guest09248https://wiki.alpinelinux.org/w/index.php?title=Alpine_Package_Keeper&diff=22314Alpine Package Keeper2022-09-13T17:40:17Z<p>Guest09248: Guest09248 moved page Package management to Alpine Package Keeper: Moved to be more consistent with other docs/wikis</p>
<hr />
<div><!--For searching: apk, APK--><br />
<br />
{{TOC right}}<br />
<br />
Because Alpine Linux is designed to run from RAM, package management involves two phases:<br />
* Installing / Upgrading / Deleting packages on a running system.<br />
* Restoring a system to a previously configured state (e.g. after reboot), including all previously installed packages and locally modified configuration files. '''(RAM-Based Installs Only)'''<br />
<br /><br />
'''apk''' is the tool used to install, upgrade, or delete software on a running system.<br /><br />
'''lbu''' is the tool used to capture the data necessary to restore a system to a previously configured state.<br />
<br />
This page documents the [https://git.alpinelinux.org/apk-tools/ apk tool] - See the [[Alpine_local_backup|Alpine Local Backup page]] for the lbu tool.<br />
<br />
= Overview =<br />
<br />
The '''apk''' tool supports the following operations:<br />
<br />
{|<br />
| [[#Add a Package|add]] <br />
| Add new packages or upgrade packages to the running system<br />
|-<br />
| [[#Remove a Package|del]]<br />
| Delete packages from the running system<br />
|-<br />
| fix <br />
| Attempt to repair or upgrade an installed package <br />
|-<br />
| [[#Update the Package list|update]] <br />
| Update the index of available packages<br />
|-<br />
| [[#Information on Packages|info]]<br />
| Prints information about installed or available packages<br />
|-<br />
| [[#Search for Packages|search]] <br />
| Search for packages or descriptions with wildcard patterns<br />
|-<br />
| [[#Upgrade a Running System|upgrade]]<br />
| Upgrade the currently installed packages<br />
|-<br />
| [[#Cache maintenance|cache]]<br />
| Maintenance operations for locally cached package repository<br />
|-<br />
| version <br />
| Compare version differences between installed and available packages<br />
|-<br />
| index <br />
| create a repository index from a list of packages<br />
|-<br />
| fetch <br />
| download (but not install) packages<br />
|-<br />
| audit <br />
| List changes to the file system from pristine package install state<br />
|-<br />
| verify <br />
| Verify a package signature<br />
|- <br />
| dot<br />
| Create a [http://graphviz.org/ graphviz] graph description for a given package<br />
|- <br />
| [[#apk_policy|policy]]<br />
| Display the repository that updates a given package, plus repositories that also offer the package<br />
|- <br />
| stats <br />
| Display statistics, including number of packages installed and available, number of directories and files, etc.<br />
|- <br />
| manifest<br />
| Display checksums for files contained in a given package<br />
|}<br />
<br />
= Packages and Repositories =<br />
<br />
Software packages for Alpine Linux are digitally signed tar.gz archives containing programs, configuration files, and dependency metadata. They have the extension <code>.apk</code>, and are often called "a-packs".<br />
<br />
The packages are stored in one or more ''repositories''. A repository is simply a directory with a collection of *.apk files. The directory must include a special index file, named {{Path|APKINDEX.tar.gz}} to be considered a repository.<br />
<br />
The '''apk''' utility can install packages from multiple repositories. The list of repositories to check is stored in {{Path|/etc/apk/repositories}}, one repository per line. If you booted from a USB stick ({{Path|/media/sda1}}) or CD-ROM ({{Path|/media/cdrom}}), your repository file probably looks something like this:<br />
<br />
{{Cat|/etc/apk/repositories|/media/sda1/apks/}}<br />
<br />
In addition to local repositories, the '''apk''' utility uses '''busybox wget''' to fetch packages using ''http:'', ''https:'' or ''ftp:'' protocols. The following is a valid repository file:<br />
<br />
{{Cat|/etc/apk/repositories|<br />
/media/sda1/apks<br />
http://dl-3.alpinelinux.org/alpine/v2.6/main<br />
https://dl-3.alpinelinux.org/alpine/v2.6/main<br />
ftp://dl-3.alpinelinux.org/alpine/v2.6/main<br />
}}<br />
<br />
{{Note| A list of public repositories is in [https://mirrors.alpinelinux.org/ mirrors.alpinelinux.org]. Accepted protocols vary.}}<br />
<br />
== Repository pinning ==<br />
<br />
You can specify additional "tagged" repositories in {{Path|/etc/apk/repositories}}:<br />
<br />
{{Cat|/etc/apk/repositories|<br />
http://nl.alpinelinux.org/alpine/v3.7/main<br />
http://nl.alpinelinux.org/alpine/v3.7/community<br />
@edge http://nl.alpinelinux.org/alpine/edge/main<br />
@edgecommunity http://nl.alpinelinux.org/alpine/edge/community<br />
@testing http://nl.alpinelinux.org/alpine/edge/testing<br />
}}<br />
<br />
After which you can "pin" dependencies to these tags using:<br />
<br />
{{cmd|apk add stableapp newapp@edge bleedingapp@testing}}<br />
<br />
Apk will now by default only use the untagged repositories, but adding a tag to specific package:<br />
<br />
1. will prefer the repository with that tag for the named package, even if a later version of the package is available in another repository<br />
<br />
2. ''allows'' pulling in dependencies for the tagged package from the tagged repository (though it ''prefers'' to use untagged repositories to satisfy dependencies if possible)<br />
<br />
== Commandline repository options ==<br />
<br />
By default, the '''apk''' utility will use the system repositories for all operations. This behavior can be overridden by the following options:<br />
<br />
{|<br />
| --repositories-file REPOFILE<br />
| Override the system repositories by specifying a repositories file.<br />
|-<br />
| <nowiki>-X|--repository REPO</nowiki><br />
| Specify a supplemental repository that will be used in addition to the system repositories. This option can be provided multiple times.<br />
|}<br />
<br />
= Update the Package list =<br />
<br />
Remote repositories change as packages are added and upgraded. To get the latest list of available packages, use the ''update'' command. The command downloads the {{Path|APKINDEX.tar.gz}} from each repository and stores it in the local cache, typically {{Path|/var/cache/apk/}}, {{Path|/var/lib/apk/}} or {{Path|/etc/apk/cache/}}.<br />
<br />
{{Cmd|apk update}}<br />
<br />
<!--<br />
fetch http://dl-3.alpinelinux.org/alpine/v2.1/main/APKINDEX.tar.gz<br />
--><br />
<br />
Adding the <code>--update-cache</code>, or for short <code>-U</code> switch to another apk command, as in <code>apk --update-cache upgrade</code> or <code>apk -U add ...</code>, the command has the same effect as first running <code>apk update</code> before the other apk command.<br />
<br />
{{Tip|With remote repositories, it is a good idea to always do an '''update''' right '''before''' doing an '''upgrade or add''' command. That way the command will install the latest available packages.}}<br />
<br />
= Add a Package =<br />
<br />
Use '''add''' to install packages from a repository. Any necessary dependencies are also installed. If you have multiple repositories, the '''add''' command installs the newest package.<br />
<br />
{{Cmd|apk add openssh<br />
apk add openssh openntp vim}}<br />
<br />
If you only have the main repository enabled in your configuration, apk will not include packages from the other repositories. To install a package from the edge/testing repository without changing your repository configuration file, use the command below. This will tell apk to use that particular repository.<br />
<br />
{{cmd|apk add cherokee --update-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing/ --allow-untrusted}}<br />
<br />
{{Note|Be careful when using third-party or the testing repository. Your system can go down.}}<br />
<br />
= Add a local Package =<br />
<br />
To install a locally available apk package, for example if this device has no internet access but you can upload apk packages directly to it, use the '''--allow-untrusted''' flag:<br />
<br />
{{cmd|apk add --allow-untrusted /path/to/file.apk}}<br />
<br />
Note that multiple packages can be given. When installing a local package, all dependencies should also be specified. For example:<br />
<br />
{{cmd|apk add --allow-untrusted /var/tig-2.2-r0.apk /var/git-2.11.1-20.apk}}<br />
<br />
= Remove a Package =<br />
Use '''del''' to remove a package (and dependencies that are no longer needed.) <br />
<br />
{{cmd|apk del openssh<br />
apk del openssh openntp vim}}<br />
<br />
= Upgrade a Running System =<br />
<br />
=== Packages in general ===<br />
<br />
To get the latest security upgrades and bugfixes available for the ''installed'' packages of a running system, first '''update''' the list of available packages and then '''upgrade''' the installed packages:<br />
<br />
{{cmd|apk update<br />
apk upgrade<br />
}}<br />
<br />
Or, combining the same into one single command:<br />
<br />
{{cmd|apk -U upgrade<br />
}}<br />
<br />
Here is an example, showing the procedure on a system that has several additional [[#Repository_pinning|repositories pinned]]:<br />
<br />
# apk update<br />
fetch <nowiki>http://dl-3.alpinelinux.org/alpine/v3.6/main/x86_64/APKINDEX.tar.gz</nowiki><br />
fetch <nowiki>http://dl-3.alpinelinux.org/alpine/v3.6/community/x86_64/APKINDEX.tar.gz</nowiki><br />
fetch <nowiki>http://dl-3.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz</nowiki><br />
fetch <nowiki>http://dl-3.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz</nowiki><br />
fetch <nowiki>http://dl-3.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz</nowiki><br />
v3.6.2-191-gf98d79930f <nowiki>[http://dl-3.alpinelinux.org/alpine/v3.6/main]</nowiki><br />
v3.6.2-190-ga5d68c47df <nowiki>[http://dl-3.alpinelinux.org/alpine/v3.6/community]</nowiki><br />
v3.6.0-4618-g0bf77c9821 <nowiki>[http://dl-3.alpinelinux.org/alpine/edge/main]</nowiki><br />
v3.6.0-4605-g85ed51dd83 <nowiki>[http://dl-3.alpinelinux.org/alpine/edge/community]</nowiki><br />
v3.6.0-4624-g11f1b9c8ab <nowiki>[http://dl-3.alpinelinux.org/alpine/edge/testing]</nowiki><br />
OK: 20118 distinct packages available<br />
<br />
# apk upgrade<br />
(1/2) Upgrading extra-cmake-modules@testing (5.38.0-r0 -> 5.39.0-r0)<br />
(2/2) Upgrading extra-cmake-modules-doc@testing (5.38.0-r0 -> 5.39.0-r0)<br />
Executing mdocml-apropos-1.14.1-r0.trigger<br />
OK: 2635 MiB in 803 packages<br />
<br />
To upgrade only ''specific'' packages, use the ''-u'' or ''--upgrade'' option of the '''add''' command:<br />
<br />
{{cmd|apk update<br />
apk add --upgrade busybox <br />
}}<br />
<br />
<br />
<br />
To enable unattended, automatic upgrades of packages, see the {{pkg|apk-autoupdate}} package.<br />
<br />
To upgrade to a newer release, refer to the corresponding release notes and [[Upgrading_Alpine]].<br />
<br />
=== Upgrading "diskless" and "data" disk mode installs ===<br />
<br />
If booting a "diskless" system from a read-only device, or iso image on writable media, it's not possible to update the boot files (kernel, modules, firmware, ...) that reside on that device.<br />
<br />
It becomes possible to update the boot files, though, if using a boot device that is writable and has been prepared with <code>[[Alpine_setup_scripts#setup-bootable|setup-bootable]]</code>.<br />
<br />
However, even then, the kernel, with its modules and firmware files, can still not be updated directly through regular packages updates. Instead, there is the <code>update-kernel</code> script that can generate initfs images and install them together with upgraded kernels.<br />
<br />
Upgrading can be done as follows.<br />
{{cmd|apk add mkinitfs<br />
}}<br />
This package is required for the generation of the initial filesystem used during boot.<br />
* Additional initfs features that are missing in the default configuration, like the [[Btrfs|btrfs]] filesystem support (at the time of writing, to allow loading .apkovl configs and package cache during boot), may be enabled in <code>/etc/mkinitfs/mkinitfs.conf</code>.<br />
* Available initfs features may be listed with <code>ls /etc/mkinitfs/features.d</code><br />
{{cmd|ls /etc/mkinitfs/features.d<br />
apk add nano<br />
nano /etc/mkinitfs/mkinitfs.conf<br />
lbu commit<br />
}}<br />
Finally update the kernel and its boot environment.<br />
{{cmd|update-kernel /media/sdXY/boot/<br />
}}<br />
* An <code>update-kernel</code> run needs at least 8 GB free ram memory to avoid a broken modloop-image.<br />
* See <code>update-kernel --help</code> for options to manually add additional module or firmware packages.<br />
<br />
= Search for Packages =<br />
The '''search''' command searches the repository Index files for installable packages. <br />
<br />
The return format is '''Package'''-'''Version'''. Omit '''Version''' for ''apk add '''Package'''''<br />
<br />
Examples:<br />
* To list all packages available, along with their descriptions: {{cmd|apk search -v}}<br />
* To list all packages are part of the ACF system: {{cmd|apk search -v 'acf*' }}<br />
* To list all packages that list NTP as part of their description, use the ''-d'' or ''--description'' option: {{cmd|apk search -v --description 'NTP' }}<br />
<br />
= Information on Packages =<br />
<br />
== apk info ==<br />
<br />
The '''info''' command provides information on the contents of packages, their dependencies, and which files belong to a package.<br />
<br />
For a given package, each element can be chosen (for example, ''-w'' to show just the webpage information), or all information displayed with the ''-a'' command.<br />
<br />
Example: {{cmd|apk info -a zlib}}<br />
<br />
'''zlib-1.2.5-r1 description:'''<br />
A compression/decompression Library<br />
<br />
'''zlib-1.2.5-r1 webpage:'''<br />
<nowiki>http://zlib.net</nowiki><br />
<br />
'''zlib-1.2.5-r1 installed size:'''<br />
94208<br />
<br />
'''zlib-1.2.5-r1 depends on:'''<br />
libc0.9.32<br />
<br />
'''zlib-1.2.5-r1 is required by:'''<br />
libcrypto1.0-1.0.0-r0<br />
apk-tools-2.0.2-r4<br />
openssh-client-5.4_p1-r2<br />
openssh-5.4_p1-r2<br />
libssl1.0-1.0.0-r0<br />
freeswitch-1.0.6-r6<br />
atop-1.25-r0 <br />
<br />
'''zlib-1.2.5-r1 contains:'''<br />
lib/libz.so.1.2.5<br />
lib/libz.so.1<br />
lib/libz.so <br />
<br />
'''zlib-1.2.5-r1 triggers:'''<br />
<br />
As shown in the example you can determine<br />
* The '''description''' of the package (''-d'' or ''--description'')<br />
* The '''webpage''' where the application is hosted (''-w'' or ''--webpage'')<br />
* The '''size''' the package will require once installed (in bytes) (''-s'' or ''--size'')<br />
* What packages are required to use this one ('''depends''') (''-R'' or ''--depends'')<br />
* What packages require this one to be installed ('''required by''') (''-r'' or ''--rdepends'')<br />
* The '''contents''' of the package, that is, which files it installs (''-L'' or ''--contents'')<br />
* Any '''triggers''' this package sets. (''-t'' or ''--triggers'') Listed here are directories that are watched; if a change happens to the directory, then the trigger script is run at the end of the apk add/delete. For example, doing a depmod once after installing all packages that add kernel modules.<br />
<br />
{{Tip|The '''info''' command is also useful to determine which package a file belongs to. For example: {{cmd|apk info --who-owns /sbin/lbu}} will display<br />
<br />
/sbin/lbu is owned by alpine-conf-x.x-rx<br />
}}<br />
<br />
=== Listing installed packages ===<br />
<br />
To list all installed packages, use:<br />
<br />
<pre>apk info</pre><br />
<br />
To list all installed packages in alphabetical order, with a description of each, do:<br />
<br />
<pre>apk -vv info|sort</pre><br />
<br />
The apk tool does not have a subcommand to list manually-installed packages that do not have reverse dependencies. To get this information on a traditional system that is not using [[Alpine local backup|lbu]], try this script. Note that this approach will also list core packages like alpine-base that should not be removed.<br />
<br />
<pre>#!/bin/sh<br />
apk info | grep -ve '-doc$' | sort | while read pkg<br />
do<br />
rdep=`apk info -qr "$pkg"`<br />
[ -z "$rdep" ] && echo $pkg<br />
done</pre><br />
<br />
== apk policy ==<br />
<br />
To display the repository a package was installed from and will be updated from, plus any [[#Repository_pinning|tagged]] or enabled repositories where it is also offered, if any, for this architecture - its '''policy''':<br />
<br />
apk policy ''package''<br />
<br />
For example:<br />
<pre><br />
$ apk policy vlc<br />
vlc policy:<br />
2.2.6-r1:<br />
lib/apk/db/installed<br />
http://dl-3.alpinelinux.org/alpine/v3.7/community<br />
3.0.0_rc2-r1:<br />
@edgecommunity http://dl-3.alpinelinux.org/alpine/edge/community<br />
</pre><br />
<br />
= Additional apk Commands =<br />
In progress...<br />
<br />
= Local Cache =<br />
<br />
{{:Local_APK_cache}}<br />
<br />
= Advanced APK Usage =<br />
<br />
== Holding a specific package back ==<br />
<br />
In certain cases, you may want to upgrade a system, but keep a specific package at a back level. It is possible to add "sticky" or versioned dependencies. For instance, to hold the ''asterisk'' package to the 1.6.2 level or lower:<br />
{{cmd|1=apk add asterisk=1.6.0.21-r0}}<br />
or<br />
{{cmd|apk add 'asterisk<1.6.1'}}<br />
<br />
after which a {{cmd|apk upgrade}}<br />
<br />
will upgrade the entire system, keeping the asterisk package at the 1.6.0 or lower level<br />
<br />
To later upgrade to the current version,<br />
<br />
{{cmd|apk add 'asterisk>1.6.1'}}<br />
<br />
will ensure that 1.6.1 is the minimum version used.<br />
<br />
You can also use "fuzzy" version matching to pin the version to a major/minor release. For example:<br />
<br />
{{cmd|1=apk add 'asterisk=~1.6'}}<br />
<br />
will match any version of asterisk that starts with 1.6 (such as 1.6.0.21-r0 or 1.6.9.31-r9) <ref>[https://git.alpinelinux.org/apk-tools/commit/?id=693b4bcdb0f22904a521a7c8ac4f13e697dc4d71 Alpine source commit message]</ref><br />
<br />
If you desire deterministic, repeatable package installation (such as with containerized environments) via package pinning, it is important to understand your package repo's version retention rules. For example, most Alpine package repos contain an "edge" branch, which may drop package versions that are not deemed fit to make it into a stable branch. This means that pinning to a version on the edge branch may stop working after the package version is revoked from the repo. Always pin to a package version that is intended for your current Alpine Linux version.<br />
<br />
<br><br />
<br />
= Table of comparison with other Linux/Unix-like OSes for packages =<br />
<br />
{| class="wikitable"<br />
|-<br />
! OS !! File Format !! Tools<br />
|-<br />
| Alpine || .apk || apk<br />
|-<br />
| Debian || .deb || apt, aptitude, dpkg<br />
|-<br />
| Gentoo || .tbz2 || emerge<br />
|-<br />
| FreeBSD || .txz || pkg<br />
|}<br />
<br />
<br><br />
<br />
= Troubleshooting =<br />
<br />
== "apk-tools is old" == <br />
<br />
'''apk update''', '''apk upgrade''' or '''apk add''' may report the following: <br />
WARNING: This apk-tools is OLD! Some packages might not function properly<br />
<br />
This may happen if you are running Alpine Linux stable version with a certain edge/main, edge/community or testing package(s) also installed. One resolution is to consider upgrading {{pkg|apk-tools}}. If edge is already [https://wiki.alpinelinux.org/wiki/Alpine_Linux_package_management#Repository_pinning tagged] in your repositories, then try:<br />
<br />
<pre>apk add --upgrade apk-tools@edge</pre><br />
<br />
== ERROR: UNTRUSTED signature ==<br />
<br />
This happens when the release version changes. You need to update you apk keys.<br />
<br />
<pre>apk fix --allow-untrusted alpine-keys</pre><br />
<br />
= External Links =<br />
* [https://www.cyberciti.biz/faq/10-alpine-linux-apk-command-examples/ 10 Alpine Linux apk Command Examples] Vivek Gite 2019<br />
<br />
[[Category:Package Manager]]</div>Guest09248https://wiki.alpinelinux.org/w/index.php?title=Comparison_with_other_distros&diff=22313Comparison with other distros2022-09-13T17:09:40Z<p>Guest09248: Replaced Yum with DNF (https://fedoraproject.org/wiki/Releases/22/ChangeSet#Replace_Yum_With_DNF)</p>
<hr />
<div>Even if Alpine is designed to run from RAM, it has some similarities in package management with other distributions. This page outlines those similarities and differences, to help new users use Alpine and understand the differences between Alpine and other distributions.<br />
<br />
{{Note|The page was originally copied from: [https://web.archive.org/web/20070911124125/http://gentoo-wiki.com/TIP_Converting_from_or_to_Debian http://gentoo-wiki.com/TIP_Converting_from_or_to_Debian]}}<br />
<br />
<br><br />
<br />
= Package management =<br />
Where Gentoo has portage and emerge; Debian has, among others, apt; Alpine uses apk-tools. This section compares how apk-tools is used, in comparison to apt and emerge.<br />
<br />
== Updating package database ==<br />
Gentoo will update the build-from-source scripts and the updating of the database takes much more time than updating the database for Debian or Alpine.<br />
<br />
'''Alpine'''<br />
apk update<br />
<br />
'''Debian'''<br />
apt update<br />
<br />
'''Gentoo'''<br />
emerge --sync<br />
<br />
== Showing available updates ==<br />
Show which packages have an update available:<br />
<br />
'''Alpine'''<br />
apk version -v<br />
or:<br />
apk version -v -l '<'<br />
<br />
'''Gentoo'''<br />
emerge --deep --update --pretend @world<br />
<br />
'''Debian'''<br />
apt upgrade --simulate<br />
<br />
== Updating a particular package ==<br />
'''Alpine'''<br />
apk add -u package1 package2<br />
or<br />
apk upgrade package1 package2<br />
'''Debian'''<br />
apt install package1 package2<br />
'''Gentoo'''<br />
emerge --update package1 package2<br />
<br />
== Installing packages ==<br />
'''Alpine'''<br />
apk add package1 package2<br />
<br />
For source compile, see the [[Aports tree]] and the [[abuild]] tool.<br />
<br />
'''Gentoo'''<br />
emerge package1 package2<br />
'''Debian'''<br />
apt-get install package1 package2<br />
Debian source compile:<br />
apt-get build-dep package1<br />
apt-get source package1<br />
(optional: customize the build by modifying the debian/rules makefile)<br />
(or set environmental variables like DEB_BUILD_OPTIONS)<br />
(note that this will make your bug reports invalid to the maintainer)<br />
dpkg-buildpackage -rfakeroot -uc -b<br />
dpkg -i generatedpackagename<br />
Simplified source compile:<br />
apt-get build-dep package1<br />
apt-get -b source package1<br />
(the packages are automatically generated using the -b switch above)<br />
<br />
'''Note:''' This process can be used to backport packages from testing and unstable by simply adding their respective source repositories to sources.list, which is similar to adding ~x86 to package.keywords in Gentoo. This is explored further in the "Architectures and repositories" section below.<br />
<br />
== Reinstalling particular packages ==<br />
'''Alpine'''<br />
apk del package1 package2 && apk add package1 package2<br />
or:<br />
apk fix package1 package2<br />
'''Gentoo'''<br />
emerge --oneshot package1 package2<br />
'''Debian'''<br />
apt-get install --reinstall package1 package2<br />
<br />
Note: You ''rarely'' need to reinstall a package on Debian<br />
<br />
== Searching the package database ==<br />
'''Alpine'''<br />
<br />
Alpine will only search package names.<br />
apk search searchword<br />
<br />
'''Gentoo'''<br />
<br />
To search the package names and descriptions:<br />
emerge --searchdesc searchword<br />
'''Note:''' On Gentoo, it's actually much better to install and use the eix package to do a search. You use them like this:<br />
eix searchword<br />
<br />
'''Debian'''<br />
<br />
apt-cache search searchword<br />
Both emerge and apt-cache search support regular expressions.<br />
<br />
To get the long package information on Debian (searching only in package names):<br />
apt-cache search --full --names-only searchword<br />
<br />
== Removing packages ==<br />
'''Alpine'''<br />
<br />
apk del package1 package2<br />
''apk del'' will remove configuration files when the ''--purge'' flag is used. Make sure you have backups of your configuration files.<br />
<br />
You will mostly like to take a quick look at the dependencies before you remove packages recursively.<br />
<br />
To see dependencies for a package, use:<br />
apk info -R package1 package2<br />
<br />
To see if package is required by other packages (is a dependency for another packages), use:<br />
apk info -r package1 package2<br />
<br />
<br />
'''Gentoo'''<br />
<br />
The correct way to remove packages on gentoo.<br />
emerge --depclean package1 package2<br />
<br />
In case you know what you're doing, you may skip dependency checks and potentiality leave your system in broken state.<br />
emerge --unmerge package1 package2<br />
<br />
'''Debian'''<br />
apt-get remove package1 package2<br />
or to remove along with all configuration files<br />
apt-get remove --purge package1 package2<br />
<br />
== Only downloading packages ==<br />
This can be useful e.g. if you're on a dial-up connection and want to download everything first and install later.<br />
<br />
'''Alpine'''<br />
apk fetch package1 package2<br />
'''Gentoo'''<br />
emerge --fetchonly package1 package2<br />
'''Debian'''<br />
apt-get install --download-only package1 package2<br />
<br />
== Cleaning up downloaded packages ==<br />
Compressed packages that were downloaded for installation can easily consume gigabytes of storage space.<br />
<br />
'''Alpine'''<br />
<br />
Alpine will clean up packages automatically.<br />
<br />
'''Gentoo'''<br />
<br />
The following command will leave ''/var/cache/distfiles/'' folder intact, while deleting all children.<br />
<br />
find /var/cache/distfiles/ -mindepth 1 -delete<br />
<br />
To only remove outdated packages you will need to install the gentoolkit package and use eclean:<br />
eclean distfiles<br />
<br />
Cleaning temporary files from emerging packages:<br />
rm -rf /var/tmp/portage/*<br />
<br />
'''Debian'''<br />
apt-get clean<br />
Only remove outdated packages:<br />
apt-get autoclean<br />
<br />
==Reverse dependencies==<br />
<br />
'''Alpine'''<br />
<br />
apk-tools will take care of reverse dependencies.<br />
<br />
'''Gentoo'''<br />
<br />
Recent versions of portage include library tracking and preservation with the preserved-libs feature. Portage will notify you to run {{Cmd|emerge @preserved-rebuild}} to help rebuild binaries that might otherwise become broken.<br />
<br />
'''Debian'''<br />
<br />
Reverse dependencies are taken care of by dpkg.<br />
<br />
= Runlevel & Initscripts =<br />
Runlevels work pretty conventionally on Debian (see details: [http://archive.fo/ZdZIz systemd]{{dead link}}). On Alpine and Gentoo, they are a bit different.<br />
<br />
== Directories and files ==<br />
{{Obsolete|Debian now uses systemd.}}<br />
<br />
In '''Debian''', runlevels are named conventionally (0-6 and S). They are represented by directories in /etc/ called rc*.d (when the default sysv-rc boot loader package is installed; file-rc can be installed instead, and then the relevant file is runlevel.conf).<br />
<br />
* /etc/rc0.d<br />
* /etc/rc1.d<br />
* /etc/rcS.d<br />
* /etc/rc2.d<br />
* /etc/rc3.d<br />
* /etc/rc4.d<br />
* /etc/rc5.d<br />
* /etc/rc6.d<br />
<br />
In '''Gentoo''', runlevels have the same names, but these are mapped to more self explanatory ones (in /etc/inittab): "boot", "default", "nonetwork", with the option to add more. The directories that represent them are in <br />
/etc/runlevels/:<br />
* /etc/runlevels/boot<br />
* /etc/runlevels/default<br />
* /etc/runlevels/nonetwork<br />
<br />
In '''Gentoo''', if a service is not explicitly started in a runlevel, it is stopped when switching to that runlevel! There is no explicit stopping of runlevels as in Debian (/etc/rc?.d/K??service).<br />
<br />
In '''both Debian and Gentoo''', which things are started (and stopped) in which runlevels is controlled by links in the runlevel directories to scripts in /etc/init.d/, e.g.:<br />
'''Gentoo'''<br />
$ ls -l /etc/runlevels/boot/hostname<br />
lrwxrwxrwx 1 root root 20 Mar 25 2004 /etc/runlevels/boot/hostname -> /etc/init.d/hostname<br />
<br />
'''Debian'''<br />
$ ls -l rcS.d/S40hostname.sh<br />
lrwxrwxrwx 1 root root 21 2004-11-07 00:19 rcS.d/S40hostname.sh -> ../init.d/hostname.sh<br />
<br />
'''Alpine'''<br />
<br />
In Alpine, runlevels work like they do in Gentoo:<br />
<br />
* /etc/runlevels/boot<br />
* /etc/runlevels/default<br />
* /etc/runlevels/sysinit<br />
* /etc/runlevels/nonetwork<br />
* /etc/runlevels/shutdown<br />
<br />
== Runlevel management ==<br />
To manage which things to start in which runlevels, use the following commands:<br />
<br />
'''Alpine'''<br />
<br />
To see current status of services in runlevels, do:<br />
rc-status<br />
To add sshd to default runlevel, do:<br />
rc-update add sshd default<br />
To remove sshd from all runlevels do:<br />
rc-update del sshd<br />
<br />
'''Gentoo'''<br />
<br />
rc-update<br />
To add the cupsd to the default runlevel, do:<br />
rc-update add cupsd default<br />
To remove alsasound from the boot runlevel, do:<br />
rc-update del alsasound boot<br />
Also see this wiki page about [http://gentoo-wiki.com/Rc-update gentoo runlevel management with rc-update]<br />
<br />
{{Obsolete|Debian now uses systemd.}}<br />
<br />
'''Debian'''<br />
<br />
update-rc.d<br />
Configure cupsd to be started in runlevels 2, 3, 4, 5, and stopped in 0, 1, 6, with sequence code 20:<br />
update-rc.d cupsd start 20 2 3 4 5 . stop 20 0 1 6 . <br />
or simply:<br />
update-rc.d cupsd defaults <br />
Remove cupsd from all runlevels:<br />
update-rc.d -f cupsd remove<br />
<br />
= Config Files =<br />
<br />
== /etc/portage/make.conf and use flags ==<br />
While in Gentoo there's a large number of configuration files which control the behaviour of the package management system, there are comparatively fewer in Debian, as there is no need to dictate how to compile software which is downloaded and tweak/alter it. In Gentoo, the file /etc/portage/make.conf is used for much configuration; this includes ''USE'' flags, which influence which elements of packages are compiled, and which libraries to build support for - common USE flags (USE or -USE to specifically negate support) include 'gtk gnome' for Gnome users (and a corresponding -qt -kde -arts) and 'qt kde arts' for KDE users. A Gentoo user's complete set of use flags may look something like this:<br />
<br />
'''USE="-kde -arts -qt xv truetype bluetooth crypt slang readline gpm berkdb mmx gdbm tcpd pam libwww ssl nls ethereal perl python esd gif imlib sdl oggvorbis mpeg gnome gtk X motif opengl avi png tiff nptl pcmcia nptl ldap eds"'''<br />
<br />
== Architectures and repositories ==<br />
'''Gentoo'''<br />
<br />
Also in /etc/portage/make.conf is the '''ACCEPT_KEYWORDS''' setting, with (for an X86-based processor) two settings, '''x86''' for stabler packages, and '''~x86''' for bleeding edge packages. It is however not recommended to make this change in /etc/portage/make.conf. Rather configure this per-package in /etc/portage/package.accept_keywords. It's enough to put a line into that file naming the package (for example 'app-foo/bar'). That file might look like this:<br />
<br />
app-crypt/gpg-agent<br />
app-text/docbook-xsl-stylesheets<br />
=app-text/docbook-xml-dtd-4.3-r1<br />
<br />
The last line says, that ''only'' version 4.3-r1 should be unmasked. Older and newer versions will still be ignored.<br />
<br />
'''Note for non-x86 users:'''<br />
The keywords '''x86''' and '''~x86''' can of course be replaced by '''sparc''' and '''~sparc''' for example.<br />
<br />
'''Debian'''<br />
<br />
Setting this in Debian is slightly more complicated, and is accomplished by setting different 'repositories' in ''/etc/apt/sources.list'' - along with which 'tree' to use for packages; in Debian, these are '''stable''', '''testing''', and '''unstable'''. An ''/etc/apt/sources.list'' file for a debian testing user may look something like this:<br />
<br />
deb http://mirrors.kernel.org/debian testing main non-free contrib<br />
deb ftp://ftp.nerim.net/debian-marillat testing main<br />
deb http://security.debian.org testing/updates main contrib non-free<br />
<br />
Alternatively, ''/etc/apt/sources.list'' can contain any number of repositories for any trees, and a default tree (this can be overridden using the -t switch on the command line) in ''/etc/apt/apt.conf'':<br />
<br />
APT::Default-Release "testing";<br />
<br />
Per-package settings go in ''/etc/apt/preferences'', somewhat like Gentoo's ''/etc/portage/package.keywords''.<br />
<br />
== Network ==<br />
<br />
'''Alpine'''<br />
<br />
Alpine uses /etc/network/interfaces, similar to Debian. Alpine uses busybox's implementation by default.<br />
<br />
''/etc/network/interfaces'':<br />
auto eth0<br />
iface eth0 inet static<br />
address 192.168.0.1<br />
netmask 255.255.255.0<br />
broadcast 192.168.0.255<br />
<br />
auto eth0:0<br />
iface eth0:0 inet static<br />
address 192.168.1.1<br />
netmask 255.255.255.0<br />
broadcast 192.168.1.255<br />
# etc.<br />
<br />
'''Gentoo'''<br />
<br />
Gentoo uses ''netifrc''. This packages is also available in the edge community repository. (Use on Alpine at your own risk.)<br />
<br />
''/etc/conf.d/net'':<br />
config_eth0="192.168.1.100 netmask 255.255.255.0<br />
192.168.2.100 netmask 255.255.255.0"<br />
routes_eth0="default via 192.168.1.1"<br />
<br />
Note that this has changed recently. For more information please refer to http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=4<br />
<br />
'''Debian'''<br />
<br />
''/etc/network/interfaces'':<br />
auto eth0<br />
iface eth0 inet static<br />
address 192.168.0.1<br />
netmask 255.255.255.0<br />
broadcast 192.168.0.255<br />
<br />
auto eth0:0<br />
iface eth0:0 inet static<br />
address 192.168.1.1<br />
netmask 255.255.255.0<br />
broadcast 192.168.1.255<br />
# etc.<br />
<br />
= Comparison chart/Rosetta Stone =<br />
<br />
This chart shows how some standard things are done in Alpine compared to other distributions. See also the [https://wiki.archlinux.org/title/Pacman/Rosetta Pacman Rosetta].<br />
<br />
{| cellpadding="5" border="1" class="wikitable"<br />
|-<br />
! Action <br />
! Alpine ([https://wiki.alpinelinux.org/wiki/Alpine_Linux_package_management apk])<br />
! Arch Linux ([https://wiki.archlinux.org/index.php/Pacman pacman])<br />
! Gentoo ([https://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&chap=1 emerge])<br />
! Debian/Ubuntu ([https://wiki.debian.org/AptCLI apt])<br />
! Fedora/RHEL/SL/CentOS ([https://rpm-software-management.github.io/ DNF])<br />
! VoidLinux ([https://docs.voidlinux.org/xbps/index.html?highlight=xb#xbps-package-manager XBPS])<br />
|-<br />
| Update package database<br />
| {{Cmd| apk update}}<br />
| {{Cmd| pacman -Sy}}<br />
| {{Cmd| emerge --sync}}<br />
| {{Cmd| apt update}}<br />
| {{Cmd| dnf update}}<br />
| {{Cmd| xbps-install -S}}<br />
|-<br />
| Showing available updates<br />
| {{Cmd| apk version -l '<'}}<br />
| {{Cmd| pacman -Qu}}<br />
| {{Cmd| emerge --deep --update --pretend @world}}<br />
| {{Cmd| apt upgrade --simulate}}<br />
| {{Cmd| dnf list updates}}<br />
| {{Cmd| xbps-install -n -u}}<br />
|-<br />
| Installing packages<br />
| {{Cmd| apk add [package name]}}<br />
| {{Cmd| pacman -S [package name]}}<br />
| {{Cmd| emerge [package name]}}<br />
| {{Cmd| apt install [package name]}}<br />
| {{Cmd| dnf install [package name]}}<br />
| {{Cmd| xbps-install [package name]}}<br />
|-<br />
| Update all installed packages<br />
| {{Cmd| apk upgrade -U -a}}<br />
| {{Cmd| pacman -Su}}<br />
| {{Cmd| emerge --update --deep @world}}<br />
| {{Cmd| apt upgrade}}<br />
| {{Cmd| dnf update}}<br />
| {{Cmd| xbps-install -u}}<br />
|- <br />
| Searching package database<br />
| {{Cmd| apk search -v '[string]*'}}<br />
| {{Cmd| pacman -Ss [string]}}<br />
| {{Cmd| emerge --search [string]}}<br />
| {{Cmd| apt search [string]}}<br />
| {{Cmd| dnf search [string]}}<br />
| {{Cmd| xbps-query -Rs [string]}}<br />
|-<br />
| Removing packages<br />
| {{Cmd| apk del [package name]}}<br />
| {{Cmd| pacman -R [package name]}}<br />
| {{Cmd| emerge --depclean [package name]}}<br />
| {{Cmd| apt remove [package name]}}<br />
| {{Cmd| dnf remove [package name]}}<br />
| {{Cmd| xbps-remove [package name]}}<br />
|}<br />
<br />
[[Category:Package Manager]]</div>Guest09248https://wiki.alpinelinux.org/w/index.php?title=Installation&diff=22312Installation2022-09-13T16:52:18Z<p>Guest09248: /* Post-Installation */</p>
<hr />
<div><br />
[[Image:hdd_mount.png|left|link=]]<br />
<br /><br />
<br />
<br />
<br />
<br />
This page explains the basics to get started. But before actually installing, it can also help to skim through the [[Alpine_Linux:FAQ| Frequenty Asked Questions (FAQ)]].<br />
<br />
{{Tip|This is a wiki!<br />
If something isn't correct (anymore), or still incomplete, you will have to try figuring it out, or ask for the correct solution in the [https://alpinelinux.org/community/ community].<br />
<br />
And then carefully edit the wiki page.<br />
<br />
Just as those before you did it for you.<br />
}}<br />
<br />
<br />
== Minimal Hardware Requirements ==<br />
<br />
* At least 100 MB of RAM. [A graphical desktop system may require up to 1 GB minimum.]<br />
* At least 0-700 MB space on a writable storage device. [Only required in "sys" or "data" mode installations (explained below). It is optional in "diskless" mode, where it may be used to save newer data and configurations states of a running system.]<br />
<br />
For more information please check [[Requirements]]<br />
<br />
== Installation Overview ==<br />
<br />
=== The general course of action ===<br />
{{Note|For single-board-computer (SBC) architectures which can not boot .iso images, see [[Alpine_on_ARM|Alpine on ARM]] for peculiarities.}}<br />
<br />
As usual, the regular installation procedure starts with three basic steps (additional details for all the steps follow [[Installation#additional details|below]]):<br><br />
<br />
# Downloading and verifying the proper [http://alpinelinux.org/downloads stable-release ISO installation image-file] for the computer's architecture, and the corresponding <code>sha256</code> (checksum) and <code>GPG</code> (signature) files. <br />
# Either burning the ISO image-file onto a blank CD/DVD/Blu-ray disk with disk burning software, or flashing the installation image onto a bootable storage device (USB-device, CF-/MMC-/SD-card, floppy, ...). Optionally to setup a headless system, a bootstrapping configuration overlay file [https://github.com/macmpi/alpine-linux-headless-bootstrap headless.apkovl.tar.gz] may be added to enable basic networking, so that following configuration steps can be performed under <code>ssh</code>.<br />
# Booting the computer from the prepared disk or storage device.<br />
<br />
The boot process of the installation image first copies the entire operating system into the RAM memory, and then already starts a complete Alpine Linux system from there. It will initially only provide a basic command line environment that does not depend on reading from any (possibly slow) initial boot media, anymore.<br />
<br />
Log-in is possible as the user <code>root</code>. Initially, the root user has no password.<br />
<br />
At the command prompt, an interactive script named <code>[[Alpine_setup_scripts#setup-alpine|setup-alpine]]</code> is available to configure and install the initial Alpine Linux system.<br />
<br />
The question-and-answer dialog of <code>[[Alpine_setup_scripts#setup-alpine|setup-alpine]]</code> takes care of the base configuration and allows to configure the system to</br><br />
boot into one of three different '''Alpine Linux disk modes''': '''"diskless"''', '''"data"''', or '''"sys"'''.<br />
<br />
These modes are explained in more detail in the following subsections.<br />
<br />
{{Note|It can be helpful to know that it is possible to first only complete a base configuration of the initial "diskless" installation system in order to to prepare the system. For example, to download and install some specific driver or software tool. And then use more specific [[Alpine_setup_scripts|setup-scripts]] afterwards, to proceed with the final installation. The base configuration of the "diskless" system may be completed by running <code>[[Alpine_setup_scripts#setup-alpine|setup-alpine]]</code> and answering "none" when asked for the disk to use, and where to store configs, as well as for the location for the package cache.<br />
<br />
Examples of preparation options:<br />
<br />
* Preparing a custom partitioning or filesystem scheme that avoids to use and/or overwrite an entire disk ([[Installation#Custom_partitioning_of_the_harddisk|details below]]).<br />
* Installing something that may be missing in the live system to configure the hardware, e.g. by using the alpine package manager <code>[[Alpine_Linux_package_management|apk]]</code>.<br />
<br />
Examples of proceeding options:<br />
<br />
* <code>[[Alpine_setup_scripts#setup-lbu|setup-lbu]]</code> to configure a "local backup" location for the diskless system, and <code>[[Alpine_local_backup|lbu commit]]</code> to then save the local configuration state.<br />
* <code>[[Alpine_setup_scripts#setup-apkcache|setup-apkcache]]</code> to configure a local package cache storage location.<br />
* <code>[[Alpine_setup_scripts#setup-disk|setup-disk]]</code> to add a "data" mode partition, or do a classic full install of the "diskless" system onto a "sys" disk or partition.<br />
<br />
There are many more [[Alpine_setup_scripts|setup-scripts]] available. All these tools may also be run later to adjust specific configurations. For example, to set up a graphical environment as covered under [[Installation#Post-Install|Post-Install]] below.<br />
}}<br />
<br />
==='''Diskless Mode'''=== <br />
This means the entire operating system with all applications are first loaded into RAM and then only run from there. This is the method used to boot for the .iso installation images. It's is extremely fast and can save on unnecessary disk spin-ups, power, and wear. It is similar to what other linux distributions may call a "frugal" install and boot into with a "toram" option. However, <code>[[Alpine_setup_scripts#setup-alpine|setup-alpine]]</code> can also configure the installed system to boot like this if "disk=none" is specified.<br />
<br />
Custom configurations and package selections may optionally still be preserved or "persist" across reboots by using the Alpine local backup tool <code>[[Alpine_local_backup|lbu]]</code>. It enables committing and reverting system states by using .apkovl files that are saved to writable storage and loaded when booting. If additional or updated packages have been added to the system, these may also be made available for automatic (re)installation during the boot phase without any (re)downloading, by enabling a [[Alpine_Linux_package_management#Local_Cache|local package cache]] on the writable storage.<br />
<br />
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10473 FIXME-1]: Storing local configs and the package cache on an ''internal'' disk still requires [[Alpine_local_backup#Saving_and_loading_ISO_image_customizations|some manual steps]] to have the partition listed, i.e. making a /etc/fstab entry, mountpoint, and mount, *before* running setup-alpine. The linked workaround also still requires to commit these configurations to disk manually before rebooting.]<br />
<br />
If a writable partition is available, <code>setup-alpine</code> can be told to store the configs and the package cache on that writable partition. (Later, another directory on that same partition or another available partition may also be mounted as /home, or for example, for selected important applications to keep their run-time and user data on it.)<br />
<br />
The boot device of the newly configured local "diskless" system may remain the initial (and possibly read-only) installation media. But it is also possible to copy the boot system to a partition (e.g. /dev/sdXY) with <code>[[Alpine_setup_scripts#setup-bootable|setup-bootable]]</code>.<br />
<br />
==='''Data Disk Mode'''=== <br />
This mode also runs from system RAM, thus it enjoys the same accelerated operation speed as "diskless" mode. However, swap storage and the entire {{Path|/var}} directory tree get mounted from a persistent storage device (two newly created partitions). The directory {{Path|/var}} holds e.g. all log files, mailspools, databases, etc., as well as <code>[[Alpine_local_backup|lbu]]</code> backup commits and the package cache. This mode is useful for having RAM accelerated servers with variable amounts of user-data that exceed the available RAM size. It enables the entire current system state (not just the boot state) to survive a system crash in accordance with the particular filesystem guarantees. <br />
<br />
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10474 FIXME-2]]: Setup-alpine will create the data partition and mount it as /var, but can not yet configure lbu storage settings automatically. It is currently necessary to select "none" at the 'where to store configs' prompt (the new data partition is not listed) and configure lbu manually. For example, after running <code>setup-alpine</code> and before rebooting:<br />
<br />
# Set LBU_MEDIA=sdXY in /etc/lbu/lbu.conf<br />
# Execute a corresponding <code>echo "/dev/sdXY /media/sdXY <fstype> rw 0 0" >> /etc/fstab</code><br />
# Save the configuration for the next boot with <code>lbu commit</code>.<br />
<br />
In data disk mode, the boot device may also remain the initial (and possibly read-only) installation media, or be copied to a partition (e.g. /dev/sdXY) with <code>[[Alpine_setup_scripts#setup-bootable|setup-bootable]]</code>.<br />
<br />
==='''System Disk Mode'''=== <br />
This is a traditional hard-disk install.<br />
<br />
If this mode is selected, the <code>[[setup-alpine]]</code> script creates three partitions on the selected storage device, {{Path|/boot}}, {{Path|swap}} and {{Path|/}} (the filesystem root). This mode may, for example, be used for generic [[Desktops|desktop]] and development machines.<br />
<br />
For custom partitioning, see [[Setting_up_disks_manually]].<br />
<br />
To install along side another operating systems, see [[Installing_Alpine_on_HDD_dualbooting]].<br />
<br />
== Basic Installation Step Details ==<br />
<br />
{{Expand| }}<br />
<br />
This "Additional Details" section needs to be consolidated with the work at '''[https://docs.alpinelinux.org https://docs.alpinelinux.org] (not finished)''' <br />
(Restructuring things there, moving and linking from here or there?). <br />
<br />
<br />
=== Verifying the downloaded image-file ===<br />
<br />
{| class="wikitable" style="width:95%; align=center"<br />
|+ Commands to verify the checksum and GPG signature of a downloaded image-file on different systems.<br />
|-<br />
! width=100px | OS type<br />
! <code>SHA256</code> check !! <code>SHA256</code> calculation (to be compared manually) !! <code>GPG</code> signature verification<br />
|-<br />
! Linux<br />
| <code>sha256sum -c alpine-*.iso.sha256</code> || || <code>curl https://alpinelinux.org/keys/ncopa.asc &#124; gpg --import ;</code><br />
<code> gpg --verify alpine-<version>.iso.asc alpine-<version>.iso</code><br />
|-<br />
! MACOS <br />
| - ? - || <code>shasum -a 256 alpine-*.iso</code> || - ? -<br />
|-<br />
! OpenBSD <br />
| <code>sha256 -C alpine-*.sha256 alpine-*.iso</code> || || <code>doas pkg_add gnupg;<br />
ftp -o - https://alpinelinux.org/keys/ncopa.asc &#124; gpg --import ;<br />
gpg --verify alpine-<version>.iso.asc alpine-<version>.iso</code><br />
|-<br />
! FreeBSD <br />
| - ? - || <code>/usr/local/bin/shasum -a 256 alpine-*.iso</code> || - ? -<br />
|-<br />
! NetBSD <br />
| - ? - || <code>/usr/local/bin/shasum -a 256 alpine-*.iso</code> || - ? -<br />
|-<br />
! Windows (PowerShell installed)<br />
| - ? - || <code>Get-FileHash .\alpine-<image-version>.iso -Algorithm SHA256</code> || - ? -<br />
|}<br />
<br />
=== Flashing (direct data writing) the installation image-file onto a device or media ===<br />
<br />
==== Unix/Linux ====<br />
<br />
Under Unix (and thus Linux), "everything is a file" and the data in the image-file can be written to a device or media with the <code>dd</code> command. Afterward, executing the <code>eject</code> command removes the target device from the system and ensures the write cache is completely flushed.<br />
<br />
dd if=<iso-file-to-read-in> of=<target-device-node-to-write-out-to> bs=4M oflag=sync status=progress; eject <target-device-node-to-write-to><br />
<br />
Be careful to correctly identify the target device as any data on it '''will''' be lost! All connected "bulk storage devices" can be listed with <code><nowiki>lsblk</nowiki></code> and <code><nowiki>blkid</nowiki></code>.<br />
<br />
# lsblk<br />
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT<br />
sdX 0:0 0 64,0G 0 disk <br />
├─sdX1 0:1 0 2G 0 part <br />
└─sdX2 0:2 0 30G 0 part /mnt/sdX2<br />
<br />
# blkid<br />
/dev/sdX1: LABEL="some" UUID="..." TYPE="vfat"<br />
/dev/sdX2: LABEL="other" UUID="..." TYPE="ext4"<br />
<br />
For example, if /dev/sdX is the desired target device, first make sure you un-mount all mounted partitions of the target device. For example sdX1 and sdX2:<br />
<br />
umount /dev/sdX1 /dev/sdX2<br />
<br />
<br />
For <code>dd</code>'s output-file (<code>of=</code>), however, do '''not''' specify a partition number. For example, write to sdX, '''not''' sdX1:<br />
<br />
Warning: '''This will overwrite the target device /dev/sdX''', so before executing, make sure you have a backup of the data if you can't afford to lose it.<br />
<br />
dd if=~/Downloads/alpine-standard-3.00.0-x86_64.iso of=/dev/sdX bs=4M oflag=sync status=progress; eject /dev/sdX<br />
<br />
==== Windows ====<br />
<br />
For example, there is the [https://rufus.ie/ Rufus] program. Rufus will enable you to create bootable USB flash drives under Windows. <br />
<br />
Rufus has been tested and works for Alpine Linux 3.12.x with the following settings:<br />
* '''Partition scheme''': <code>MBR</code><br />
* '''Target system''': <code>BIOS or UEFI</code><br />
* '''File system''': <code>FAT32</code><br />
* '''Cluster size''': <code>4096 bytes (default)</code><br />
<br />
=== Verifying the written installation media ===<br />
<br />
After detaching and re-attaching the device, a bit-wise comparison can verify the data written to the device (instead of just data buffered in RAM). If the comparison terminates with an end-of-file error on the .iso file side, all the contents from the image have been written (and re-read) successfully:<br />
<br />
# cmp ~/Downloads/alpine-standard-3.00.0-x86_64.iso /dev/sdX<br />
cmp: EOF on alpine-standard-3.00.0-x86_64.iso<br />
<br />
=== Booting from external devices ===<br />
<br />
Insert the boot media to a proper drive or port of the computer and turn the machine on, or restart it, if already running.<br />
<br />
If the computer does not automatically boot from the desired device, one needs to bring up the boot menu and choose the media to boot from. Depending on the computer, the menu may be accessed by repeatedly pressing a key quickly when booting starts. Some computers require that you press the button ''before'' starting the computer and hold it down while the computer boots. Typical keys are: `F9`-`F12`, sometimes `F7` or `F8`. If these don't bring up the boot menu, it may be necessary to enter the BIOS configuration and adjust the boot settings, for which typical keys are: `Del.` `F1` `F2` `F6` or `Esc.`<br />
<br />
=== Custom partitioning of the harddisk ===<br />
<br />
It is possible to specify configurations for RAID, encryption, LVM, etc. as well as manual partitioning.<br />
<br />
For "diskless" or "data disk" mode installs, manual partitioning may be needed to prepare the harddisk for committing local backups of the system state with <code>[[Alpine_local_backup|lbu commit]]</code>, to have a place for a package cache, or to use it for a /var mount. <br />
<br />
For a "sys" install, custom partitioning is needed only if the desired scheme differs from overwriting an entire disk, or using the default set of a /boot, swap and root partition on the disk.<br />
<br />
See [[Setting_up_disks_manually]] for the alpine options for RAID, encryption, LVM, etc. and manual partitioning.<br />
<br />
=== Questions asked by <code>setup-alpine</code> ===<br />
[[File:Installation-alpine-alpine-setup-3-setup-scripts.png|350px|thumb|right|Example <code>setup-alpine</code> session]]<br />
<br />
The <code>[[setup-alpine]]</code> script offers the following configuration options:<br />
<br />
* '''Keyboard Layout''' (Local keyboard language and usage mode, e.g. ''us'' and variant of ''us-nodeadkeys''.)<br />
* '''Hostname''' (The name for the computer.)<br />
* '''Network''' (For example, automatic IP address discovery with the "DHCP" protocol.)<br />
* '''DNS Servers''' (Domain Name Servers to query. For privacy reasons it is NOT recommended to route every local request to servers like google's <s>8.8.8.8</s> .)<br />
* '''Timezone'''<br />
* '''Proxy''' (Proxy server to use for accessing the web. Use "none" for direct connections to the internet.)<br />
* '''Mirror''' (From where to download packages. Choose the organization you trust giving your usage patterns to.)<br />
* '''SSH''' (Secure SHell remote access server. "Openssh" is part of the default install image. Use "none" to disable remote login, e.g. on laptops.)<br />
* '''NTP''' (Network Time Protocol client used for keeping the system clock in sync with a time server. Package "chrony" is part of the default install image.)<br />
* '''Disk Mode''' (Select between diskless (disk="none"), "data" or "sys", as described above.) <br />
{{Warning|The data on a chosen device will be overwritten!}}<br />
<br />
=== Preparing for the first boot ===<br />
<br />
If <code>setup-alpine</code> has finished configuring the "sys" disk mode, the system should be ready to reboot right away (see next subsection).<br />
<br />
If the new local system was configured to run in "diskless" or "data" mode, and you do not want keep booting from the initial (and possibly read-only) installation media, the boot system needs to be copied to another device or partition.<br />
<br />
The target partition may be identified using <code><nowiki>lsblk</nowiki></code> (after installing it with <code>apk add lsblk</code>) and/or <code>blkid</code>, similar to previously identifying the initial installation media device.<br />
<br />
The procedure to copy the boot system is explained at <code>[[Alpine_setup_scripts#setup-bootable|setup-bootable]]</code><br />
<br />
Once everything is in place, save your customized configuration with <code>lbu commit</code> before rebooting.<br />
<br />
=== Rebooting and testing the new system ===<br />
<br />
First, remove the initial installation media from the boot drive, or detach it fron the port it's connected to.<br />
<br />
The system may now be power-cycled or rebooted to confirm everything is working correctly.<br />
<br />
The relevant commands for this are <code>poweroff</code> or <code>reboot</code>.<br />
<br />
=== Completing the installation ===<br />
<br />
The installation script installs only the base operating system. '''No''' applications e.g. web server, mail server, desktop environment, or web browser are installed, and <code>root</code> is the only user.<br />
<br />
Please look under "Post-Install" below, for some common things to do after installation.<br />
<br />
<br />
= Further Installation Instructions =<br />
<br />
=== Installation ===<br />
<br />
* [[Kernels]] ''(kernel selection, e.g. for VMs or RPi)''<br />
* [[How to make a custom ISO image with mkimage]] ''(installation media with its own configuration)''<br />
* [[Directly booting an ISO file]] ''(without flashing it to a disk or device)''<br />
* [[Dualbooting|Dual/multi-boot install to HDD partition]]<br />
* [[Netboot Alpine Linux using iPXE]]<br />
Also see other [[:Category:Installation|Installation Category]] pages.<br />
<br />
=== Post-Installation ===<br />
<br />
<!-- COMMENT FOR EDITORS<br />
<br />
If you edit Post-Install,<br />
<br />
* Consider that there are already [[Tutorials_and_Howtos#Post-Install]], [[Developer_Documentation#Package_management]] and the Handbook, please work towards reducing duplication and providing an overview, and topic details of considerable size on their own pages.<br />
* Here, only the most relevant jumping off points are listed, not exact list duplicates!!!<br />
* Keep short-list of links here, as overview to more detailed topic specific pages.<br />
* Don't aggregate different topics at yet another place.<br />
<br />
--><br />
<br />
{{Note|A [[Post installation|Post Installation]] wiki page is available, however, post-installation information should be kept at their individually manageable topic pages and only directly referenced (linked).}}<br />
<br />
* [[Setting up a new user]] ''(to allow remote, console, or graphical logins)''<br />
* [[Tutorials_and_Howtos#Networking|Setting up Networking]] ''(including non-standard configurations)''<br />
* [[Package_management|Package Management (apk)]] ''(how to search/add/del packages etc.)''<br />
** [[Package_management#Upgrade_a_Running_System|Upgrading Alpine]] ''(checking for and installing updates)''<br />
** [[Repositories#Enabling_the_community_repository|Enabling the community repository]] ''(access to additional packages)''<br />
* [[FAQ#Why_don.27t_I_have_man_pages_or_where_is_the_.27man.27_command.3F|man command/man pages]]<br />
* [[Change default shell]]<br />
* [[Running glibc programs]] ''(installation and development)''<br />
<br><br />
<br />
* [[Alpine_local_backup|Local backup utility <code>lbu</code>]] ''(persisting RAM system configurations)''<br />
** [[Back Up a Flash Memory Installation]] ''("diskless mode" systems)''<br />
** [[Manually_editing_a_existing_apkovl]] ''(the stored custom configs)''<br />
<br><br />
<br />
* [[OpenRC|Init System (OpenRC)]] ''(configure a service to automatically boot at next reboot)''<br />
** [[Writing Init Scripts]]<br />
** [[Multiple Instances of Services]]<br />
<br><br />
<br />
* [[Alpine setup scripts#setup-xorg-base|<code>setup-xorg-base</code>]] ''(setup graphical base environment)''<br />
** [[Tutorials_and_Howtos#Desktop_Environment|Desktop Environments]]<br />
<br><br />
<br />
* [[Hosting services on Alpine]] ''(links to several mail/web/ssh server setup pages)''<br />
<br><br />
<br />
* [[How to get regular stuff working]] ''(things one may miss in a too lightweight installation )''<br />
* Running applications and services in their own [[Firejail Security Sandbox]]<br />
<br />
=== Broader Usage Guides ===<br />
<br />
* See: [[Tutorials and Howtos]]<br />
<br />
= General Documentation =<br />
<br />
{{Tip| Alpine Linux packages stay close to the upstream design. Therefore, all upstream documentation about configuring a software package, as well as good configuration guides from other distributions that stay close to upstream, e.g. those in the [https://wiki.archlinux.org/ Arch Wiki], are to a large degree, also applicable to configuring the software on Alpine Linux, thus can be very useful.}}<br />
<br />
* [[FAQ|FAQs]]<br />
<br />
* [[Contribute|How to Contribute]]<br />
* [[Developer Documentation]]<br />
* [[Alpine_Linux:Wiki_etiquette|Wiki etiquette]] ''(to collaborate on this documentation)''<br />
* [[Comparison with other distros]] ''(how common things are done on Alpine)''<br />
<br />
<br />
<br />
<br />
<br />
<br />
----<br />
[[Category:Installation]]</div>Guest09248https://wiki.alpinelinux.org/w/index.php?title=Installation&diff=22311Installation2022-09-13T16:51:41Z<p>Guest09248: </p>
<hr />
<div><br />
[[Image:hdd_mount.png|left|link=]]<br />
<br /><br />
<br />
<br />
<br />
<br />
This page explains the basics to get started. But before actually installing, it can also help to skim through the [[Alpine_Linux:FAQ| Frequenty Asked Questions (FAQ)]].<br />
<br />
{{Tip|This is a wiki!<br />
If something isn't correct (anymore), or still incomplete, you will have to try figuring it out, or ask for the correct solution in the [https://alpinelinux.org/community/ community].<br />
<br />
And then carefully edit the wiki page.<br />
<br />
Just as those before you did it for you.<br />
}}<br />
<br />
<br />
== Minimal Hardware Requirements ==<br />
<br />
* At least 100 MB of RAM. [A graphical desktop system may require up to 1 GB minimum.]<br />
* At least 0-700 MB space on a writable storage device. [Only required in "sys" or "data" mode installations (explained below). It is optional in "diskless" mode, where it may be used to save newer data and configurations states of a running system.]<br />
<br />
For more information please check [[Requirements]]<br />
<br />
== Installation Overview ==<br />
<br />
=== The general course of action ===<br />
{{Note|For single-board-computer (SBC) architectures which can not boot .iso images, see [[Alpine_on_ARM|Alpine on ARM]] for peculiarities.}}<br />
<br />
As usual, the regular installation procedure starts with three basic steps (additional details for all the steps follow [[Installation#additional details|below]]):<br><br />
<br />
# Downloading and verifying the proper [http://alpinelinux.org/downloads stable-release ISO installation image-file] for the computer's architecture, and the corresponding <code>sha256</code> (checksum) and <code>GPG</code> (signature) files. <br />
# Either burning the ISO image-file onto a blank CD/DVD/Blu-ray disk with disk burning software, or flashing the installation image onto a bootable storage device (USB-device, CF-/MMC-/SD-card, floppy, ...). Optionally to setup a headless system, a bootstrapping configuration overlay file [https://github.com/macmpi/alpine-linux-headless-bootstrap headless.apkovl.tar.gz] may be added to enable basic networking, so that following configuration steps can be performed under <code>ssh</code>.<br />
# Booting the computer from the prepared disk or storage device.<br />
<br />
The boot process of the installation image first copies the entire operating system into the RAM memory, and then already starts a complete Alpine Linux system from there. It will initially only provide a basic command line environment that does not depend on reading from any (possibly slow) initial boot media, anymore.<br />
<br />
Log-in is possible as the user <code>root</code>. Initially, the root user has no password.<br />
<br />
At the command prompt, an interactive script named <code>[[Alpine_setup_scripts#setup-alpine|setup-alpine]]</code> is available to configure and install the initial Alpine Linux system.<br />
<br />
The question-and-answer dialog of <code>[[Alpine_setup_scripts#setup-alpine|setup-alpine]]</code> takes care of the base configuration and allows to configure the system to</br><br />
boot into one of three different '''Alpine Linux disk modes''': '''"diskless"''', '''"data"''', or '''"sys"'''.<br />
<br />
These modes are explained in more detail in the following subsections.<br />
<br />
{{Note|It can be helpful to know that it is possible to first only complete a base configuration of the initial "diskless" installation system in order to to prepare the system. For example, to download and install some specific driver or software tool. And then use more specific [[Alpine_setup_scripts|setup-scripts]] afterwards, to proceed with the final installation. The base configuration of the "diskless" system may be completed by running <code>[[Alpine_setup_scripts#setup-alpine|setup-alpine]]</code> and answering "none" when asked for the disk to use, and where to store configs, as well as for the location for the package cache.<br />
<br />
Examples of preparation options:<br />
<br />
* Preparing a custom partitioning or filesystem scheme that avoids to use and/or overwrite an entire disk ([[Installation#Custom_partitioning_of_the_harddisk|details below]]).<br />
* Installing something that may be missing in the live system to configure the hardware, e.g. by using the alpine package manager <code>[[Alpine_Linux_package_management|apk]]</code>.<br />
<br />
Examples of proceeding options:<br />
<br />
* <code>[[Alpine_setup_scripts#setup-lbu|setup-lbu]]</code> to configure a "local backup" location for the diskless system, and <code>[[Alpine_local_backup|lbu commit]]</code> to then save the local configuration state.<br />
* <code>[[Alpine_setup_scripts#setup-apkcache|setup-apkcache]]</code> to configure a local package cache storage location.<br />
* <code>[[Alpine_setup_scripts#setup-disk|setup-disk]]</code> to add a "data" mode partition, or do a classic full install of the "diskless" system onto a "sys" disk or partition.<br />
<br />
There are many more [[Alpine_setup_scripts|setup-scripts]] available. All these tools may also be run later to adjust specific configurations. For example, to set up a graphical environment as covered under [[Installation#Post-Install|Post-Install]] below.<br />
}}<br />
<br />
==='''Diskless Mode'''=== <br />
This means the entire operating system with all applications are first loaded into RAM and then only run from there. This is the method used to boot for the .iso installation images. It's is extremely fast and can save on unnecessary disk spin-ups, power, and wear. It is similar to what other linux distributions may call a "frugal" install and boot into with a "toram" option. However, <code>[[Alpine_setup_scripts#setup-alpine|setup-alpine]]</code> can also configure the installed system to boot like this if "disk=none" is specified.<br />
<br />
Custom configurations and package selections may optionally still be preserved or "persist" across reboots by using the Alpine local backup tool <code>[[Alpine_local_backup|lbu]]</code>. It enables committing and reverting system states by using .apkovl files that are saved to writable storage and loaded when booting. If additional or updated packages have been added to the system, these may also be made available for automatic (re)installation during the boot phase without any (re)downloading, by enabling a [[Alpine_Linux_package_management#Local_Cache|local package cache]] on the writable storage.<br />
<br />
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10473 FIXME-1]: Storing local configs and the package cache on an ''internal'' disk still requires [[Alpine_local_backup#Saving_and_loading_ISO_image_customizations|some manual steps]] to have the partition listed, i.e. making a /etc/fstab entry, mountpoint, and mount, *before* running setup-alpine. The linked workaround also still requires to commit these configurations to disk manually before rebooting.]<br />
<br />
If a writable partition is available, <code>setup-alpine</code> can be told to store the configs and the package cache on that writable partition. (Later, another directory on that same partition or another available partition may also be mounted as /home, or for example, for selected important applications to keep their run-time and user data on it.)<br />
<br />
The boot device of the newly configured local "diskless" system may remain the initial (and possibly read-only) installation media. But it is also possible to copy the boot system to a partition (e.g. /dev/sdXY) with <code>[[Alpine_setup_scripts#setup-bootable|setup-bootable]]</code>.<br />
<br />
==='''Data Disk Mode'''=== <br />
This mode also runs from system RAM, thus it enjoys the same accelerated operation speed as "diskless" mode. However, swap storage and the entire {{Path|/var}} directory tree get mounted from a persistent storage device (two newly created partitions). The directory {{Path|/var}} holds e.g. all log files, mailspools, databases, etc., as well as <code>[[Alpine_local_backup|lbu]]</code> backup commits and the package cache. This mode is useful for having RAM accelerated servers with variable amounts of user-data that exceed the available RAM size. It enables the entire current system state (not just the boot state) to survive a system crash in accordance with the particular filesystem guarantees. <br />
<br />
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10474 FIXME-2]]: Setup-alpine will create the data partition and mount it as /var, but can not yet configure lbu storage settings automatically. It is currently necessary to select "none" at the 'where to store configs' prompt (the new data partition is not listed) and configure lbu manually. For example, after running <code>setup-alpine</code> and before rebooting:<br />
<br />
# Set LBU_MEDIA=sdXY in /etc/lbu/lbu.conf<br />
# Execute a corresponding <code>echo "/dev/sdXY /media/sdXY <fstype> rw 0 0" >> /etc/fstab</code><br />
# Save the configuration for the next boot with <code>lbu commit</code>.<br />
<br />
In data disk mode, the boot device may also remain the initial (and possibly read-only) installation media, or be copied to a partition (e.g. /dev/sdXY) with <code>[[Alpine_setup_scripts#setup-bootable|setup-bootable]]</code>.<br />
<br />
==='''System Disk Mode'''=== <br />
This is a traditional hard-disk install.<br />
<br />
If this mode is selected, the <code>[[setup-alpine]]</code> script creates three partitions on the selected storage device, {{Path|/boot}}, {{Path|swap}} and {{Path|/}} (the filesystem root). This mode may, for example, be used for generic [[Desktops|desktop]] and development machines.<br />
<br />
For custom partitioning, see [[Setting_up_disks_manually]].<br />
<br />
To install along side another operating systems, see [[Installing_Alpine_on_HDD_dualbooting]].<br />
<br />
== Basic Installation Step Details ==<br />
<br />
{{Expand| }}<br />
<br />
This "Additional Details" section needs to be consolidated with the work at '''[https://docs.alpinelinux.org https://docs.alpinelinux.org] (not finished)''' <br />
(Restructuring things there, moving and linking from here or there?). <br />
<br />
<br />
=== Verifying the downloaded image-file ===<br />
<br />
{| class="wikitable" style="width:95%; align=center"<br />
|+ Commands to verify the checksum and GPG signature of a downloaded image-file on different systems.<br />
|-<br />
! width=100px | OS type<br />
! <code>SHA256</code> check !! <code>SHA256</code> calculation (to be compared manually) !! <code>GPG</code> signature verification<br />
|-<br />
! Linux<br />
| <code>sha256sum -c alpine-*.iso.sha256</code> || || <code>curl https://alpinelinux.org/keys/ncopa.asc &#124; gpg --import ;</code><br />
<code> gpg --verify alpine-<version>.iso.asc alpine-<version>.iso</code><br />
|-<br />
! MACOS <br />
| - ? - || <code>shasum -a 256 alpine-*.iso</code> || - ? -<br />
|-<br />
! OpenBSD <br />
| <code>sha256 -C alpine-*.sha256 alpine-*.iso</code> || || <code>doas pkg_add gnupg;<br />
ftp -o - https://alpinelinux.org/keys/ncopa.asc &#124; gpg --import ;<br />
gpg --verify alpine-<version>.iso.asc alpine-<version>.iso</code><br />
|-<br />
! FreeBSD <br />
| - ? - || <code>/usr/local/bin/shasum -a 256 alpine-*.iso</code> || - ? -<br />
|-<br />
! NetBSD <br />
| - ? - || <code>/usr/local/bin/shasum -a 256 alpine-*.iso</code> || - ? -<br />
|-<br />
! Windows (PowerShell installed)<br />
| - ? - || <code>Get-FileHash .\alpine-<image-version>.iso -Algorithm SHA256</code> || - ? -<br />
|}<br />
<br />
=== Flashing (direct data writing) the installation image-file onto a device or media ===<br />
<br />
==== Unix/Linux ====<br />
<br />
Under Unix (and thus Linux), "everything is a file" and the data in the image-file can be written to a device or media with the <code>dd</code> command. Afterward, executing the <code>eject</code> command removes the target device from the system and ensures the write cache is completely flushed.<br />
<br />
dd if=<iso-file-to-read-in> of=<target-device-node-to-write-out-to> bs=4M oflag=sync status=progress; eject <target-device-node-to-write-to><br />
<br />
Be careful to correctly identify the target device as any data on it '''will''' be lost! All connected "bulk storage devices" can be listed with <code><nowiki>lsblk</nowiki></code> and <code><nowiki>blkid</nowiki></code>.<br />
<br />
# lsblk<br />
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT<br />
sdX 0:0 0 64,0G 0 disk <br />
├─sdX1 0:1 0 2G 0 part <br />
└─sdX2 0:2 0 30G 0 part /mnt/sdX2<br />
<br />
# blkid<br />
/dev/sdX1: LABEL="some" UUID="..." TYPE="vfat"<br />
/dev/sdX2: LABEL="other" UUID="..." TYPE="ext4"<br />
<br />
For example, if /dev/sdX is the desired target device, first make sure you un-mount all mounted partitions of the target device. For example sdX1 and sdX2:<br />
<br />
umount /dev/sdX1 /dev/sdX2<br />
<br />
<br />
For <code>dd</code>'s output-file (<code>of=</code>), however, do '''not''' specify a partition number. For example, write to sdX, '''not''' sdX1:<br />
<br />
Warning: '''This will overwrite the target device /dev/sdX''', so before executing, make sure you have a backup of the data if you can't afford to lose it.<br />
<br />
dd if=~/Downloads/alpine-standard-3.00.0-x86_64.iso of=/dev/sdX bs=4M oflag=sync status=progress; eject /dev/sdX<br />
<br />
==== Windows ====<br />
<br />
For example, there is the [https://rufus.ie/ Rufus] program. Rufus will enable you to create bootable USB flash drives under Windows. <br />
<br />
Rufus has been tested and works for Alpine Linux 3.12.x with the following settings:<br />
* '''Partition scheme''': <code>MBR</code><br />
* '''Target system''': <code>BIOS or UEFI</code><br />
* '''File system''': <code>FAT32</code><br />
* '''Cluster size''': <code>4096 bytes (default)</code><br />
<br />
=== Verifying the written installation media ===<br />
<br />
After detaching and re-attaching the device, a bit-wise comparison can verify the data written to the device (instead of just data buffered in RAM). If the comparison terminates with an end-of-file error on the .iso file side, all the contents from the image have been written (and re-read) successfully:<br />
<br />
# cmp ~/Downloads/alpine-standard-3.00.0-x86_64.iso /dev/sdX<br />
cmp: EOF on alpine-standard-3.00.0-x86_64.iso<br />
<br />
=== Booting from external devices ===<br />
<br />
Insert the boot media to a proper drive or port of the computer and turn the machine on, or restart it, if already running.<br />
<br />
If the computer does not automatically boot from the desired device, one needs to bring up the boot menu and choose the media to boot from. Depending on the computer, the menu may be accessed by repeatedly pressing a key quickly when booting starts. Some computers require that you press the button ''before'' starting the computer and hold it down while the computer boots. Typical keys are: `F9`-`F12`, sometimes `F7` or `F8`. If these don't bring up the boot menu, it may be necessary to enter the BIOS configuration and adjust the boot settings, for which typical keys are: `Del.` `F1` `F2` `F6` or `Esc.`<br />
<br />
=== Custom partitioning of the harddisk ===<br />
<br />
It is possible to specify configurations for RAID, encryption, LVM, etc. as well as manual partitioning.<br />
<br />
For "diskless" or "data disk" mode installs, manual partitioning may be needed to prepare the harddisk for committing local backups of the system state with <code>[[Alpine_local_backup|lbu commit]]</code>, to have a place for a package cache, or to use it for a /var mount. <br />
<br />
For a "sys" install, custom partitioning is needed only if the desired scheme differs from overwriting an entire disk, or using the default set of a /boot, swap and root partition on the disk.<br />
<br />
See [[Setting_up_disks_manually]] for the alpine options for RAID, encryption, LVM, etc. and manual partitioning.<br />
<br />
=== Questions asked by <code>setup-alpine</code> ===<br />
[[File:Installation-alpine-alpine-setup-3-setup-scripts.png|350px|thumb|right|Example <code>setup-alpine</code> session]]<br />
<br />
The <code>[[setup-alpine]]</code> script offers the following configuration options:<br />
<br />
* '''Keyboard Layout''' (Local keyboard language and usage mode, e.g. ''us'' and variant of ''us-nodeadkeys''.)<br />
* '''Hostname''' (The name for the computer.)<br />
* '''Network''' (For example, automatic IP address discovery with the "DHCP" protocol.)<br />
* '''DNS Servers''' (Domain Name Servers to query. For privacy reasons it is NOT recommended to route every local request to servers like google's <s>8.8.8.8</s> .)<br />
* '''Timezone'''<br />
* '''Proxy''' (Proxy server to use for accessing the web. Use "none" for direct connections to the internet.)<br />
* '''Mirror''' (From where to download packages. Choose the organization you trust giving your usage patterns to.)<br />
* '''SSH''' (Secure SHell remote access server. "Openssh" is part of the default install image. Use "none" to disable remote login, e.g. on laptops.)<br />
* '''NTP''' (Network Time Protocol client used for keeping the system clock in sync with a time server. Package "chrony" is part of the default install image.)<br />
* '''Disk Mode''' (Select between diskless (disk="none"), "data" or "sys", as described above.) <br />
{{Warning|The data on a chosen device will be overwritten!}}<br />
<br />
=== Preparing for the first boot ===<br />
<br />
If <code>setup-alpine</code> has finished configuring the "sys" disk mode, the system should be ready to reboot right away (see next subsection).<br />
<br />
If the new local system was configured to run in "diskless" or "data" mode, and you do not want keep booting from the initial (and possibly read-only) installation media, the boot system needs to be copied to another device or partition.<br />
<br />
The target partition may be identified using <code><nowiki>lsblk</nowiki></code> (after installing it with <code>apk add lsblk</code>) and/or <code>blkid</code>, similar to previously identifying the initial installation media device.<br />
<br />
The procedure to copy the boot system is explained at <code>[[Alpine_setup_scripts#setup-bootable|setup-bootable]]</code><br />
<br />
Once everything is in place, save your customized configuration with <code>lbu commit</code> before rebooting.<br />
<br />
=== Rebooting and testing the new system ===<br />
<br />
First, remove the initial installation media from the boot drive, or detach it fron the port it's connected to.<br />
<br />
The system may now be power-cycled or rebooted to confirm everything is working correctly.<br />
<br />
The relevant commands for this are <code>poweroff</code> or <code>reboot</code>.<br />
<br />
=== Completing the installation ===<br />
<br />
The installation script installs only the base operating system. '''No''' applications e.g. web server, mail server, desktop environment, or web browser are installed, and <code>root</code> is the only user.<br />
<br />
Please look under "Post-Install" below, for some common things to do after installation.<br />
<br />
<br />
= Further Installation Instructions =<br />
<br />
=== Installation ===<br />
<br />
* [[Kernels]] ''(kernel selection, e.g. for VMs or RPi)''<br />
* [[How to make a custom ISO image with mkimage]] ''(installation media with its own configuration)''<br />
* [[Directly booting an ISO file]] ''(without flashing it to a disk or device)''<br />
* [[Dualbooting|Dual/multi-boot install to HDD partition]]<br />
* [[Netboot Alpine Linux using iPXE]]<br />
Also see other [[:Category:Installation|Installation Category]] pages.<br />
<br />
=== Post-Installation ===<br />
<br />
<!-- COMMENT FOR EDITORS<br />
<br />
If you edit Post-Install,<br />
<br />
* Consider that there are already [[Tutorials_and_Howtos#Post-Install]], [[Developer_Documentation#Package_management]] and the Handbook, please work towards reducing duplication and providing an overview, and topic details of considerable size on their own pages.<br />
* Here, only the most relevant jumping off points are listed, not exact list duplicates!!!<br />
* Keep short-list of links here, as overview to more detailed topic specific pages.<br />
* Don't aggregate different topics at yet another place.<br />
<br />
--><br />
<br />
{{Note|A [[Post installation|Post Installation]] wiki page is available, however, post-installation information should be kept at their individually manageable topic pages and only directly referenced (linked) in this Post-Installation section.}}<br />
<br />
* [[Setting up a new user]] ''(to allow remote, console, or graphical logins)''<br />
* [[Tutorials_and_Howtos#Networking|Setting up Networking]] ''(including non-standard configurations)''<br />
* [[Package_management|Package Management (apk)]] ''(how to search/add/del packages etc.)''<br />
** [[Package_management#Upgrade_a_Running_System|Upgrading Alpine]] ''(checking for and installing updates)''<br />
** [[Repositories#Enabling_the_community_repository|Enabling the community repository]] ''(access to additional packages)''<br />
* [[FAQ#Why_don.27t_I_have_man_pages_or_where_is_the_.27man.27_command.3F|man command/man pages]]<br />
* [[Change default shell]]<br />
* [[Running glibc programs]] ''(installation and development)''<br />
<br><br />
<br />
* [[Alpine_local_backup|Local backup utility <code>lbu</code>]] ''(persisting RAM system configurations)''<br />
** [[Back Up a Flash Memory Installation]] ''("diskless mode" systems)''<br />
** [[Manually_editing_a_existing_apkovl]] ''(the stored custom configs)''<br />
<br><br />
<br />
* [[OpenRC|Init System (OpenRC)]] ''(configure a service to automatically boot at next reboot)''<br />
** [[Writing Init Scripts]]<br />
** [[Multiple Instances of Services]]<br />
<br><br />
<br />
* [[Alpine setup scripts#setup-xorg-base|<code>setup-xorg-base</code>]] ''(setup graphical base environment)''<br />
** [[Tutorials_and_Howtos#Desktop_Environment|Desktop Environments]]<br />
<br><br />
<br />
* [[Hosting services on Alpine]] ''(links to several mail/web/ssh server setup pages)''<br />
<br><br />
<br />
* [[How to get regular stuff working]] ''(things one may miss in a too lightweight installation )''<br />
* Running applications and services in their own [[Firejail Security Sandbox]]<br />
<br />
=== Broader Usage Guides ===<br />
<br />
* See: [[Tutorials and Howtos]]<br />
<br />
= General Documentation =<br />
<br />
{{Tip| Alpine Linux packages stay close to the upstream design. Therefore, all upstream documentation about configuring a software package, as well as good configuration guides from other distributions that stay close to upstream, e.g. those in the [https://wiki.archlinux.org/ Arch Wiki], are to a large degree, also applicable to configuring the software on Alpine Linux, thus can be very useful.}}<br />
<br />
* [[FAQ|FAQs]]<br />
<br />
* [[Contribute|How to Contribute]]<br />
* [[Developer Documentation]]<br />
* [[Alpine_Linux:Wiki_etiquette|Wiki etiquette]] ''(to collaborate on this documentation)''<br />
* [[Comparison with other distros]] ''(how common things are done on Alpine)''<br />
<br />
<br />
<br />
<br />
<br />
<br />
----<br />
[[Category:Installation]]</div>Guest09248https://wiki.alpinelinux.org/w/index.php?title=Post_installation&diff=22310Post installation2022-09-13T16:46:16Z<p>Guest09248: Replaced the first Note with a proposal to delete this page</p>
<hr />
<div>{{Delete|After all of the information in this page is moved to their own pages, and links to the pages have been provided in [[Installation#Post-Installation]] this page should be deleted}}<br />
<br />
== General Notes ==<br />
<br />
* When '''#''' is displayed before a command, that means the command needs to be run with root privileges.<br />
<br />
* Anything in < > is likely just a placeholder that you need to replace (example: <editor> file.txt).<br />
<br />
* Some information in here might be a repeat of information in other wiki pages. If you find a section where that is the case, please add a link to the original wiki page.<br />
<br />
<br><br />
<br />
== Network setup ==<br />
<br />
==== Wi-Fi ====<br />
<br />
* [[Wi-Fi]]<br />
* [[NetworkManager]]<br />
<br />
==== Ethernet (Wired) ====<br />
<br />
{{Expand|Documentation on Ethernet (Wired) internet setup needs to be created/expanded, maybe information from other wiki's/docs might be helpful?}}<br />
<br />
* [[Ethernet|Ethernet]]<br />
* [[NetworkManager]]<br />
<br />
<br><br />
<br />
== Creating a new standard user account ==<br />
<br />
{{Note| This should be safe to delete. All relevant information should be in [[Setting up a new user]]}}<br />
<br />
After installing Alpine by default you only get a root account. You will probably want to create an account that is not root,<br />
<br />
{{cmd|# adduser <YourUsername>}}<br />
{{Note|replace <YourUsername> with the username of your choice}}<br />
<br />
<br><br />
<br />
You will probably want to install '''doas''' so you can allow <YourUsername> to use root privileges:<br />
<br />
{{cmd|# apk add doas}}<br />
<br />
<br><br />
<br />
If you want your user to be able to use root privileges, first add them to the '''wheel''' group:<br />
<br />
{{cmd|# adduser <YourUsername> wheel}}<br />
<br />
<br><br />
<br />
You will then want to allow members of the '''wheel''' group to use root privileges with '''doas'''. To do this, open the '''doas''' config file:<br />
<br />
{{cmd|# <editor> /etc/doas.d/doas.conf}}<br />
<br />
Add the following line and save the file:<br />
<br />
{{cmd|permit persist :wheel}}<br />
<br />
<br><br />
<br />
To switch to your new account, type '''exit''' in the shell and login as the new user.<br />
<br />
<br><br />
<br />
==== Groups ====<br />
<br />
Groups are needed for certain operations on your system (e.g <code>audio</code> to manage your system audio). Below is a list of groups:<br />
{{Note|may be incomplete, if you see a group missing please add it along with a description}}<br />
<br />
{{Cmd|disk:x:6:root,adm Only if need usage with virtual machines and access to other partitions over new disks for<br />
lp:x:7:lp If you need use printing services and printers management<br />
floppy:x:11:root Backward compatible group, use only if need access to external special devices<br />
audio:x:18: Need for audio listening and management of sound volumes as normal user<br />
cdrom:x:19: For access to disk writers and mounting DVD, BR or CD-ROM disk as normal user<br />
dialout:x:20:root Need for dial private connections and use of modems as normal users<br />
tape:x:26:root Need this if planning to use special devices for backup. Rarely used on servers<br />
video:x:27:root For usage of cameras, more than one GPU special features, as normal user<br />
netdev:x:28: For network connections management as normal user<br />
kvm:x:34:kvm Only if as normal user will manage graphically virtual machines. Rarely used on servers<br />
games:x:35: Need if you want to play games also especially needed to share score between users<br />
cdrw:x:80: To write RW-DVD, RW-BR or RW-CD disk on a disk writing device<br />
apache:x:81: Need if you will perform development as normal user and want to publish locally on web server<br />
usb:x:85: Need to access to special USB devices, deprecated group<br />
users:x:100:games If you plan to used common files for all users, mandatory as desktop usage<br />
input:x:23 Needed if you want your mouse and keyboard to work in a graphical desktop environment (xorg only? idk) }}<br />
<br><br />
<br />
To add your user to a group use the following command:<br />
<br />
{{Cmd|# adduser <YourUsername> <group>}}<br />
{{Note|you need to log out for the group change(s) to take effect}}<br />
<br />
<br><br />
<br />
== Repositories ==<br />
<br />
{{Note| This should be safe to delete. All relevant information should be in [[Repositories]]}}<br />
<br />
The Alpine software repositories have three branches:<br />
<br />
* '''Main''': Main packages are the Alpine software that have direct support and updates from the Alpine core and main team. They also have official special documentation, are always available for all releases and will have substitutions if some are not continued from upstream. Commonly, those packages are selected due to their responsibility and stability with respect to upstream availability. When those in ''testing'' perform well or are mature, they go to the ''main'' branch.<br />
* '''Community''': Community packages are those made by users in concert with the official developers and integrated into the Alpine packages. They are user supported. Support could end if the user ends support with respect to Alpine work. For example, could not include substitution in next release due to lack of support by the upstream author. They are in ''edge'', and when accepted, go to the ''community'' branch.<br />
* '''Edge''': New packages come into testing repositories of the edge Alpine version and are those made by any contributor or manpower on Alpine. The edge contains unstable current development content. This branch has no release linked or related to Alpine. They are in ''testing'' and when accepted, go to the ''community'' branch.<br />
<br />
<br><br />
<br />
By default only the '''main''' repository is enabled. Most users will probably want to enable the '''community''' repository. To enable a repository, remove the '''#''' in front of the URL along with any blank space.<br />
<br />
<br><br />
<br />
(Example) Disabled:<br />
{{cat|/etc/apk/repositories|#http://dl-cdn.alpinelinux.org/alpine/v3.15/community}}<br />
<br />
(Example) Enabled:<br />
{{cat|/etc/apk/repositories|http://dl-cdn.alpinelinux.org/alpine/v3.15/community}}<br />
<br />
<br><br />
<br />
To edit the repositories, open the <code>/etc/apk/repositories</code> file in a text editor:<br />
<br />
{{cmd|# <editor> /etc/apk/repositories}}<br />
<br />
<br><br />
<br />
Example default configuration:<br />
<br />
{{cat|/etc/apk/repositories|#/media/cdrom/apks<br />
http://dl-cdn.alpinelinux.org/alpine/v3.15/main<br />
# http://dl-cdn.alpinelinux.org/alpine/v3.15/community<br />
#http://dl-cdn.alpinelinux.org/alpine/edge/main<br />
#http://dl-cdn.alpinelinux.org/alpine/edge/community<br />
#http://dl-cdn.alpinelinux.org/alpine/edge/testing}}<br />
<br />
{{Note|The edge repositories contain unstable and/or possibly untested packages. Use at your own risk!}}<br />
<br />
<br><br />
<br />
To avoid having to manually update the verison in '''/etc/apk/repositories''' for each Alpine Linux update, change '''v3.15''' to '''latest-stable'''.<br />
<br />
Example:<br />
{{cat|/etc/apk/repositories|#/media/cdrom/apks<br />
http://dl-cdn.alpinelinux.org/alpine/latest-stable/main<br />
http://dl-cdn.alpinelinux.org/alpine/latest-stable/community<br />
#http://dl-cdn.alpinelinux.org/alpine/edge/main<br />
#http://dl-cdn.alpinelinux.org/alpine/edge/community<br />
#http://dl-cdn.alpinelinux.org/alpine/edge/testing}}<br />
<br />
{{Note|Changing the repositories to latest-stable may initiate unexpected release upgrades. Do this at your own risk!}}<br />
<br />
<br><br />
<br />
For [https://en.wikipedia.org/wiki/HTTPS#Technical security reasons], it may be a good idea to change the url's from '''http''' to '''https'''<br />
<br />
Example:<br />
{{cat|/etc/apk/repositories|#/media/cdrom/apks<br />
https://dl-cdn.alpinelinux.org/alpine/v3.15/main<br />
https://dl-cdn.alpinelinux.org/alpine/v3.15/community<br />
#https://dl-cdn.alpinelinux.org/alpine/edge/main<br />
#https://dl-cdn.alpinelinux.org/alpine/edge/community<br />
#https://dl-cdn.alpinelinux.org/alpine/edge/testing}}<br />
<br />
{{Note|Some Alpine Linux package mirrors may not support HTTPS. If that is the case, you will need to revert back or change mirrors.}}<br />
<br />
<br><br />
<br />
Once you have edited '''/etc/apk/repositories''', sync the repositories with:<br />
<br />
{{cmd|# apk update}}<br />
<br />
<br><br />
<br />
== Installing a Display Server (for graphical sessions) ==<br />
<br />
==== Xorg ====<br />
Most desktop environments (DE) or Windows Managers (WM) require Xorg (also called: X11, X). While in the future many will fully migrate to [[Wayland]], currently Xorg is still widely used. <br />
<br />
<br><br />
<br />
There are two ways you can get Xorg installed.<br />
<br />
<br><br />
<br />
By default Alpine Linux provides a script that will install Xorg. Run the following command to install Xorg:<br />
{{cmd|# setup-xorg-base}}<br />
<br />
or<br />
<br />
{{cmd|# apk add xorg-server xorg-server-common xorg-server-dev xorgproto xorgxrdp xorgxrdp-dev}}<br />
{{Note| the apk add method is probably incomplete}}<br />
<br />
<br><br />
<br />
==== Wayland ====<br />
''See also: [[Wayland]]''<br />
<br />
{{Expand|Wayland documentation needs to be expanded}}<br />
<br />
<br><br />
<br />
== Fonts ==<br />
<br />
If you plan to use a graphical desktop environment, you may need/want to install fonts.<br />
{{Note|depending on the desktop environment/window manager fonts may or may not be installed automatically or as dependencies}}<br />
<br />
'''See: [[Fonts|Fonts]]'''<br />
<br />
<br><br />
<br />
== Installing a desktop environment or window manager ==<br />
<br />
'''See: [[Desktop environments and Window managers]]'''<br />
<br />
<br><br />
<br />
== Sound ==<br />
<br />
By default Alpine does not come with any sound management out of the box. These are your options:<br />
<br />
* [[PipeWire]]<br />
* [[PulseAudio]]<br />
* [[ALSA]]<br />
<br />
{{Note|If you are unsure, {{Pkg|pipewire}} is the recommended option}}<br />
<br />
<br><br />
<br />
== Language support ==<br />
<br />
{{Expand}}<br />
<br />
* Fix unicode defaults: <code>sed -i 's/#unicode="NO"/#unicode="NO"\nunicode="YES"/' /etc/rc.conf</code><br />
* <code>apk add musl-locales</code> Installs a limited set of locales (languages) for musl (C library) generated console messages.<br />
* Listing defined locales is possible with <code>locale -a</code><br />
* <code>cp /etc/profile.d/locale.sh /etc/profile.d/locale.sh.sh</code> Copies the default locale settings. Then the custom override file can be edited <code>nano /etc/profile.d/locale.sh.sh</code>.<br />
* <code>apk add lang</code> Pulls in the translation packages of all installed packages.<br />
* <code>apk list hunspell*</code> To list available hunspell dictionary packages.<br />
* <code>apk list *-xy *-xy-*</code> To list translation packages for your specific (xy) language (for example, pt for Portuguese).<br />
<br />
<br><br />
<br />
== Miscellaneous ==<br />
<br />
Some other miscellaneous things that might be useful:<br />
<br />
==== Basic tools ====<br />
<br />
Alpine is a minimalist Linux distribution. If you expected a behavior like other Linux distributions, the similarity to them will be minimal at best. To install a selection of commonly used packages, run: <br />
<br />
{{Cmd|# apk add sed attr dialog bash bash-completion grep util-linux pciutils usbutils binutils findutils readline lsof less nano curl}}<br />
<br />
{{Cmd|<nowiki>$ export PAGER=less</nowiki>}}<br />
<br />
<br />
==== Manual pages ====<br />
<br />
{{Note| This should be safe to delete. All relevant information should be in [[Alpine_Linux:FAQ#Why_don.27t_I_have_man_pages_or_where_is_the_.27man.27_command.3F]]}}<br />
<br />
Manual pages are not included in the base install, but are just an apk command away:<br />
<br />
{{Cmd|# apk add man-pages mandoc}}<br />
<br />
In case you want to check if a specific command/program/configuration file has man pages:<br />
<br />
{{Cmd|$ man -k dd<br />
$ man -k curl<br />
$ man -k host.conf}}<br />
<br />
<br />
To automatically install the documentation for all installed packages, run:<br />
<br />
{{Cmd|# apk add docs}}<br />
<br />
== Troubleshooting ==<br />
<br />
==== I don't have permission to do anything in my user's home directory! ====<br />
<br />
By default the permissions of your new user(s) home directory may be limited to the root account. Run one of these commands to change that: <br />
<br />
{{cmd|# chown <YourUserName> /home/<YourUserName> && chmod 700 /home/<YourUsername>}}<br />
<br />
or<br />
<br />
{{cmd|# chown <YourUserName> /home/<YourUserName> && chmod 750 /home/<YourUsername>}}<br />
<br />
<br><br />
<br />
== See also ==<br />
* [[Installation]]<br />
* [[Alpine newbie]]<br />
* [[Comparison with other distros]]<br />
<br />
[[Category:Newbie]]<br />
[[Category:Installation]]</div>Guest09248https://wiki.alpinelinux.org/w/index.php?title=User:Guest09248&diff=21614User:Guest092482022-02-22T20:27:25Z<p>Guest09248: Created page with "I, Guest09248, hereby re-license my contributions to the Alpine Linux wiki under the username Guest09248 under the terms of the CC-BY-SA license."</p>
<hr />
<div>I, Guest09248, hereby re-license my contributions to the Alpine Linux<br />
wiki under the username Guest09248 under the terms of the<br />
CC-BY-SA license.</div>Guest09248https://wiki.alpinelinux.org/w/index.php?title=LXQt&diff=21487LXQt2022-01-12T22:25:08Z<p>Guest09248: /* Prerequisites */</p>
<hr />
<div>'''LXQt''' is a lightweight QT based desktop environment, LXQt was originally a port of LXDE to QT (called LXDE-Qt), it was created due to LXDE maintainer Hong Jen Yee being dissatisfied with GTK 3, on 21 July 2013 the LXDE(-Qt) and [https://en.wikipedia.org/wiki/Razor-qt Razor-qt] projects merged creating LXQt.<br />
<br />
<br><br />
<br />
= Prerequisites =<br />
<br />
* [[Installation|Install]] AlpineLinux<br />
* [[Post_installation#Creating_a_new_user_account|Create a user account]] (optional but recommended)<br />
* [[Post_installation#Repositories|Enable the Community repository]]<br />
* [[Alpine_setup_scripts#setup-xorg-base|Install Xorg]]<br />
<br />
{{Note|LXQt on Alpine currently requires having the '''/edge/testing''' repo enabled}}<br />
<br />
<br><br />
<br />
= Installation =<br />
<br />
{{Cmd|# apk add lxqt-desktop lxqt-core lxqt-panel lxqt-admin lxqt-config lxqt-notificationd lxqt-powermanagement lxqt-themes openbox}}<br />
<br />
{{Note|By default LXQt usually uses [[Openbox]] as its window manager, but LXQt supports many different window managers, See: [https://github.com/lxqt/lxqt/wiki/ConfigWindowManagers ConfigWindowManagers - LXQt Github wiki]}}<br />
<br />
== Optional packages ==<br />
<br />
===== Documentation =====<br />
<br />
* {{Pkg|lxqt-config-doc}} <br />
* {{Pkg|lxqt-openssh-askpass-doc}}<br />
* {{Pkg|lxqt-panel-doc}} <br />
* {{Pkg|lxqt-policykit-doc}} <br />
* {{Pkg|lxqt-runner-doc}} <br />
* {{Pkg|lxqt-session-doc}}<br />
* {{Pkg|lxqt-sudo-doc}}<br />
<br />
===== Development files =====<br />
<br />
* {{Pkg|lxqt-globalkeys-dev}} <br />
* {{Pkg|lxqt-panel-dev}}<br />
<br />
===== Misc =====<br />
<br />
* {{Pkg|lxqt-build-tools}}<br />
<br />
= See Also =<br />
* [[Installation]]<br />
* [[Post installation]]<br />
* [[Desktop environments and Window managers]]<br />
<br />
[[Category:Desktop]]</div>Guest09248https://wiki.alpinelinux.org/w/index.php?title=QEMU&diff=21486QEMU2022-01-12T22:20:31Z<p>Guest09248: /* Run a guest OS on Alpine Linux using KVM/QEMU */</p>
<hr />
<div>[http://wiki.qemu.org/Index.html QEMU] is a very flexible open source virtual machine and emulator. QEMU is able to virtualize or emulate x86, PowerPC, ARM, and S390 guests.<br />
<br />
= Install Alpine Linux in QEMU =<br />
{{:Install_Alpine_in_QEMU}}<br />
<br />
= Live mode =<br />
{{:Running_Alpine_in_Qemu_Live_mode}}<br />
<br />
= Advanced network configuration =<br />
<br />
{{:Running Alpine Linux As a QEMU networked Guest}}<br />
<br />
= Using Xorg inside QEMU =<br />
<br />
The video driver needed for Xorg inside QEMU is <code>xf86-video-modesetting</code>.<br />
<br />
{{tip|Probably for KVM/Qemu guests you want to use ''qxl'' Video and Display ''Spice''. For this purpose install xf86-video-qxl on guest and run a Spice client on the host}}<br />
<br />
If you decided to use a ''qxl'' Video on KVM/Qemu guest, add this configuration to `/etc/X11/xorg.conf`<br />
<br />
{{Cmd|Section "Device"<br />
Identifier "qxl"<br />
Driver "qxl"<br />
Option "ENABLE_SURFACES" "False"<br />
EndSection}}<br />
<br />
= Run a guest OS on Alpine Linux using KVM/QEMU =<br />
<br />
Install:<br />
<br />
{{Cmd|# apk add qemu-system-x86_64 qemu-modules libvirt libvirt-qemu}}<br />
<br />
{{Note|also install {{Pkg|virt-manager}} for a KVM/QEMU gui}}<br />
<br />
<br><br />
<br />
Add '''tun''' to <code>/etc/modules</code>:<br />
<br />
{{Cmd|(su) echo tun >> /etc/modules}}<br />
<br />
<br><br />
<br />
Starting '''tun''' now:<br />
<br />
{{Cmd|# modprobe tun}}<br />
<br />
<br><br />
<br />
Add your user to the '''kvm''' and '''qemu''' groups<br />
<br />
{{Cmd|# addgroup <username> kvm}}<br />
{{Cmd|# adduser <username> qemu}}<br />
<br />
Logout for the group changes to take effect<br />
<!-- {{Cmd|qemu-system-x86_64 --enable-kvm -m 1024M -fda M6410220.IMG}} --><br />
<br />
<br><br />
<br />
Adding services:<br />
<br />
{{Cmd|# rc-update add libvirtd}}<br />
{{Cmd|# rc-update add libvirt-guests}}<br />
<br />
Starting the services now:<br />
<br />
{{Cmd|# rc-service libvirt start}}<br />
{{Cmd|# rc-service libvirt-guests start}}<br />
<br />
<br><br />
<br />
If you are interested in using a bridged network (so that the guest machine can be reached easily from the outside), see [[Bridge]].<br />
<br />
<br />
[[Category:Virtualization]]</div>Guest09248https://wiki.alpinelinux.org/w/index.php?title=QEMU&diff=21485QEMU2022-01-12T22:20:09Z<p>Guest09248: </p>
<hr />
<div>[http://wiki.qemu.org/Index.html QEMU] is a very flexible open source virtual machine and emulator. QEMU is able to virtualize or emulate x86, PowerPC, ARM, and S390 guests.<br />
<br />
= Install Alpine Linux in QEMU =<br />
{{:Install_Alpine_in_QEMU}}<br />
<br />
= Live mode =<br />
{{:Running_Alpine_in_Qemu_Live_mode}}<br />
<br />
= Advanced network configuration =<br />
<br />
{{:Running Alpine Linux As a QEMU networked Guest}}<br />
<br />
= Using Xorg inside QEMU =<br />
<br />
The video driver needed for Xorg inside QEMU is <code>xf86-video-modesetting</code>.<br />
<br />
{{tip|Probably for KVM/Qemu guests you want to use ''qxl'' Video and Display ''Spice''. For this purpose install xf86-video-qxl on guest and run a Spice client on the host}}<br />
<br />
If you decided to use a ''qxl'' Video on KVM/Qemu guest, add this configuration to `/etc/X11/xorg.conf`<br />
<br />
{{Cmd|Section "Device"<br />
Identifier "qxl"<br />
Driver "qxl"<br />
Option "ENABLE_SURFACES" "False"<br />
EndSection}}<br />
<br />
= Run a guest OS on Alpine Linux using KVM/QEMU =<br />
<br />
Install:<br />
<br />
{{Cmd|# apk add qemu-system-x86_64 qemu-modules libvirt libvirt-qemu}}<br />
<br />
{{Note|also install {{Pkg|virt-manager}} for a KVM/QEMU gui}}<br />
<br />
<br><br />
<br />
Add '''tun''' to <code>/etc/modules</code>:<br />
<br />
{{Cmd|(su) echo tun >> /etc/modules}}<br />
<br />
<br><br />
<br />
Activating '''tun''' now:<br />
<br />
{{Cmd|# modprobe tun}}<br />
<br />
<br><br />
<br />
Add your user to the '''kvm''' and '''qemu''' groups<br />
<br />
{{Cmd|# addgroup <username> kvm}}<br />
{{Cmd|# adduser <username> qemu}}<br />
<br />
Logout for the group changes to take effect<br />
<!-- {{Cmd|qemu-system-x86_64 --enable-kvm -m 1024M -fda M6410220.IMG}} --><br />
<br />
<br><br />
<br />
Adding services:<br />
<br />
{{Cmd|# rc-update add libvirtd}}<br />
{{Cmd|# rc-update add libvirt-guests}}<br />
<br />
Starting the services now:<br />
<br />
{{Cmd|# rc-service libvirt start}}<br />
{{Cmd|# rc-service libvirt-guests start}}<br />
<br />
<br><br />
<br />
If you are interested in using a bridged network (so that the guest machine can be reached easily from the outside), see [[Bridge]].<br />
<br />
<br />
[[Category:Virtualization]]</div>Guest09248https://wiki.alpinelinux.org/w/index.php?title=QEMU&diff=21484QEMU2022-01-12T21:52:27Z<p>Guest09248: </p>
<hr />
<div>[http://wiki.qemu.org/Index.html QEMU] is a very flexible open source virtual machine and emulator. QEMU is able to virtualize or emulate x86, PowerPC, ARM, and S390 guests.<br />
<br />
= Install Alpine Linux in QEMU =<br />
{{:Install_Alpine_in_QEMU}}<br />
<br />
= Live mode =<br />
{{:Running_Alpine_in_Qemu_Live_mode}}<br />
<br />
= Advanced network configuration =<br />
<br />
{{:Running Alpine Linux As a QEMU networked Guest}}<br />
<br />
= Using Xorg inside QEMU =<br />
<br />
The video driver needed for Xorg inside QEMU is <code>xf86-video-modesetting</code>.<br />
<br />
{{tip|Probably for KVM/Qemu guests you want to use ''qxl'' Video and Display ''Spice''. For this purpose install xf86-video-qxl on guest and run a Spice client on the host}}<br />
<br />
If you decided to use a ''qxl'' Video on KVM/Qemu guest, add this configuration to `/etc/X11/xorg.conf`<br />
<br />
{{Cmd|Section "Device"<br />
Identifier "qxl"<br />
Driver "qxl"<br />
Option "ENABLE_SURFACES" "False"<br />
EndSection}}<br />
<br />
= Run a guest OS on Alpine Linux using QEMU =<br />
{{Cmd|# apk add qemu-system-x86_64 qemu-modules libvirt libvirt-qemu}}<br />
{{Cmd|# modprobe kvm-intel}}<br />
{{Cmd|# addgroup <username> kvm}}<br />
{{Cmd|# adduser <username> qemu}}<br />
<br />
Logout and login again so you become part of the kvm and qemu groups<br />
{{Cmd|qemu-system-x86_64 --enable-kvm -m 1024M -fda M6410220.IMG}}<br />
<br />
If you are interested in using a bridged network (so that the guest machine can be reached easily from the outside), see [[Bridge]].<br />
<br />
[[Category:Virtualization]]</div>Guest09248https://wiki.alpinelinux.org/w/index.php?title=QEMU&diff=21483QEMU2022-01-12T21:36:13Z<p>Guest09248: /* Run a guest OS on Alpine Linux using QEMU */</p>
<hr />
<div>[http://wiki.qemu.org/Index.html QEMU] is a very flexible open source virtual machine and emulator. QEMU is able to virtualize or emulate x86, PowerPC, ARM, and S390 guests.<br />
<br />
= Install Alpine Linux in QEMU =<br />
{{:Install_Alpine_in_QEMU}}<br />
<br />
= Live mode =<br />
{{:Running_Alpine_in_Qemu_Live_mode}}<br />
<br />
= Advanced network configuration =<br />
<br />
{{:Running Alpine Linux As a QEMU networked Guest}}<br />
<br />
= Using Xorg inside QEMU =<br />
<br />
The video driver needed for Xorg inside QEMU is <code>xf86-video-modesetting</code>.<br />
<br />
{{tip|Probably for KVM/Qemu guests you want to use ''qxl'' Video and Display ''Spice''. For this purpose install xf86-video-qxl on guest and run a Spice client on the host}}<br />
<br />
If you decided to use a ''qxl'' Video on KVM/Qemu guest, add this configuration to `/etc/X11/xorg.conf`<br />
<br />
{{Cmd|Section "Device"<br />
Identifier "qxl"<br />
Driver "qxl"<br />
Option "ENABLE_SURFACES" "False"<br />
EndSection}}<br />
<br />
= Run a guest OS on Alpine Linux using QEMU =<br />
{{Cmd|# apk add qemu-system-x86_64 qemu-modules}}<br />
{{Cmd|# modprobe kvm-intel}}<br />
{{Cmd|# addgroup <username> kvm}}<br />
{{Cmd|# adduser <username> qemu}}<br />
<br />
Logout and login again so you become part of the kvm and qemu groups<br />
{{Cmd|qemu-system-x86_64 --enable-kvm -m 1024M -fda M6410220.IMG}}<br />
<br />
If you are interested in using a bridged network (so that the guest machine can be reached easily from the outside), see [[Bridge]].<br />
<br />
[[Category:Virtualization]]</div>Guest09248https://wiki.alpinelinux.org/w/index.php?title=LXQt&diff=21482LXQt2022-01-12T20:53:07Z<p>Guest09248: </p>
<hr />
<div>'''LXQt''' is a lightweight QT based desktop environment, LXQt was originally a port of LXDE to QT (called LXDE-Qt), it was created due to LXDE maintainer Hong Jen Yee being dissatisfied with GTK 3, on 21 July 2013 the LXDE(-Qt) and [https://en.wikipedia.org/wiki/Razor-qt Razor-qt] projects merged creating LXQt.<br />
<br />
<br><br />
<br />
= Prerequisites =<br />
<br />
* [[Installation|Install]] AlpineLinux<br />
* [[Post_installation#Creating_a_new_user_account|Create a user account]] (optional but recommended)<br />
* [[Post_installation#Repositories|Enable the Community repository]]<br />
* [[Alpine_setup_scripts#setup-xorg-base|Install Xorg]]<br />
<br />
{{Note|LXQt on Alpine currently requires having the /edge/testing repo enabled}}<br />
<br />
<br><br />
<br />
= Installation =<br />
<br />
{{Cmd|# apk add lxqt-desktop lxqt-core lxqt-panel lxqt-admin lxqt-config lxqt-notificationd lxqt-powermanagement lxqt-themes openbox}}<br />
<br />
{{Note|By default LXQt usually uses [[Openbox]] as its window manager, but LXQt supports many different window managers, See: [https://github.com/lxqt/lxqt/wiki/ConfigWindowManagers ConfigWindowManagers - LXQt Github wiki]}}<br />
<br />
== Optional packages ==<br />
<br />
===== Documentation =====<br />
<br />
* {{Pkg|lxqt-config-doc}} <br />
* {{Pkg|lxqt-openssh-askpass-doc}}<br />
* {{Pkg|lxqt-panel-doc}} <br />
* {{Pkg|lxqt-policykit-doc}} <br />
* {{Pkg|lxqt-runner-doc}} <br />
* {{Pkg|lxqt-session-doc}}<br />
* {{Pkg|lxqt-sudo-doc}}<br />
<br />
===== Development files =====<br />
<br />
* {{Pkg|lxqt-globalkeys-dev}} <br />
* {{Pkg|lxqt-panel-dev}}<br />
<br />
===== Misc =====<br />
<br />
* {{Pkg|lxqt-build-tools}}<br />
<br />
= See Also =<br />
* [[Installation]]<br />
* [[Post installation]]<br />
* [[Desktop environments and Window managers]]<br />
<br />
[[Category:Desktop]]</div>Guest09248https://wiki.alpinelinux.org/w/index.php?title=LXQt&diff=21481LXQt2022-01-12T20:52:28Z<p>Guest09248: </p>
<hr />
<div>'''LXQt''' is a lightweight QT based desktop environment, LXQt was originally a port of LXDE to QT (called LXDE-Qt), it was created due to LXDE maintainer Hong Jen Yee being dissatisfied with GTK 3, on 21 July 2013 the LXDE(-Qt) and [https://en.wikipedia.org/wiki/Razor-qt Razor-qt] projects merged creating LXQt.<br />
<br />
<br><br />
<br />
= Prerequisites =<br />
<br />
* [[Installation|Install]] AlpineLinux<br />
* [[Post_installation#Creating_a_new_user_account|Create a user account]] (optional but recommended)<br />
* [[Post_installation#Repositories|Enable the Community repository]]<br />
* [[Alpine_setup_scripts#setup-xorg-base|Install Xorg]]<br />
<br />
{{Note|LXQt on Alpine currently requires having the Edge/testing repo enabled}}<br />
<br />
<br><br />
<br />
= Installation =<br />
<br />
{{Cmd|# apk add lxqt-desktop lxqt-core lxqt-panel lxqt-admin lxqt-config lxqt-notificationd lxqt-powermanagement lxqt-themes openbox}}<br />
<br />
{{Note|By default LXQt usually uses [[Openbox]] as its window manager, but LXQt supports many different window managers, See: [https://github.com/lxqt/lxqt/wiki/ConfigWindowManagers ConfigWindowManagers - LXQt Github wiki]}}<br />
<br />
== Optional packages ==<br />
<br />
===== Documentation =====<br />
<br />
* {{Pkg|lxqt-config-doc}} <br />
* {{Pkg|lxqt-openssh-askpass-doc}}<br />
* {{Pkg|lxqt-panel-doc}} <br />
* {{Pkg|lxqt-policykit-doc}} <br />
* {{Pkg|lxqt-runner-doc}} <br />
* {{Pkg|lxqt-session-doc}}<br />
* {{Pkg|lxqt-sudo-doc}}<br />
<br />
===== Development files =====<br />
<br />
* {{Pkg|lxqt-globalkeys-dev}} <br />
* {{Pkg|lxqt-panel-dev}}<br />
<br />
===== Misc =====<br />
<br />
* {{Pkg|lxqt-build-tools}}<br />
<br />
= See Also =<br />
* [[Installation]]<br />
* [[Post installation]]<br />
* [[Desktop environments and Window managers]]<br />
<br />
[[Category:Desktop]]</div>Guest09248https://wiki.alpinelinux.org/w/index.php?title=Comparison_with_other_distros&diff=21480Comparison with other distros2022-01-12T17:38:27Z<p>Guest09248: </p>
<hr />
<div>Even if Alpine is designed to run from RAM, it has some similarities in package management with other distributions. This page outlines those similarities and differences, to help new users use Alpine and understand the differences between Alpine and other distributions.<br />
<br />
{{Note|The page was originally copied from: [https://web.archive.org/web/20070911124125/http://gentoo-wiki.com/TIP_Converting_from_or_to_Debian http://gentoo-wiki.com/TIP_Converting_from_or_to_Debian]}}<br />
<br />
<br><br />
<br />
= Package management =<br />
Where Gentoo has portage and emerge; Debian has, among others, apt; Alpine uses apk-tools. This section compares how apk-tools is used, in comparison to apt and emerge.<br />
<br />
Note that Gentoo is source-based, just like ports in FreeBSD are, while Debian uses pre-compiled binaries. Alpine is compiled using Gentoo's portage, but Alpine itself uses its own apk-tools binary package which is more similar to FreeBSD's binary packages.<br />
<br />
== Updating package database ==<br />
Gentoo will update the build-from-source scripts and the updating of the database takes much more time than updating the database for Debian or Alpine.<br />
<br />
'''Alpine'''<br />
apk update<br />
<br />
'''Debian'''<br />
apt update<br />
<br />
'''Gentoo'''<br />
emaint sync -a<br />
<br />
<br />
<br />
== Showing available updates ==<br />
Show which packages have an update available:<br />
<br />
'''Alpine'''<br />
apk version -v<br />
or:<br />
apk version -v -l '<'<br />
<br />
'''Gentoo'''<br />
emerge --deep --update --pretend @world<br />
<br />
'''Debian'''<br />
apt upgrade --simulate<br />
<br />
== Updating a particular package ==<br />
'''Alpine'''<br />
apk add -u package1 package2<br />
or<br />
apk upgrade package1 package2<br />
'''Debian'''<br />
apt install package1 package2<br />
'''Gentoo'''<br />
emerge --update package1 package2<br />
<br />
== Installing packages ==<br />
'''Alpine'''<br />
apk add package1 package2<br />
<br />
For source compile, see the [[Aports tree]] and the [[abuild]] tool.<br />
<br />
'''Gentoo'''<br />
emerge package1 package2<br />
'''Debian'''<br />
apt-get install package1 package2<br />
Debian source compile:<br />
apt-get build-dep package1<br />
apt-get source package1<br />
(optional: customize the build by modifying the debian/rules makefile)<br />
(or set environmental variables like DEB_BUILD_OPTIONS)<br />
(note that this will make your bug reports invalid to the maintainer)<br />
dpkg-buildpackage -rfakeroot -uc -b<br />
dpkg -i generatedpackagename<br />
Simplified source compile:<br />
apt-get build-dep package1<br />
apt-get -b source package1<br />
(the packages are automatically generated using the -b switch above)<br />
<br />
'''Note:''' This process can be used to backport packages from testing and unstable by simply adding their respective source repositories to sources.list, which is similar to adding ~x86 to package.keywords in Gentoo. This is explored further in the "Architectures and repositories" section below.<br />
<br />
== Reinstalling particular packages ==<br />
'''Alpine'''<br />
apk del package1 package2 && apk add package1 package2<br />
or:<br />
apk fix package1 package2<br />
'''Gentoo'''<br />
emerge --oneshot package1 package2<br />
'''Debian'''<br />
apt-get install --reinstall package1 package2<br />
<br />
Note: You ''rarely'' need to reinstall a package on Debian<br />
<br />
== Searching the package database ==<br />
'''Alpine'''<br />
<br />
Alpine will only search package names.<br />
apk search searchword<br />
<br />
'''Gentoo'''<br />
<br />
To search the package names and descriptions:<br />
emerge --searchdesc searchword<br />
'''Note:''' On Gentoo, it's actually much better to install and use either the esearch package or the eix package to do a search. You use them like this:<br />
eix searchword<br />
<br />
or<br />
<br />
esearch searchword<br />
<br />
'''Debian'''<br />
<br />
apt-cache search searchword<br />
Both emerge and apt-cache search support regular expressions.<br />
<br />
To get the long package information on Debian (searching only in package names):<br />
apt-cache search --full --names-only searchword<br />
<br />
== Removing packages ==<br />
'''Alpine'''<br />
<br />
apk del package1 package2<br />
apk del will remove configuration files when the --purge flag is used. Make sure you have backups of your configuration files. (Using rcs might be an idea)<br />
<br />
You will mostly like to take a quick look at the dependencies before you remove packages recursively.<br />
<br />
To see dependencies for a package, use:<br />
apk info -R package1 package2<br />
<br />
To see if package is required by other packages (is a dependency for another packages), use:<br />
apk info -r package1 package2<br />
<br />
<br />
'''Gentoo'''<br />
emerge --unmerge package1 package2 (Note: this is unsafe as it does not check dependencies)<br />
emerge --depclean package1 package2 (This will check dependencies)<br />
<br />
'''Debian'''<br />
apt-get remove package1 package2<br />
or to remove along with all configuration files<br />
apt-get remove --purge package1 package2<br />
<br />
== Only downloading packages ==<br />
This can be useful e.g. if you're on a dial-up connection and want to download everything first and install later.<br />
<br />
'''Alpine'''<br />
apk fetch package1 package2<br />
'''Gentoo'''<br />
emerge --fetchonly package1 package2<br />
'''Debian'''<br />
apt-get install --download-only package1 package2<br />
<br />
== Cleaning up downloaded packages ==<br />
Compressed packages that were downloaded for installation can easily consume gigabytes of storage space.<br />
<br />
'''Alpine'''<br />
<br />
Alpine will clean up packages automatically.<br />
<br />
'''Gentoo'''<br />
rm -rf /var/cache/distfiles/*<br />
To only remove outdated packages you will need to install the gentoolkit package and use eclean:<br />
eclean distfiles<br />
Cleaning temporary files from emerging packages:<br />
rm -rf /var/tmp/portage/*<br />
<br />
'''Debian'''<br />
apt-get clean<br />
Only remove outdated packages:<br />
apt-get autoclean<br />
<br />
==Reverse dependencies==<br />
<br />
'''Alpine'''<br />
<br />
apk-tools will take care of reverse dependencies.<br />
<br />
'''Gentoo'''<br />
<br />
Reverse dependencies are a major drawback of Gentoo's current portage implementation: It does not take care of them at all at the moment.<br />
If you use the unsafe --unmerge argument, this means that you can uninstall packages needed by others without being warned about it. E.g. you can remove the X server package without portage warning you that KDE (which you have installed as well) depends on it. This way you can actually break your entire system (e.g. by removing glibc).<br />
<br />
revdep-rebuild<br />
can fix broken dependencies broken by<br />
emerge --depclean<br />
<br />
Recent versions of portage include library tracking and preservation with the preserved-libs feature. Portage will notify you to run {{Cmd| emerge @preserved-rebuild}} to help rebuild binaries that might otherwise become broken.<br />
<br />
'''Debian'''<br />
<br />
Reverse dependencies are taken care of by dpkg.<br />
<br />
= Runlevel & Initscripts =<br />
Runlevels work pretty conventionally on Debian (see details: [http://archive.fo/ZdZIz systemd]{{dead link}}). On Alpine and Gentoo, they are a bit different.<br />
<br />
== Directories and files ==<br />
In '''Debian''', runlevels are named conventionally (0-6 and S). They are represented by directories in /etc/ called rc*.d (when the default sysv-rc boot loader package is installed; file-rc can be installed instead, and then the relevant file is runlevel.conf).<br />
<br />
* /etc/rc0.d<br />
* /etc/rc1.d<br />
* /etc/rcS.d<br />
* /etc/rc2.d<br />
* /etc/rc3.d<br />
* /etc/rc4.d<br />
* /etc/rc5.d<br />
* /etc/rc6.d<br />
<br />
In '''Gentoo''', runlevels have the same names, but these are mapped to more self explanatory ones (in /etc/inittab): "boot", "default", "nonetwork", with the option to add more. The directories that represent them are in <br />
/etc/runlevels/:<br />
* /etc/runlevels/boot<br />
* /etc/runlevels/default<br />
* /etc/runlevels/nonetwork<br />
<br />
In '''Gentoo''', if a service is not explicitly started in a runlevel, it is stopped when switching to that runlevel! There is no explicit stopping of runlevels as in Debian (/etc/rc?.d/K??service).<br />
<br />
In '''both Debian and Gentoo''', which things are started (and stopped) in which runlevels is controlled by links in the runlevel directories to scripts in /etc/init.d/, e.g.:<br />
'''Gentoo'''<br />
$ ls -l /etc/runlevels/boot/hostname<br />
lrwxrwxrwx 1 root root 20 Mar 25 2004 /etc/runlevels/boot/hostname -> /etc/init.d/hostname<br />
<br />
'''Debian'''<br />
$ ls -l rcS.d/S40hostname.sh<br />
lrwxrwxrwx 1 root root 21 2004-11-07 00:19 rcS.d/S40hostname.sh -> ../init.d/hostname.sh<br />
<br />
'''Alpine'''<br />
<br />
In Alpine, runlevels work like they do in Gentoo:<br />
<br />
* /etc/runlevels/boot<br />
* /etc/runlevels/default<br />
* /etc/runlevels/sysinit<br />
* /etc/runlevels/nonetwork<br />
* /etc/runlevels/shutdown<br />
<br />
== Runlevel management ==<br />
To manage which things to start in which runlevels, use the following commands:<br />
<br />
'''Alpine'''<br />
<br />
To see current status of services in runlevels, do:<br />
rc-status<br />
To add sshd to default runlevel, do:<br />
rc-update add -k sshd default<br />
The -k option will make sure sshd is stopped when shutting down or reboot.<br />
To remove sshd from all runlevels do:<br />
rc-update del sshd<br />
<br />
'''Gentoo'''<br />
<br />
rc-update<br />
To add the cupsd to the default runlevel, do:<br />
rc-update add cupsd default<br />
To remove alsasound from the boot runlevel, do:<br />
rc-update del alsasound boot<br />
Also see this wiki page about [http://gentoo-wiki.com/Rc-update gentoo runlevel management with rc-update]<br />
<br />
'''Debian'''<br />
<br />
update-rc.d<br />
Configure cupsd to be started in runlevels 2, 3, 4, 5, and stopped in 0, 1, 6, with sequence code 20:<br />
update-rc.d cupsd start 20 2 3 4 5 . stop 20 0 1 6 . <br />
or simply:<br />
update-rc.d cupsd defaults <br />
Remove cupsd from all runlevels:<br />
update-rc.d -f cupsd remove<br />
<br />
= Config Files =<br />
<br />
== /etc/portage/make.conf and use flags ==<br />
While in Gentoo there's a large number of configuration files which control the behaviour of the package management system, there are comparatively fewer in Debian, as there is no need to dictate how to compile software which is downloaded and tweak/alter it. In Gentoo, the file /etc/portage/make.conf is used for much configuration; this includes ''USE'' flags, which influence which elements of packages are compiled, and which libraries to build support for - common USE flags (USE or -USE to specifically negate support) include 'gtk gnome' for Gnome users (and a corresponding -qt -kde -arts) and 'qt kde arts' for KDE users. A Gentoo user's complete set of use flags may look something like this:<br />
<br />
'''USE="-kde -arts -qt xv truetype bluetooth crypt slang readline gpm berkdb mmx gdbm tcpd pam libwww ssl nls ethereal perl python esd gif imlib sdl oggvorbis mpeg gnome gtk X motif opengl avi png tiff nptl pcmcia nptl ldap eds"'''<br />
<br />
== Architectures and repositories ==<br />
'''Gentoo'''<br />
<br />
Also in /etc/portage/make.conf is the '''ACCEPT_KEYWORDS''' setting, with (for an X86-based processor) two settings, '''x86''' for stabler packages, and '''~x86''' for bleeding edge packages. It is however not recommended to make this change in /etc/portage/make.conf. Rather configure this per-package in /etc/portage/package.accept_keywords. It's enough to put a line into that file naming the package (for example 'app-foo/bar'). That file might look like this:<br />
<br />
app-crypt/gpg-agent<br />
app-text/docbook-xsl-stylesheets<br />
=app-text/docbook-xml-dtd-4.3-r1<br />
<br />
The last line says, that ''only'' version 4.3-r1 should be unmasked. Older and newer versions will still be ignored.<br />
<br />
'''Note for non-x86 users:'''<br />
The keywords '''x86''' and '''~x86''' can of course be replaced by '''sparc''' and '''~sparc''' for example.<br />
<br />
'''Debian'''<br />
<br />
Setting this in Debian is slightly more complicated, and is accomplished by setting different 'repositories' in ''/etc/apt/sources.list'' - along with which 'tree' to use for packages; in Debian, these are '''stable''', '''testing''', and '''unstable'''. An ''/etc/apt/sources.list'' file for a debian testing user may look something like this:<br />
<br />
deb http://mirrors.kernel.org/debian testing main non-free contrib<br />
deb ftp://ftp.nerim.net/debian-marillat testing main<br />
deb http://security.debian.org testing/updates main contrib non-free<br />
<br />
Alternatively, ''/etc/apt/sources.list'' can contain any number of repositories for any trees, and a default tree (this can be overridden using the -t switch on the command line) in ''/etc/apt/apt.conf'':<br />
<br />
APT::Default-Release "testing";<br />
<br />
Per-package settings go in ''/etc/apt/preferences'', somewhat like Gentoo's ''/etc/portage/package.keywords''.<br />
<br />
== Network ==<br />
<br />
'''Alpine'''<br />
<br />
Alpine uses /etc/network/interfaces, just like Debian. The main reason is because this is the way busybox does it.<br />
<br />
''/etc/network/interfaces'':<br />
auto eth0<br />
iface eth0 inet static<br />
address 192.168.0.1<br />
netmask 255.255.255.0<br />
broadcast 192.168.0.255<br />
<br />
auto eth0:0<br />
iface eth0:0 inet static<br />
address 192.168.1.1<br />
netmask 255.255.255.0<br />
broadcast 192.168.1.255<br />
# etc.<br />
<br />
'''Gentoo'''<br />
<br />
''/etc/conf.d/net'':<br />
config_eth0="192.168.1.100 netmask 255.255.255.0<br />
192.168.2.100 netmask 255.255.255.0"<br />
routes_eth0="default via 192.168.1.1"<br />
<br />
Note that this has changed recently. For more information please refer to http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=4<br />
<br />
'''Debian'''<br />
<br />
''/etc/network/interfaces'':<br />
auto eth0<br />
iface eth0 inet static<br />
address 192.168.0.1<br />
netmask 255.255.255.0<br />
broadcast 192.168.0.255<br />
<br />
auto eth0:0<br />
iface eth0:0 inet static<br />
address 192.168.1.1<br />
netmask 255.255.255.0<br />
broadcast 192.168.1.255<br />
# etc.<br />
<br />
= Comparison chart/Rosetta Stone =<br />
<br />
This chart shows how some standard things are done in Alpine compared to other distributions.<br />
<br />
{| cellpadding="5" border="1" class="wikitable"<br />
|-<br />
! Action <br />
! Alpine ([https://wiki.alpinelinux.org/wiki/Alpine_Linux_package_management apk])<br />
! Arch Linux ([https://wiki.archlinux.org/index.php/Pacman pacman])<br />
! Gentoo ([https://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&chap=1 emerge])<br />
! Debian/Ubuntu ([https://wiki.debian.org/AptCLI apt])<br />
! Fedora/RHEL/SL/CentOS ([http://yum.baseurl.org/wiki/YumCommands yum])<br />
! VoidLinux ([https://docs.voidlinux.org/xbps/index.html?highlight=xb#xbps-package-manager XBPS])<br />
|-<br />
| Update package database<br />
| {{Cmd| apk update}}<br />
| {{Cmd| pacman -Sy}}<br />
| {{Cmd| emerge --sync}}<br />
| {{Cmd| apt update}}<br />
| {{Cmd| yum update}}<br />
| {{Cmd| xbps-install -S}}<br />
|-<br />
| Showing available updates<br />
| {{Cmd| apk version -l '<'}}<br />
| {{Cmd| pacman -Qu}}<br />
| {{Cmd| emerge --deep --update --pretend @world}}<br />
| {{Cmd| apt upgrade --simulate}}<br />
| {{Cmd| yum list updates}}<br />
| {{Cmd| xbps-install -n -u}}<br />
|-<br />
| Installing packages<br />
| {{Cmd| apk add [package name]}}<br />
| {{Cmd| pacman -S [package name]}}<br />
| {{Cmd| emerge [package name]}}<br />
| {{Cmd| apt install [package name]}}<br />
| {{Cmd| yum install [package name]}}<br />
| {{Cmd| xbps-install [package name]}}<br />
|-<br />
| Update all installed packages<br />
| {{Cmd| apk upgrade -U -a}}<br />
| {{Cmd| pacman -Su}}<br />
| {{Cmd| emerge --update --deep @world}}<br />
| {{Cmd| apt upgrade}}<br />
| {{Cmd| yum update}}<br />
| {{Cmd| xbps-install -u}}<br />
|- <br />
| Searching package database<br />
| {{Cmd| apk search -v '[string]*'}}<br />
| {{Cmd| pacman -Ss [string]}}<br />
| {{Cmd| emerge --search [string]}}<br />
| {{Cmd| apt search [string]}}<br />
| {{Cmd| yum search [string]}}<br />
| {{Cmd| xbps-query -Rs [string]}}<br />
|-<br />
| Removing packages<br />
| {{Cmd| apk del [package name]}}<br />
| {{Cmd| pacman -R [package name]}}<br />
| {{Cmd| emerge --depclean [package name]}}<br />
| {{Cmd| apt remove [package name]}}<br />
| {{Cmd| yum remove [package name]}}<br />
| {{Cmd| xbps-remove [package name]}}<br />
|}<br />
<br />
[[Category:Package Manager]]</div>Guest09248https://wiki.alpinelinux.org/w/index.php?title=Comparison_with_other_distros&diff=21463Comparison with other distros2022-01-06T19:39:02Z<p>Guest09248: /* Comparison chart/Rosetta Stone */ added VoidLinux (XBPS)</p>
<hr />
<div>Even if Alpine is designed to run from RAM, it has some similarities in package management with both Gentoo and Debian. This page outlines those similarities and differences, to help Debian and Gentoo users use Alpine.<br />
<br />
The page was originally copied from: [https://web.archive.org/web/20070911124125/http://gentoo-wiki.com/TIP_Converting_from_or_to_Debian http://gentoo-wiki.com/TIP_Converting_from_or_to_Debian]<br />
<br />
= Package management =<br />
Where Gentoo has portage and emerge; Debian has, among others, apt; Alpine uses apk-tools. This section compares how apk-tools is used, in comparison to apt and emerge.<br />
<br />
Note that Gentoo is source-based, just like ports in FreeBSD are, while Debian uses pre-compiled binaries. Alpine is compiled using Gentoo's portage, but Alpine itself uses its own apk-tools binary package which is more similar to FreeBSD's binary packages.<br />
<br />
== Updating package database ==<br />
Gentoo will update the build-from-source scripts and the updating of the database takes much more time than updating the database for Debian or Alpine.<br />
<br />
'''Alpine'''<br />
apk update<br />
<br />
'''Gentoo'''<br />
emaint sync -a<br />
<br />
'''Debian'''<br />
apt update<br />
<br />
== Showing available updates ==<br />
Show which packages have an update available:<br />
<br />
'''Alpine'''<br />
apk version -v<br />
or:<br />
apk version -v -l '<'<br />
<br />
'''Gentoo'''<br />
emerge --deep --update --pretend @world<br />
<br />
'''Debian'''<br />
apt upgrade --simulate<br />
<br />
== Updating a particular package ==<br />
'''Alpine'''<br />
apk add -u package1 package2<br />
or<br />
apk upgrade package1 package2<br />
'''Debian'''<br />
apt install package1 package2<br />
'''Gentoo'''<br />
emerge --update package1 package2<br />
<br />
== Installing packages ==<br />
'''Alpine'''<br />
apk add package1 package2<br />
<br />
For source compile, see the [[Aports tree]] and the [[abuild]] tool.<br />
<br />
'''Gentoo'''<br />
emerge package1 package2<br />
'''Debian'''<br />
apt-get install package1 package2<br />
Debian source compile:<br />
apt-get build-dep package1<br />
apt-get source package1<br />
(optional: customize the build by modifying the debian/rules makefile)<br />
(or set environmental variables like DEB_BUILD_OPTIONS)<br />
(note that this will make your bug reports invalid to the maintainer)<br />
dpkg-buildpackage -rfakeroot -uc -b<br />
dpkg -i generatedpackagename<br />
Simplified source compile:<br />
apt-get build-dep package1<br />
apt-get -b source package1<br />
(the packages are automatically generated using the -b switch above)<br />
<br />
'''Note:''' This process can be used to backport packages from testing and unstable by simply adding their respective source repositories to sources.list, which is similar to adding ~x86 to package.keywords in Gentoo. This is explored further in the "Architectures and repositories" section below.<br />
<br />
== Reinstalling particular packages ==<br />
'''Alpine'''<br />
apk del package1 package2 && apk add package1 package2<br />
or:<br />
apk fix package1 package2<br />
'''Gentoo'''<br />
emerge --oneshot package1 package2<br />
'''Debian'''<br />
apt-get install --reinstall package1 package2<br />
<br />
Note: You ''rarely'' need to reinstall a package on Debian<br />
<br />
== Searching the package database ==<br />
'''Alpine'''<br />
<br />
Alpine will only search package names.<br />
apk search searchword<br />
<br />
'''Gentoo'''<br />
<br />
To search the package names and descriptions:<br />
emerge --searchdesc searchword<br />
'''Note:''' On Gentoo, it's actually much better to install and use either the esearch package or the eix package to do a search. You use them like this:<br />
eix searchword<br />
<br />
or<br />
<br />
esearch searchword<br />
<br />
'''Debian'''<br />
<br />
apt-cache search searchword<br />
Both emerge and apt-cache search support regular expressions.<br />
<br />
To get the long package information on Debian (searching only in package names):<br />
apt-cache search --full --names-only searchword<br />
<br />
== Removing packages ==<br />
'''Alpine'''<br />
<br />
apk del package1 package2<br />
apk del will remove configuration files when the --purge flag is used. Make sure you have backups of your configuration files. (Using rcs might be an idea)<br />
<br />
You will mostly like to take a quick look at the dependencies before you remove packages recursively.<br />
<br />
To see dependencies for a package, use:<br />
apk info -R package1 package2<br />
<br />
To see if package is required by other packages (is a dependency for another packages), use:<br />
apk info -r package1 package2<br />
<br />
<br />
'''Gentoo'''<br />
emerge --unmerge package1 package2 (Note: this is unsafe as it does not check dependencies)<br />
emerge --depclean package1 package2 (This will check dependencies)<br />
<br />
'''Debian'''<br />
apt-get remove package1 package2<br />
or to remove along with all configuration files<br />
apt-get remove --purge package1 package2<br />
<br />
== Only downloading packages ==<br />
This can be useful e.g. if you're on a dial-up connection and want to download everything first and install later.<br />
<br />
'''Alpine'''<br />
apk fetch package1 package2<br />
'''Gentoo'''<br />
emerge --fetchonly package1 package2<br />
'''Debian'''<br />
apt-get install --download-only package1 package2<br />
<br />
== Cleaning up downloaded packages ==<br />
Compressed packages that were downloaded for installation can easily consume gigabytes of storage space.<br />
<br />
'''Alpine'''<br />
<br />
Alpine will clean up packages automatically.<br />
<br />
'''Gentoo'''<br />
rm -rf /var/cache/distfiles/*<br />
To only remove outdated packages you will need to install the gentoolkit package and use eclean:<br />
eclean distfiles<br />
Cleaning temporary files from emerging packages:<br />
rm -rf /var/tmp/portage/*<br />
<br />
'''Debian'''<br />
apt-get clean<br />
Only remove outdated packages:<br />
apt-get autoclean<br />
<br />
==Reverse dependencies==<br />
<br />
'''Alpine'''<br />
<br />
apk-tools will take care of reverse dependencies.<br />
<br />
'''Gentoo'''<br />
<br />
Reverse dependencies are a major drawback of Gentoo's current portage implementation: It does not take care of them at all at the moment.<br />
If you use the unsafe --unmerge argument, this means that you can uninstall packages needed by others without being warned about it. E.g. you can remove the X server package without portage warning you that KDE (which you have installed as well) depends on it. This way you can actually break your entire system (e.g. by removing glibc).<br />
<br />
revdep-rebuild<br />
can fix broken dependencies broken by<br />
emerge --depclean<br />
<br />
Recent versions of portage include library tracking and preservation with the preserved-libs feature. Portage will notify you to run {{Cmd| emerge @preserved-rebuild}} to help rebuild binaries that might otherwise become broken.<br />
<br />
'''Debian'''<br />
<br />
Reverse dependencies are taken care of by dpkg.<br />
<br />
= Runlevel & Initscripts =<br />
Runlevels work pretty conventionally on Debian (see details: [http://archive.fo/ZdZIz systemd]{{dead link}}). On Alpine and Gentoo, they are a bit different.<br />
<br />
== Directories and files ==<br />
In '''Debian''', runlevels are named conventionally (0-6 and S). They are represented by directories in /etc/ called rc*.d (when the default sysv-rc boot loader package is installed; file-rc can be installed instead, and then the relevant file is runlevel.conf).<br />
<br />
* /etc/rc0.d<br />
* /etc/rc1.d<br />
* /etc/rcS.d<br />
* /etc/rc2.d<br />
* /etc/rc3.d<br />
* /etc/rc4.d<br />
* /etc/rc5.d<br />
* /etc/rc6.d<br />
<br />
In '''Gentoo''', runlevels have the same names, but these are mapped to more self explanatory ones (in /etc/inittab): "boot", "default", "nonetwork", with the option to add more. The directories that represent them are in <br />
/etc/runlevels/:<br />
* /etc/runlevels/boot<br />
* /etc/runlevels/default<br />
* /etc/runlevels/nonetwork<br />
<br />
In '''Gentoo''', if a service is not explicitly started in a runlevel, it is stopped when switching to that runlevel! There is no explicit stopping of runlevels as in Debian (/etc/rc?.d/K??service).<br />
<br />
In '''both Debian and Gentoo''', which things are started (and stopped) in which runlevels is controlled by links in the runlevel directories to scripts in /etc/init.d/, e.g.:<br />
'''Gentoo'''<br />
$ ls -l /etc/runlevels/boot/hostname<br />
lrwxrwxrwx 1 root root 20 Mar 25 2004 /etc/runlevels/boot/hostname -> /etc/init.d/hostname<br />
<br />
'''Debian'''<br />
$ ls -l rcS.d/S40hostname.sh<br />
lrwxrwxrwx 1 root root 21 2004-11-07 00:19 rcS.d/S40hostname.sh -> ../init.d/hostname.sh<br />
<br />
'''Alpine'''<br />
<br />
In Alpine, runlevels work like they do in Gentoo:<br />
<br />
* /etc/runlevels/boot<br />
* /etc/runlevels/default<br />
* /etc/runlevels/sysinit<br />
* /etc/runlevels/nonetwork<br />
* /etc/runlevels/shutdown<br />
<br />
== Runlevel management ==<br />
To manage which things to start in which runlevels, use the following commands:<br />
<br />
'''Alpine'''<br />
<br />
To see current status of services in runlevels, do:<br />
rc-status<br />
To add sshd to default runlevel, do:<br />
rc-update add -k sshd default<br />
The -k option will make sure sshd is stopped when shutting down or reboot.<br />
To remove sshd from all runlevels do:<br />
rc-update del sshd<br />
<br />
'''Gentoo'''<br />
<br />
rc-update<br />
To add the cupsd to the default runlevel, do:<br />
rc-update add cupsd default<br />
To remove alsasound from the boot runlevel, do:<br />
rc-update del alsasound boot<br />
Also see this wiki page about [http://gentoo-wiki.com/Rc-update gentoo runlevel management with rc-update]<br />
<br />
'''Debian'''<br />
<br />
update-rc.d<br />
Configure cupsd to be started in runlevels 2, 3, 4, 5, and stopped in 0, 1, 6, with sequence code 20:<br />
update-rc.d cupsd start 20 2 3 4 5 . stop 20 0 1 6 . <br />
or simply:<br />
update-rc.d cupsd defaults <br />
Remove cupsd from all runlevels:<br />
update-rc.d -f cupsd remove<br />
<br />
= Config Files =<br />
<br />
== /etc/portage/make.conf and use flags ==<br />
While in Gentoo there's a large number of configuration files which control the behaviour of the package management system, there are comparatively fewer in Debian, as there is no need to dictate how to compile software which is downloaded and tweak/alter it. In Gentoo, the file /etc/portage/make.conf is used for much configuration; this includes ''USE'' flags, which influence which elements of packages are compiled, and which libraries to build support for - common USE flags (USE or -USE to specifically negate support) include 'gtk gnome' for Gnome users (and a corresponding -qt -kde -arts) and 'qt kde arts' for KDE users. A Gentoo user's complete set of use flags may look something like this:<br />
<br />
'''USE="-kde -arts -qt xv truetype bluetooth crypt slang readline gpm berkdb mmx gdbm tcpd pam libwww ssl nls ethereal perl python esd gif imlib sdl oggvorbis mpeg gnome gtk X motif opengl avi png tiff nptl pcmcia nptl ldap eds"'''<br />
<br />
== Architectures and repositories ==<br />
'''Gentoo'''<br />
<br />
Also in /etc/portage/make.conf is the '''ACCEPT_KEYWORDS''' setting, with (for an X86-based processor) two settings, '''x86''' for stabler packages, and '''~x86''' for bleeding edge packages. It is however not recommended to make this change in /etc/portage/make.conf. Rather configure this per-package in /etc/portage/package.accept_keywords. It's enough to put a line into that file naming the package (for example 'app-foo/bar'). That file might look like this:<br />
<br />
app-crypt/gpg-agent<br />
app-text/docbook-xsl-stylesheets<br />
=app-text/docbook-xml-dtd-4.3-r1<br />
<br />
The last line says, that ''only'' version 4.3-r1 should be unmasked. Older and newer versions will still be ignored.<br />
<br />
'''Note for non-x86 users:'''<br />
The keywords '''x86''' and '''~x86''' can of course be replaced by '''sparc''' and '''~sparc''' for example.<br />
<br />
'''Debian'''<br />
<br />
Setting this in Debian is slightly more complicated, and is accomplished by setting different 'repositories' in ''/etc/apt/sources.list'' - along with which 'tree' to use for packages; in Debian, these are '''stable''', '''testing''', and '''unstable'''. An ''/etc/apt/sources.list'' file for a debian testing user may look something like this:<br />
<br />
deb http://mirrors.kernel.org/debian testing main non-free contrib<br />
deb ftp://ftp.nerim.net/debian-marillat testing main<br />
deb http://security.debian.org testing/updates main contrib non-free<br />
<br />
Alternatively, ''/etc/apt/sources.list'' can contain any number of repositories for any trees, and a default tree (this can be overridden using the -t switch on the command line) in ''/etc/apt/apt.conf'':<br />
<br />
APT::Default-Release "testing";<br />
<br />
Per-package settings go in ''/etc/apt/preferences'', somewhat like Gentoo's ''/etc/portage/package.keywords''.<br />
<br />
== Network ==<br />
<br />
'''Alpine'''<br />
<br />
Alpine uses /etc/network/interfaces, just like Debian. The main reason is because this is the way busybox does it.<br />
<br />
''/etc/network/interfaces'':<br />
auto eth0<br />
iface eth0 inet static<br />
address 192.168.0.1<br />
netmask 255.255.255.0<br />
broadcast 192.168.0.255<br />
<br />
auto eth0:0<br />
iface eth0:0 inet static<br />
address 192.168.1.1<br />
netmask 255.255.255.0<br />
broadcast 192.168.1.255<br />
# etc.<br />
<br />
'''Gentoo'''<br />
<br />
''/etc/conf.d/net'':<br />
config_eth0="192.168.1.100 netmask 255.255.255.0<br />
192.168.2.100 netmask 255.255.255.0"<br />
routes_eth0="default via 192.168.1.1"<br />
<br />
Note that this has changed recently. For more information please refer to http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=4<br />
<br />
'''Debian'''<br />
<br />
''/etc/network/interfaces'':<br />
auto eth0<br />
iface eth0 inet static<br />
address 192.168.0.1<br />
netmask 255.255.255.0<br />
broadcast 192.168.0.255<br />
<br />
auto eth0:0<br />
iface eth0:0 inet static<br />
address 192.168.1.1<br />
netmask 255.255.255.0<br />
broadcast 192.168.1.255<br />
# etc.<br />
<br />
= Comparison chart/Rosetta Stone =<br />
<br />
This chart shows how some standard things are done in Alpine compared to other distributions.<br />
<br />
{| cellpadding="5" border="1" class="wikitable"<br />
|-<br />
! Action <br />
! Alpine ([https://wiki.alpinelinux.org/wiki/Alpine_Linux_package_management apk])<br />
! Arch Linux ([https://wiki.archlinux.org/index.php/Pacman pacman])<br />
! Gentoo ([https://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&chap=1 emerge])<br />
! Debian/Ubuntu ([https://wiki.debian.org/AptCLI apt])<br />
! Fedora/RHEL/SL/CentOS ([http://yum.baseurl.org/wiki/YumCommands yum])<br />
! VoidLinux ([https://docs.voidlinux.org/xbps/index.html?highlight=xb#xbps-package-manager XBPS])<br />
|-<br />
| Update package database<br />
| {{Cmd| apk update}}<br />
| {{Cmd| pacman -Sy}}<br />
| {{Cmd| emerge --sync}}<br />
| {{Cmd| apt update}}<br />
| {{Cmd| yum update}}<br />
| {{Cmd| xbps-install -S}}<br />
|-<br />
| Showing available updates<br />
| {{Cmd| apk version -l '<'}}<br />
| {{Cmd| pacman -Qu}}<br />
| {{Cmd| emerge --deep --update --pretend @world}}<br />
| {{Cmd| apt upgrade --simulate}}<br />
| {{Cmd| yum list updates}}<br />
| {{Cmd| xbps-install -n -u}}<br />
|-<br />
| Installing packages<br />
| {{Cmd| apk add [package name]}}<br />
| {{Cmd| pacman -S [package name]}}<br />
| {{Cmd| emerge [package name]}}<br />
| {{Cmd| apt install [package name]}}<br />
| {{Cmd| yum install [package name]}}<br />
| {{Cmd| xbps-install [package name]}}<br />
|-<br />
| Update all installed packages<br />
| {{Cmd| apk upgrade -U -a}}<br />
| {{Cmd| pacman -Su}}<br />
| {{Cmd| emerge --update --deep @world}}<br />
| {{Cmd| apt upgrade}}<br />
| {{Cmd| yum update}}<br />
| {{Cmd| xbps-install -u}}<br />
|- <br />
| Searching package database<br />
| {{Cmd| apk search -v '[string]*'}}<br />
| {{Cmd| pacman -Ss [string]}}<br />
| {{Cmd| emerge --search [string]}}<br />
| {{Cmd| apt search [string]}}<br />
| {{Cmd| yum search [string]}}<br />
| {{Cmd| xbps-query -Rs [string]}}<br />
|-<br />
| Removing packages<br />
| {{Cmd| apk del [package name]}}<br />
| {{Cmd| pacman -R [package name]}}<br />
| {{Cmd| emerge --depclean [package name]}}<br />
| {{Cmd| apt remove [package name]}}<br />
| {{Cmd| yum remove [package name]}}<br />
| {{Cmd| xbps-remove [package name]}}<br />
|}<br />
<br />
[[Category:Package Manager]]</div>Guest09248https://wiki.alpinelinux.org/w/index.php?title=Desktop_environments_and_Window_managers&diff=21452Desktop environments and Window managers2022-01-06T18:59:57Z<p>Guest09248: /* See Also */</p>
<hr />
<div>{{TOC right}}<br />
<br />
'''Alpine Linux''' has no official desktop. Older versions used Xfce, but now, all GUI and graphical interfaces are optional. many are available and is attempted to be listed below:<br />
<br />
== Desktop environments ==<br />
<br />
# [[Xfce]]<br />
# [[LXQt]]<br />
# [[KDE|KDE Plasma]]<br />
# [[Gnome]]<br />
# [[MATE]]<br />
<br />
== [https://en.wikipedia.org/wiki/Stacking_window_manager Stacking (floating) window managers] ==<br />
<br />
* [[Openbox]]<br />
<br />
== [https://en.wikipedia.org/wiki/Tiling_window_manager Tiling (dynamic) window managers] ==<br />
<br />
* [[Dwm]]<br />
<br />
* [[AwesomeWM|Awesome Window Manager]]<br />
<br />
== See Also ==<br />
* [[Installation]]<br />
* [[Alpine newbie]]<br />
* [[Post installation]]<br />
* [[Fonts]]<br />
<br />
[[Category:Desktop]]<br />
[[Category:Newbie]]</div>Guest09248https://wiki.alpinelinux.org/w/index.php?title=Desktop_environments_and_Window_managers&diff=21451Desktop environments and Window managers2022-01-06T18:59:21Z<p>Guest09248: </p>
<hr />
<div>{{TOC right}}<br />
<br />
'''Alpine Linux''' has no official desktop. Older versions used Xfce, but now, all GUI and graphical interfaces are optional. many are available and is attempted to be listed below:<br />
<br />
== Desktop environments ==<br />
<br />
# [[Xfce]]<br />
# [[LXQt]]<br />
# [[KDE|KDE Plasma]]<br />
# [[Gnome]]<br />
# [[MATE]]<br />
<br />
== [https://en.wikipedia.org/wiki/Stacking_window_manager Stacking (floating) window managers] ==<br />
<br />
* [[Openbox]]<br />
<br />
== [https://en.wikipedia.org/wiki/Tiling_window_manager Tiling (dynamic) window managers] ==<br />
<br />
* [[Dwm]]<br />
<br />
* [[AwesomeWM|Awesome Window Manager]]<br />
<br />
== See Also ==<br />
* [[Post installation]]<br />
* [[Fonts]]<br />
<br />
[[Category:Desktop]]<br />
[[Category:Newbie]]</div>Guest09248https://wiki.alpinelinux.org/w/index.php?title=Post_installation&diff=21449Post installation2022-01-06T18:55:37Z<p>Guest09248: </p>
<hr />
<div>{{Draft|Still might be missing some things but (i think) it is mostly complete}}<br />
<br />
== General Notes ==<br />
<br />
* When '''#''' is displayed before a command that means the command needs to be run with root privileges,<br />
<br />
* Anything in < > is likely just a placeholder that you need to replace (example: <editor> file.txt)<br />
<br />
* Some information in here might be a repeat of information in other wiki pages, if you find a section where that is the case please add a link to the original wiki page.<br />
<br />
<br><br />
<br />
== Network setup ==<br />
<br />
==== Wi-Fi ====<br />
<br />
* [[Wi-Fi]]<br />
* [[NetworkManager]]<br />
<br />
==== Ethernet (Wired) ====<br />
<br />
{{Expand|Documentation on Ethernet (Wired) internet setup needs to be created/expanded, maybe information from other wiki's/docs might be helpful?}}<br />
<br />
* [[Ethernet|Ethernet]]<br />
* [[NetworkManager]]<br />
<br />
<br><br />
<br />
== Creating a new user account ==<br />
<br />
After installing Alpine by default you only get a root account. You will probably want to create an account that is not root,<br />
<br />
{{cmd|# adduser <YourUsername>}}<br />
{{Note|replace <YourUsername> with the username of your choice}}<br />
<br />
<br><br />
<br />
You will probably want to install '''doas''' so you can allow <YourUsername> to use root privileges<br />
{{cmd|# apk add doas}}<br />
<br />
<br><br />
<br />
If you want your user to be able to use root privileges add them to the Wheel group<br />
{{cmd|# adduser <YourUsername> wheel}}<br />
<br />
<br><br />
<br />
Allow members of the '''Wheel''' group to use root privileges with doas:<br />
<br />
{{cmd|# <editor> /etc/doas.d/doas.conf}}<br />
<br />
add this to a new line:<br />
{{cmd|permit persist :wheel}}<br />
<br />
<br><br />
<br />
Switch to the new account type '''exit''' in the shell and login with the new user,<br />
<br />
<br><br />
<br />
==== Groups ====<br />
<br />
Groups are needed for certain operations on your system (e.g <code>audio</code> to manage your system audio), below is a list of groups,<br />
{{Note|may be incomplete, if you see a group missing please add it along with a description}}<br />
<br />
{{Cmd|disk:x:6:root,adm Only if need usage vith virtual machines and access to other partitions over new disks for<br />
lp:x:7:lp If will need to use printing services and printers management<br />
floppy:x:11:root Backguard compatible group, use only if need access to external special devices<br />
audio:x:18: Need for audio listening and management of sound volumes as normal user<br />
cdrom:x:19: For access to disck writers and mounting DVD, BR or CD rom disk as normal user<br />
dialout:x:20:root Need for dial private connections and use of modems as normal users<br />
tape:x:26:root Need have into this if plan to use special devices for backup.. rarelly in no servers<br />
video:x:27:root For usage of cameras, mor thant one GPU special features, as normal user<br />
netdev:x:28: For network connections management as normal user<br />
kvm:x:34:kvm Only if as normal user will manage graphically virtual machines.. rarelly on no servers<br />
games:x:35: Need if you want to play games also specially need if will share score between users<br />
cdrw:x:80: To write RW-DVD, RW-BR or RW-CD disk on a disk writing device<br />
apache:x:81: Need if you will perfom development as normal user and want to publish locally on web server<br />
usb:x:85: Need to access to special usb devices, deprecated group<br />
users:x:100:games If you plan to used common files for all users, mandatory as desktop usage}}<br />
<br />
<br><br />
<br />
To add your user to a group use the following command:<br />
<br />
{{Cmd|# adduser <YourUsername> <group>}}<br />
{{Note|you need to log out for the group change(s) to take effect}}<br />
<br />
<br><br />
<br />
== Shell ==<br />
<br />
{{Note|[https://en.wikipedia.org/wiki/Almquist_shell ash] is the only shell included with Alpine by default, you will need to install another shell if you want a different one}}<br />
<br />
<br><br />
<br />
By default AlpineLinux uses the [https://en.wikipedia.org/wiki/Almquist_shell ash] shell, but many users may prefer {{Pkg|bash}}, {{Pkg|zsh}}, {{Pkg|fish}} or another shell, to change this run the following command:<br />
<br />
{{Cmd|$ chsh}}<br />
enter your password and you should get the following output:<br />
<br />
{{Cat|$ chsh|Changing the login shell for user<br />
Enter the new value, or press ENTER for the default<br />
Login Shell [/bin/ash]:}}<br />
<br />
<br><br />
<br />
now enter the path for the shell you want to use (e.g <code>/bin/bash</code>) and press enter to confirm this change,<br />
{{Note|You may need to log out or reboot for this change to take effect, '''ash''' is a part of busybox so you can revert back to '''ash''' at anytime with the same steps}}<br />
<br />
<br><br />
<br />
== Repositories ==<br />
<br />
The Alpine software repositories have three branches:<br />
<br />
* '''Main''': Main packages are the Alpine software that has direct support and updates from the Alpine core and main team. They also have official special documentation, are always available for all releases and will have substitutions if some are not continued from upstream. Commonly, those packages are selected due to their responsibility and stability with respect to upstream availability. When those in ''testing'' perform well or are mature, they go to the ''main'' branch.<br />
* '''Community''': Community packages are those made by users in concert with the official developers and integrated into the Alpine packages. They are user supported. Support could end if the user ends support with respect to Alpine work. For example, could not include substitution in next release due to lack of support by the upstream author. They are in ''edge'' and when accepted, go to the ''community'' branch.<br />
* '''Edge''': New packages come into testing repositories of the edge Alpine version and are those made by any contributor or man power on Alpine. The edge contains unstable current development content. This branch has no release linked or related to Alpine. They are in ''testing'' and when accepted, go to the ''community'' branch.<br />
<br />
<br><br />
<br />
By default only the '''main''' repository is enabled, most users will probably want to enable the '''community''' repository, to enable a repository remove the '''#''' in front of the url along with any blank space.<br />
<br />
<br><br />
<br />
(Example) Disabled:<br />
{{cat|/etc/apk/repositories|#http://dl-cdn.alpinelinux.org/alpine/v3.15/community}}<br />
<br />
(Example) Enabled:<br />
{{cat|/etc/apk/repositories|http://dl-cdn.alpinelinux.org/alpine/v3.15/community}}<br />
<br />
<br />
<br><br />
<br />
To edit the repositories open the file in a text editor:<br />
{{cmd|# <editor> /etc/apk/repositories}}<br />
<br />
<br><br />
<br />
Example default configuration:<br />
<br />
{{cat|/etc/apk/repositories|#/media/cdrom/apks<br />
http://dl-cdn.alpinelinux.org/alpine/v3.15/main<br />
# http://dl-cdn.alpinelinux.org/alpine/v3.15/community<br />
#http://dl-cdn.alpinelinux.org/alpine/edge/main<br />
#http://dl-cdn.alpinelinux.org/alpine/edge/community<br />
#http://dl-cdn.alpinelinux.org/alpine/edge/testing}}<br />
<br />
{{Note|The edge repositories contain unstable and/or possibly untested packages use at your own risk!}}<br />
<br />
<br><br />
<br />
To avoid having to manually update the verison in '''/etc/apk/repositories''' for each Alpine Linux update, change '''v3.15''' to '''latest-stable'''<br />
<br />
Example:<br />
{{cat|/etc/apk/repositories|#/media/cdrom/apks<br />
http://dl-cdn.alpinelinux.org/alpine/latest-stable/main<br />
http://dl-cdn.alpinelinux.org/alpine/latest-stable/community<br />
#http://dl-cdn.alpinelinux.org/alpine/edge/main<br />
#http://dl-cdn.alpinelinux.org/alpine/edge/community<br />
#http://dl-cdn.alpinelinux.org/alpine/edge/testing}}<br />
<br />
{{Note|Changing the repositories to latest-stable may initiate unexpected release upgrades, do this at your own risk!}}<br />
<br />
<br><br />
<br />
For [https://en.wikipedia.org/wiki/HTTPS#Technical security reasons] it may be a good idea to change the url's from '''http''' to '''https'''<br />
<br />
Example:<br />
{{cat|/etc/apk/repositories|#/media/cdrom/apks<br />
https://dl-cdn.alpinelinux.org/alpine/v3.15/main<br />
https://dl-cdn.alpinelinux.org/alpine/v3.15/community<br />
#https://dl-cdn.alpinelinux.org/alpine/edge/main<br />
#https://dl-cdn.alpinelinux.org/alpine/edge/community<br />
#https://dl-cdn.alpinelinux.org/alpine/edge/testing}}<br />
<br />
{{Note|some Alpine Linux package mirrors may not support https, if that is the case you will need to revert back or change mirrors}}<br />
<br />
<br><br />
<br />
Once you have edited '''/etc/apk/repositories''' sync the repositories with:<br />
<br />
{{cmd|# apk update}}<br />
<br />
<br><br />
<br />
== Installing a Display Server (for graphical sessions) ==<br />
<br />
==== Xorg ====<br />
Most desktop enviroments (DE) or Windows Managers (WM) require Xorg (also called: X11, X), although in the future many will fully migrate to [[Wayland]] currently Xorg is still widely used, <br />
<br />
<br><br />
<br />
There is two ways you can get Xorg installed,<br />
<br />
<br><br />
<br />
By default Alpine Linux provides a script that will install Xorg, run the following command to install Xorg:<br />
{{cmd|# setup-xorg-base}}<br />
<br />
or<br />
<br />
{{cmd|# apk add xorg-server xorg-server-common xorg-server-dev xorgproto xorgxrdp xorgxrdp-dev}}<br />
{{Note| the apk add method is probably incomplete}}<br />
<br />
<br><br />
<br />
==== Wayland ====<br />
''See also: [[Wayland]]''<br />
<br />
{{Expand|Wayland documentation needs to be expanded}}<br />
<br />
<br><br />
<br />
== Fonts ==<br />
<br />
If you plan to use a graphical environment you may need/want to install fonts<br />
{{Note|depending on the desktop environment/window manager fonts may or may not be installed automatically or as dependencies}}<br />
<br />
'''See: [[Fonts|Fonts]]'''<br />
<br />
<br><br />
<br />
== Installing a desktop environment or window manager ==<br />
<br />
'''See: [[Desktop environments and Window managers]]'''<br />
<br />
<br><br />
<br />
== Sound ==<br />
<br />
By default Alpine doesnt come with any Sound managment out of the box, these are your options:<br />
<br />
* [[PipeWire]]<br />
* [[PulseAudio]]<br />
* [[ALSA]]<br />
<br />
{{Note|If your unsure {{Pkg|pipewire}} is the recommended option}}<br />
<br />
<br><br />
<br />
== Man pages ==<br />
<br />
Most Linux distributions have '''man''' pages, man pages allow you type <code>man <package></code> in a terminal and get some useful information about packages installed on your system quicky without a internet connection, by default Alpine does not include '''man''', you can add that with the following:<br />
<br />
* <code># apk add man-pages</code> Installs basic manual pages.<br />
* <code># apk add mandoc</code> Installs the man command to be able to open man pages.<br />
* <code># apk add mandoc-apropos</code> Installs the apropos command to search in man pages.<br />
* <code># apk add docs</code> Installs all the *-doc sub-packages of installed packages.<br />
<br />
{{Note|man pages may not be available for every package}}<br />
<br />
<br><br />
<br />
== Language support ==<br />
<br />
{{Expand}}<br />
<br />
* Fix unicode defaults: <code>sed -i 's/#unicode="NO"/#unicode="NO"\nunicode="YES"/' /etc/rc.conf</code><br />
* <code>apk add musl-locales</code> Installs a limited set of locales (languages) for musl (C library) generated console messages.<br />
* Listing defined locales is possible with <code>locale -a</code><br />
* <code>cp /etc/profile.d/locale.sh /etc/profile.d/locale.sh.sh</code> Copies the default locale settings. Then the custom override file can be edited <code>nano /etc/profile.d/locale.sh.sh</code>.<br />
* <code>apk add lang</code> Pulls in the translation packages of all installed packages.<br />
* <code>apk list hunspell*</code> To list available hunspell dictionary packages.<br />
* <code>apk list *-xy *-xy-*</code> To list translation packages for your specific (xy) language (for example, pt for Portuguese).<br />
<br />
<br><br />
<br />
== Miscellaneous ==<br />
<br />
Some other miscellaneous things that might be useful:<br />
<br />
==== basic tools ====<br />
<br />
Alpine is a minimalist Linux distribution. If you expected a behavior like other Linux distributions, the similarity to them will be minimal at best. Run: <br />
<br />
{{Cmd|# apk add sed attr dialog bash bash-completion grep util-linux pciutils usbutils binutils findutils readline lsof less nano curl}}<br />
<br />
{{Cmd|<nowiki>$ export PAGER=less</nowiki>}}<br />
<br />
<br><br />
<br />
== Troubleshooting ==<br />
<br />
==== I dont have permission to do anything in my user's home directory ====<br />
<br />
By default the permissions of your new user(s) home directory may be limited to the root account, run one of these commands to change that: <br />
<br />
{{cmd|# chmod 700 /home/<YourUsername>}}<br />
<br />
or<br />
<br />
{{cmd|# chmod 777 /home/<YourUsername>}}<br />
<br />
<br><br />
<br />
== See also ==<br />
* [[Installation]]<br />
* [[Alpine newbie]]<br />
* [[Comparison with other distros]]<br />
<br />
[[Category:Newbie]]<br />
[[Category:Installation]]</div>Guest09248https://wiki.alpinelinux.org/w/index.php?title=Post_installation&diff=21427Post installation2022-01-06T16:57:52Z<p>Guest09248: </p>
<hr />
<div>{{Draft|Still might be missing some things but (i think) it is mostly complete}}<br />
<br />
== General Notes ==<br />
<br />
* When '''#''' is displayed before a command that means the command needs to be run with root privileges,<br />
<br />
* Anything in < > is likely just a placeholder that you need to replace (example: <editor> file.txt)<br />
<br />
* Some information in here might be a repeat of information in other wiki pages, if you find a section where that is the case please add a link to the original wiki page.<br />
<br />
<br><br />
<br />
== Network setup ==<br />
<br />
==== Wi-Fi ====<br />
<br />
* [[Wi-Fi]]<br />
* [[NetworkManager]]<br />
<br />
==== Ethernet (Wired) ====<br />
<br />
{{Expand|Documentation on Ethernet (Wired) internet setup needs to be created/expanded, maybe information from other wiki's/docs might be helpful?}}<br />
<br />
* [[Ethernet|Ethernet]]<br />
* [[NetworkManager]]<br />
<br />
<br><br />
<br />
== Creating a new user account ==<br />
<br />
After installing Alpine by default you only get a root account. You will probably want to create an account that is not root,<br />
<br />
{{cmd|# adduser <YourUsername>}}<br />
{{Note|replace <YourUsername> with the username of your choice}}<br />
<br />
<br><br />
<br />
You will probably want to install '''doas''' so you can allow <YourUsername> to use root privileges<br />
{{cmd|# apk add doas}}<br />
<br />
<br><br />
<br />
If you want your user to be able to use root privileges add them to the Wheel group<br />
{{cmd|# adduser <YourUsername> wheel}}<br />
<br />
<br><br />
<br />
Allow members of the '''Wheel''' group to use root privileges with doas:<br />
<br />
{{cmd|# <editor> /etc/doas.d/doas.conf}}<br />
<br />
add this to a new line:<br />
{{cmd|permit persist :wheel}}<br />
<br />
<br><br />
<br />
Switch to the new account type '''exit''' in the shell and login with the new user,<br />
<br />
<br><br />
<br />
==== Groups ====<br />
<br />
Groups are needed for certain operations on your system (e.g <code>audio</code> to manage your system audio), below is a list of groups,<br />
{{Note|may be incomplete, if you see a group missing please add it along with a description}}<br />
<br />
{{Cmd|disk:x:6:root,adm Only if need usage vith virtual machines and access to other partitions over new disks for<br />
lp:x:7:lp If will need to use printing services and printers management<br />
floppy:x:11:root Backguard compatible group, use only if need access to external special devices<br />
audio:x:18: Need for audio listening and management of sound volumes as normal user<br />
cdrom:x:19: For access to disck writers and mounting DVD, BR or CD rom disk as normal user<br />
dialout:x:20:root Need for dial private connections and use of modems as normal users<br />
tape:x:26:root Need have into this if plan to use special devices for backup.. rarelly in no servers<br />
video:x:27:root For usage of cameras, mor thant one GPU special features, as normal user<br />
netdev:x:28: For network connections management as normal user<br />
kvm:x:34:kvm Only if as normal user will manage graphically virtual machines.. rarelly on no servers<br />
games:x:35: Need if you want to play games also specially need if will share score between users<br />
cdrw:x:80: To write RW-DVD, RW-BR or RW-CD disk on a disk writing device<br />
apache:x:81: Need if you will perfom development as normal user and want to publish locally on web server<br />
usb:x:85: Need to access to special usb devices, deprecated group<br />
users:x:100:games If you plan to used common files for all users, mandatory as desktop usage}}<br />
<br />
<br><br />
<br />
To add your user to a group use the following command:<br />
<br />
{{Cmd|# adduser <YourUsername> <group>}}<br />
{{Note|you need to log out for the group change(s) to take effect}}<br />
<br />
<br><br />
<br />
== Shell ==<br />
<br />
{{Note|[https://en.wikipedia.org/wiki/Almquist_shell ash] is the only shell included with Alpine by default, you will need to install another shell if you want a different one}}<br />
<br />
<br><br />
<br />
By default AlpineLinux uses the [https://en.wikipedia.org/wiki/Almquist_shell ash] shell, but many users may prefer {{Pkg|bash}}, {{Pkg|zsh}}, {{Pkg|fish}} or another shell, to change this run the following command:<br />
<br />
{{Cmd|$ chsh}}<br />
enter your password and you should get the following output:<br />
<br />
{{Cat|$ chsh|Changing the login shell for user<br />
Enter the new value, or press ENTER for the default<br />
Login Shell [/bin/ash]:}}<br />
<br />
<br><br />
<br />
now enter the path for the shell you want to use (e.g <code>/bin/bash</code>) and press enter to confirm this change,<br />
{{Note|You may need to log out or reboot for this change to take effect, '''ash''' is a part of busybox so you can revert back to '''ash''' at anytime with the same steps}}<br />
<br />
<br><br />
<br />
== Repositories ==<br />
<br />
The Alpine software repositories have three branches:<br />
<br />
* '''Main''': Main packages are the Alpine software that has direct support and updates from the Alpine core and main team. They also have official special documentation, are always available for all releases and will have substitutions if some are not continued from upstream. Commonly, those packages are selected due to their responsibility and stability with respect to upstream availability. When those in ''testing'' perform well or are mature, they go to the ''main'' branch.<br />
* '''Community''': Community packages are those made by users in concert with the official developers and integrated into the Alpine packages. They are user supported. Support could end if the user ends support with respect to Alpine work. For example, could not include substitution in next release due to lack of support by the upstream author. They are in ''edge'' and when accepted, go to the ''community'' branch.<br />
* '''Edge''': New packages come into testing repositories of the edge Alpine version and are those made by any contributor or man power on Alpine. The edge contains unstable current development content. This branch has no release linked or related to Alpine. They are in ''testing'' and when accepted, go to the ''community'' branch.<br />
<br />
<br><br />
<br />
By default only the '''main''' repository is enabled, most users will probably want to enable the '''community''' repository, to enable a repository remove the '''#''' in front of the url along with any blank space.<br />
<br />
<br><br />
<br />
(Example) Disabled:<br />
{{cat|/etc/apk/repositories|#http://dl-cdn.alpinelinux.org/alpine/v3.15/community}}<br />
<br />
(Example) Enabled:<br />
{{cat|/etc/apk/repositories|http://dl-cdn.alpinelinux.org/alpine/v3.15/community}}<br />
<br />
<br />
<br><br />
<br />
To edit the repositories open the file in a text editor:<br />
{{cmd|# <editor> /etc/apk/repositories}}<br />
<br />
<br><br />
<br />
Example default configuration:<br />
<br />
{{cat|/etc/apk/repositories|#/media/cdrom/apks<br />
http://dl-cdn.alpinelinux.org/alpine/v3.15/main<br />
# http://dl-cdn.alpinelinux.org/alpine/v3.15/community<br />
#http://dl-cdn.alpinelinux.org/alpine/edge/main<br />
#http://dl-cdn.alpinelinux.org/alpine/edge/community<br />
#http://dl-cdn.alpinelinux.org/alpine/edge/testing}}<br />
<br />
{{Note|The edge repositories contain unstable and/or possibly untested packages use at your own risk!}}<br />
<br />
<br><br />
<br />
To avoid having to manually update the verison in '''/etc/apk/repositories''' for each Alpine Linux update, change '''v3.15''' to '''latest-stable'''<br />
<br />
Example:<br />
{{cat|/etc/apk/repositories|#/media/cdrom/apks<br />
http://dl-cdn.alpinelinux.org/alpine/latest-stable/main<br />
http://dl-cdn.alpinelinux.org/alpine/latest-stable/community<br />
#http://dl-cdn.alpinelinux.org/alpine/edge/main<br />
#http://dl-cdn.alpinelinux.org/alpine/edge/community<br />
#http://dl-cdn.alpinelinux.org/alpine/edge/testing}}<br />
<br />
{{Note|Changing the repositories to latest-stable may initiate unexpected release upgrades, do this at your own risk!}}<br />
<br />
<br><br />
<br />
For [https://en.wikipedia.org/wiki/HTTPS#Technical security reasons] it may be a good idea to change the url's from '''http''' to '''https'''<br />
<br />
Example:<br />
{{cat|/etc/apk/repositories|#/media/cdrom/apks<br />
https://dl-cdn.alpinelinux.org/alpine/v3.15/main<br />
https://dl-cdn.alpinelinux.org/alpine/v3.15/community<br />
#https://dl-cdn.alpinelinux.org/alpine/edge/main<br />
#https://dl-cdn.alpinelinux.org/alpine/edge/community<br />
#https://dl-cdn.alpinelinux.org/alpine/edge/testing}}<br />
<br />
{{Note|some Alpine Linux package mirrors may not support https, if that is the case you will need to revert back or change mirrors}}<br />
<br />
<br><br />
<br />
Once you have edited '''/etc/apk/repositories''' sync the repositories with:<br />
<br />
{{cmd|# apk update}}<br />
<br />
<br><br />
<br />
== Installing a Display Server (for graphical sessions) ==<br />
<br />
==== Xorg ====<br />
Most desktop enviroments (DE) or Windows Managers (WM) require Xorg (also called: X11, X), although in the future many will fully migrate to [[Wayland]] currently Xorg is still widely used, <br />
<br />
<br><br />
<br />
There is two ways you can get Xorg installed,<br />
<br />
<br><br />
<br />
By default Alpine Linux provides a script that will install Xorg, run the following command to install Xorg:<br />
{{cmd|# setup-xorg-base}}<br />
<br />
or<br />
<br />
{{cmd|# apk add xorg-server xorg-server-common xorg-server-dev xorgproto xorgxrdp xorgxrdp-dev}}<br />
{{Note| the apk add method is probably incomplete}}<br />
<br />
<br><br />
<br />
==== Wayland ====<br />
''See also: [[Wayland]]''<br />
<br />
{{Expand|Wayland documentation needs to be expanded}}<br />
<br />
<br><br />
<br />
== Fonts ==<br />
<br />
If you plan to use a graphical environment you may need/want to install fonts<br />
{{Note|depending on the desktop environment/window manager fonts may or may not be installed automatically or as dependencies}}<br />
<br />
'''See: [[Fonts|Fonts]]'''<br />
<br />
<br><br />
<br />
== Installing a desktop environment or window manager ==<br />
<br />
'''See: [[Desktop environments and Window managers]]'''<br />
<br />
<br><br />
<br />
== Sound ==<br />
<br />
By default Alpine doesnt come with any Sound managment out of the box, these are your options:<br />
<br />
* [[PipeWire]]<br />
* [[PulseAudio]]<br />
* [[ALSA]]<br />
<br />
{{Note|If your unsure {{Pkg|pipewire}} is the recommended option}}<br />
<br />
<br><br />
<br />
== Man pages ==<br />
<br />
Most Linux distributions have '''man''' pages, man pages allow you type <code>man <package></code> in a terminal and get some useful information about packages installed on your system quicky without a internet connection, by default Alpine does not include '''man''', you can add that with the following:<br />
<br />
* <code># apk add man-pages</code> Installs basic manual pages.<br />
* <code># apk add mandoc</code> Installs the man command to be able to open man pages.<br />
* <code># apk add mandoc-apropos</code> Installs the apropos command to search in man pages.<br />
* <code># apk add docs</code> Installs all the *-doc sub-packages of installed packages.<br />
<br />
{{Note|man pages may not be available for every package}}<br />
<br />
<br><br />
<br />
== Language support ==<br />
<br />
{{Expand}}<br />
<br />
* Fix unicode defaults: <code>sed -i 's/#unicode="NO"/#unicode="NO"\nunicode="YES"/' /etc/rc.conf</code><br />
* <code>apk add musl-locales</code> Installs a limited set of locales (languages) for musl (C library) generated console messages.<br />
* Listing defined locales is possible with <code>locale -a</code><br />
* <code>cp /etc/profile.d/locale.sh /etc/profile.d/locale.sh.sh</code> Copies the default locale settings. Then the custom override file can be edited <code>nano /etc/profile.d/locale.sh.sh</code>.<br />
* <code>apk add lang</code> Pulls in the translation packages of all installed packages.<br />
* <code>apk list hunspell*</code> To list available hunspell dictionary packages.<br />
* <code>apk list *-xy *-xy-*</code> To list translation packages for your specific (xy) language (for example, pt for Portuguese).<br />
<br />
<br><br />
<br />
== Miscellaneous ==<br />
<br />
Some other miscellaneous things that might be useful:<br />
<br />
==== basic tools ====<br />
<br />
Alpine is a minimalist Linux distribution. If you expected a behavior like other Linux distributions, the similarity to them will be minimal at best. Run: <br />
<br />
{{Cmd|# apk add sed attr dialog bash bash-completion grep util-linux pciutils usbutils binutils findutils readline lsof less nano curl}}<br />
<br />
{{Cmd|<nowiki>$ export PAGER=less</nowiki>}}<br />
<br />
<br><br />
<br />
== Troubleshooting ==<br />
<br />
==== I dont have permission to do anything in my user's home directory ====<br />
<br />
By default the permissions of your new user(s) home directory may be limited to the root account, run one of these commands to change that: <br />
<br />
{{cmd|# chmod 700 /home/<YourUsername>}}<br />
<br />
or<br />
<br />
{{cmd|# chmod 777 /home/<YourUsername>}}<br />
<br />
<br><br />
<br />
== See also ==<br />
* [[Installation]]<br />
* [[Alpine newbie]]<br />
* [[Comparison with other distros]]<br />
<br />
[[Category:Newbie]]</div>Guest09248https://wiki.alpinelinux.org/w/index.php?title=Post_installation&diff=21423Post installation2022-01-06T16:50:24Z<p>Guest09248: Undo revision 21398 by Mckaygerhard (talk) i built this page FROM NOTHING to be newbie friendly STOP MESSING WITH IT</p>
<hr />
<div>{{Draft|This page "should" contain accurate and up to date information but is a work in progess}}<br />
<br />
== General Notes ==<br />
<br />
* When '''#''' is displayed before a command that means the command needs to be run with root privileges,<br />
<br />
* Anything in < > is likely just a placeholder that you need to replace (example: <editor> file.txt)<br />
<br />
* Some information in here might be a repeat of information in other wiki pages, if you find a section where that is the case please add a link to the original wiki page.<br />
<br />
<br><br />
<br />
== Network setup ==<br />
<br />
==== Wi-Fi ====<br />
<br />
* [[Wi-Fi]]<br />
* [[NetworkManager]]<br />
<br />
==== Ethernet (Wired) ====<br />
<br />
{{Expand|Documentation on Ethernet (Wired) internet setup needs to be created/expanded, maybe information from other wiki's/docs might be helpful?}}<br />
<br />
* [[Ethernet|Ethernet]]<br />
* [[NetworkManager]]<br />
<br />
<br><br />
<br />
== Creating a new user account ==<br />
<br />
After installing Alpine by default you only get a root account. You will probably want to create an account that is not root,<br />
<br />
{{cmd|# adduser <YourUsername>}}<br />
{{Note|replace <YourUsername> with the username of your choice}}<br />
<br />
<br><br />
<br />
You will probably want to install '''doas''' so you can allow <YourUsername> to use root privileges<br />
{{cmd|# apk add doas}}<br />
<br />
<br><br />
<br />
If you want your user to be able to use root privileges add them to the Wheel group<br />
{{cmd|# adduser <YourUsername> wheel}}<br />
<br />
<br><br />
<br />
Allow members of the '''Wheel''' group to use root privileges with doas:<br />
<br />
{{cmd|# <editor> /etc/doas.d/doas.conf}}<br />
<br />
add this to a new line:<br />
{{cmd|permit persist :wheel}}<br />
<br />
<br><br />
<br />
Switch to the new account type '''exit''' in the shell and login with the new user,<br />
<br />
<br><br />
<br />
==== Groups ====<br />
<br />
Groups are needed for certain operations on your system (e.g <code>audio</code> to manage your system audio), below is a list of groups,<br />
{{Note|may be incomplete, if you see a group missing please add it along with a description}}<br />
<br />
{{Cmd|disk:x:6:root,adm Only if need usage vith virtual machines and access to other partitions over new disks for<br />
lp:x:7:lp If will need to use printing services and printers management<br />
floppy:x:11:root Backguard compatible group, use only if need access to external special devices<br />
audio:x:18: Need for audio listening and management of sound volumes as normal user<br />
cdrom:x:19: For access to disck writers and mounting DVD, BR or CD rom disk as normal user<br />
dialout:x:20:root Need for dial private connections and use of modems as normal users<br />
tape:x:26:root Need have into this if plan to use special devices for backup.. rarelly in no servers<br />
video:x:27:root For usage of cameras, mor thant one GPU special features, as normal user<br />
netdev:x:28: For network connections management as normal user<br />
kvm:x:34:kvm Only if as normal user will manage graphically virtual machines.. rarelly on no servers<br />
games:x:35: Need if you want to play games also specially need if will share score between users<br />
cdrw:x:80: To write RW-DVD, RW-BR or RW-CD disk on a disk writing device<br />
apache:x:81: Need if you will perfom development as normal user and want to publish locally on web server<br />
usb:x:85: Need to access to special usb devices, deprecated group<br />
users:x:100:games If you plan to used common files for all users, mandatory as desktop usage}}<br />
<br />
<br><br />
<br />
To add your user to a group use the following command:<br />
<br />
{{Cmd|# adduser <YourUsername> <group>}}<br />
{{Note|you need to log out for the group change(s) to take effect}}<br />
<br />
<br><br />
<br />
== Shell ==<br />
<br />
{{Note|[https://en.wikipedia.org/wiki/Almquist_shell ash] is the only shell included with Alpine by default, you will need to install another shell if you want a different one}}<br />
<br />
<br><br />
<br />
By default AlpineLinux uses the [https://en.wikipedia.org/wiki/Almquist_shell ash] shell, but many users may prefer {{Pkg|bash}}, {{Pkg|zsh}}, {{Pkg|fish}} or another shell, to change this run the following command:<br />
<br />
{{Cmd|$ chsh}}<br />
enter your password and you should get the following output:<br />
<br />
{{Cat|$ chsh|Changing the login shell for user<br />
Enter the new value, or press ENTER for the default<br />
Login Shell [/bin/ash]:}}<br />
<br />
<br><br />
<br />
now enter the path for the shell you want to use (e.g <code>/bin/bash</code>) and press enter to confirm this change,<br />
{{Note|You may need to log out or reboot for this change to take effect, '''ash''' is a part of busybox so you can revert back to '''ash''' at anytime with the same steps}}<br />
<br />
<br><br />
<br />
== Repositories ==<br />
<br />
The Alpine software repositories have three branches:<br />
<br />
* '''Main''': Main packages are the Alpine software that has direct support and updates from the Alpine core and main team. They also have official special documentation, are always available for all releases and will have substitutions if some are not continued from upstream. Commonly, those packages are selected due to their responsibility and stability with respect to upstream availability. When those in ''testing'' perform well or are mature, they go to the ''main'' branch.<br />
* '''Community''': Community packages are those made by users in concert with the official developers and integrated into the Alpine packages. They are user supported. Support could end if the user ends support with respect to Alpine work. For example, could not include substitution in next release due to lack of support by the upstream author. They are in ''edge'' and when accepted, go to the ''community'' branch.<br />
* '''Edge''': New packages come into testing repositories of the edge Alpine version and are those made by any contributor or man power on Alpine. The edge contains unstable current development content. This branch has no release linked or related to Alpine. They are in ''testing'' and when accepted, go to the ''community'' branch.<br />
<br />
<br><br />
<br />
By default only the '''main''' repository is enabled, most users will probably want to enable the '''community''' repository, to enable a repository remove the '''#''' in front of the url along with any blank space.<br />
<br />
<br><br />
<br />
(Example) Disabled:<br />
{{cat|/etc/apk/repositories|#http://dl-cdn.alpinelinux.org/alpine/v3.15/community}}<br />
<br />
(Example) Enabled:<br />
{{cat|/etc/apk/repositories|http://dl-cdn.alpinelinux.org/alpine/v3.15/community}}<br />
<br />
<br />
<br><br />
<br />
To edit the repositories open the file in a text editor:<br />
{{cmd|# <editor> /etc/apk/repositories}}<br />
<br />
<br><br />
<br />
Example default configuration:<br />
<br />
{{cat|/etc/apk/repositories|#/media/cdrom/apks<br />
http://dl-cdn.alpinelinux.org/alpine/v3.15/main<br />
# http://dl-cdn.alpinelinux.org/alpine/v3.15/community<br />
#http://dl-cdn.alpinelinux.org/alpine/edge/main<br />
#http://dl-cdn.alpinelinux.org/alpine/edge/community<br />
#http://dl-cdn.alpinelinux.org/alpine/edge/testing}}<br />
<br />
{{Note|The edge repositories contain unstable and/or possibly untested packages use at your own risk!}}<br />
<br />
<br><br />
<br />
To avoid having to manually update the verison in '''/etc/apk/repositories''' for each Alpine Linux update, change '''v3.15''' to '''latest-stable'''<br />
<br />
Example:<br />
{{cat|/etc/apk/repositories|#/media/cdrom/apks<br />
http://dl-cdn.alpinelinux.org/alpine/latest-stable/main<br />
http://dl-cdn.alpinelinux.org/alpine/latest-stable/community<br />
#http://dl-cdn.alpinelinux.org/alpine/edge/main<br />
#http://dl-cdn.alpinelinux.org/alpine/edge/community<br />
#http://dl-cdn.alpinelinux.org/alpine/edge/testing}}<br />
<br />
{{Note|Changing the repositories to latest-stable may initiate unexpected release upgrades, do this at your own risk!}}<br />
<br />
<br><br />
<br />
For [https://en.wikipedia.org/wiki/HTTPS#Technical security reasons] it may be a good idea to change the url's from '''http''' to '''https'''<br />
<br />
Example:<br />
{{cat|/etc/apk/repositories|#/media/cdrom/apks<br />
https://dl-cdn.alpinelinux.org/alpine/v3.15/main<br />
https://dl-cdn.alpinelinux.org/alpine/v3.15/community<br />
#https://dl-cdn.alpinelinux.org/alpine/edge/main<br />
#https://dl-cdn.alpinelinux.org/alpine/edge/community<br />
#https://dl-cdn.alpinelinux.org/alpine/edge/testing}}<br />
<br />
{{Note|some Alpine Linux package mirrors may not support https, if that is the case you will need to revert back or change mirrors}}<br />
<br />
<br><br />
<br />
Once you have edited '''/etc/apk/repositories''' sync the repositories with:<br />
<br />
{{cmd|# apk update}}<br />
<br />
<br><br />
<br />
== Installing a Display Server (for graphical sessions) ==<br />
<br />
==== Xorg ====<br />
Most desktop enviroments (DE) or Windows Managers (WM) require Xorg (also called: X11, X), although in the future many will fully migrate to [[Wayland]] currently Xorg is still widely used, <br />
<br />
<br><br />
<br />
There is two ways you can get Xorg installed,<br />
<br />
<br><br />
<br />
By default Alpine Linux provides a script that will install Xorg, run the following command to install Xorg:<br />
{{cmd|# setup-xorg-base}}<br />
<br />
or<br />
<br />
{{cmd|# apk add xorg-server xorg-server-common xorg-server-dev xorgproto xorgxrdp xorgxrdp-dev}}<br />
{{Note| the apk add method is probably incomplete}}<br />
<br />
<br><br />
<br />
==== Wayland ====<br />
''See also: [[Wayland]]''<br />
<br />
{{Expand|Wayland documentation needs to be expanded}}<br />
<br />
<br><br />
<br />
== Fonts ==<br />
<br />
If you plan to use a graphical environment you may need/want to install fonts<br />
{{Note|depending on the desktop environment/window manager fonts may or may not be installed automatically or as dependencies}}<br />
<br />
'''See: [[Fonts|Fonts]]'''<br />
<br />
<br><br />
<br />
== Installing a desktop environment or window manager ==<br />
<br />
'''See: [[Desktop environments and Window managers]]'''<br />
<br />
<br><br />
<br />
== Sound ==<br />
<br />
By default Alpine doesnt come with any Sound managment out of the box, these are your options:<br />
<br />
* [[PipeWire]]<br />
* [[PulseAudio]]<br />
* [[ALSA]]<br />
<br />
{{Note|If your unsure {{Pkg|pipewire}} is the recommended option}}<br />
<br />
<br><br />
<br />
== Man pages ==<br />
<br />
Most Linux distributions have '''man''' pages, man pages allow you type <code>man <package></code> in a terminal and get some useful information about packages installed on your system quicky without a internet connection, by default Alpine does not include '''man''', you can add that with the following:<br />
<br />
* <code># apk add man-pages</code> Installs basic manual pages.<br />
* <code># apk add mandoc</code> Installs the man command to be able to open man pages.<br />
* <code># apk add mandoc-apropos</code> Installs the apropos command to search in man pages.<br />
* <code># apk add docs</code> Installs all the *-doc sub-packages of installed packages.<br />
<br />
{{Note|man pages may not be available for every package}}<br />
<br />
<br><br />
<br />
== Language support ==<br />
<br />
{{Expand}}<br />
<br />
* Fix unicode defaults: <code>sed -i 's/#unicode="NO"/#unicode="NO"\nunicode="YES"/' /etc/rc.conf</code><br />
* <code>apk add musl-locales</code> Installs a limited set of locales (languages) for musl (C library) generated console messages.<br />
* Listing defined locales is possible with <code>locale -a</code><br />
* <code>cp /etc/profile.d/locale.sh /etc/profile.d/locale.sh.sh</code> Copies the default locale settings. Then the custom override file can be edited <code>nano /etc/profile.d/locale.sh.sh</code>.<br />
* <code>apk add lang</code> Pulls in the translation packages of all installed packages.<br />
* <code>apk list hunspell*</code> To list available hunspell dictionary packages.<br />
* <code>apk list *-xy *-xy-*</code> To list translation packages for your specific (xy) language (for example, pt for Portuguese).<br />
<br />
<br><br />
<br />
== Miscellaneous ==<br />
<br />
Some other miscellaneous things that might be useful:<br />
<br />
==== basic tools ====<br />
<br />
Alpine is a minimalist Linux distribution. If you expected a behavior like other Linux distributions, the similarity to them will be minimal at best. Run: <br />
<br />
{{Cmd|# apk add sed attr dialog bash bash-completion grep util-linux pciutils usbutils binutils findutils readline lsof less nano curl}}<br />
<br />
{{Cmd|<nowiki>$ export PAGER=less</nowiki>}}<br />
<br />
<br><br />
<br />
== Troubleshooting ==<br />
<br />
==== I dont have permission to do anything in my user's home directory ====<br />
<br />
By default the permissions of your new user(s) home directory may be limited to the root account, run one of these commands to change that: <br />
<br />
{{cmd|# chmod 700 /home/<YourUsername>}}<br />
<br />
or<br />
<br />
{{cmd|# chmod 777 /home/<YourUsername>}}<br />
<br />
<br><br />
<br />
== See also ==<br />
* [[Installation]]<br />
* [[Alpine newbie]]<br />
* [[Comparison with other distros]]<br />
<br />
[[Category:Newbie]]</div>Guest09248https://wiki.alpinelinux.org/w/index.php?title=Desktop_environments_and_Window_managers&diff=21422Desktop environments and Window managers2022-01-06T16:49:22Z<p>Guest09248: Undo revision 21380 by Mckaygerhard (talk), THIS IS A NEWBIE PAGE LEAVE IT ALONE</p>
<hr />
<div>{{TOC right}}<br />
<br />
'''Alpine Linux''' has no official desktop. Older versions used Xfce, but now, all GUI and graphical interfaces are optional. many are available and is attempted to be listed below:<br />
<br />
== Desktop environments ==<br />
<br />
# [[Xfce]]<br />
# [[LXQt]]<br />
# [[KDE|KDE Plasma]]<br />
# [[Gnome]]<br />
# [[MATE]]<br />
<br />
== [https://en.wikipedia.org/wiki/Stacking_window_manager Stacking (floating) window managers] ==<br />
<br />
* [[Openbox]]<br />
<br />
== [https://en.wikipedia.org/wiki/Tiling_window_manager Tiling (dynamic) window managers] ==<br />
<br />
* [[Dwm]]<br />
<br />
* [[AwesomeWM|Awesome Window Manager]]<br />
<br />
== See Also ==<br />
<br />
* [[Fonts]]<br />
* [[Alpine newbie]]<br />
* [[Alpine newbie installation]]<br />
* [[Alpine newbie apk packages]]<br />
* [[Alpine newbie developer]]<br />
<br />
<br />
[[Category:Desktop]]</div>Guest09248https://wiki.alpinelinux.org/w/index.php?title=GNU_core_utilities&diff=21378GNU core utilities2022-01-05T21:16:38Z<p>Guest09248: </p>
<hr />
<div>''From [https://www.gnu.org/software/coreutils/ gnu.org]:''<br />
<br />
''The GNU Core Utilities (often called {{Pkg|coreutils}}) are the basic file, shell and text manipulation utilities of the GNU operating system. These are the core utilities which are expected to exist on every operating system.'' <br />
<br />
<br><br />
<br />
The {{Pkg|coreutils}} is used in most Linux distributions by default (which is why Linux is often refered to as GNU/linux or GNU+Linux), Alpine uses [https://www.busybox.net/ Busybox] in place of the '''coreutils''' for a more lightweight, minimalist and secure experience but the '''coreutils''' is still available on AlpineLinux if you wish to use it.<br />
<br />
<br><br />
<br />
{{Expand}}<br />
<br />
===== coreutils libc and utmps in alpine =====<br />
<br />
Some programs like wall(1) depend on a libc feature named "utmp", that cannot be implemented<br />
in libc securely. For this reason, musl (the libc that Alpine uses) does not implement utmp. Instead, it provides stubs that do nothing.<br />
<br />
That is why programs that use utmp - such as wall, who or w - output nothing but still exit successfully. This is expected, a feature, and cannot be fixed easily.<br />
<br />
<br><br />
<br />
Some have a nice solution. For example, a {{Pkg|utmps}} login monitor: <br />
<br />
{{Cmd|apk add coreutils utmps}}<br />
<br />
{{Note|Take into consideration that there's an alternative to {{Pkg|coreutils}} named {{Pkg|ubase}} (only available in edge) that provides better functionality than the built-in busybox, but less than what coreutils offers}}</div>Guest09248https://wiki.alpinelinux.org/w/index.php?title=Post_installation&diff=21377Post installation2022-01-05T21:10:46Z<p>Guest09248: /* Man pages */</p>
<hr />
<div>{{Draft|This page "should" contain accurate and up to date information but is a work in progess}}<br />
<br />
== General Notes ==<br />
<br />
* When '''#''' is displayed before a command that means the command needs to be run with root privileges,<br />
<br />
* Anything in < > is likely just a placeholder that you need to replace (example: <editor> file.txt)<br />
<br />
* Some information in here might be a repeat of information in other wiki pages, if you find a section where that is the case please add a link to the original wiki page.<br />
<br />
<br><br />
<br />
== Network setup ==<br />
<br />
==== Wi-Fi ====<br />
<br />
* [[Wi-Fi]]<br />
* [[NetworkManager]]<br />
<br />
==== Ethernet (Wired) ====<br />
<br />
{{Expand|Documentation on Ethernet (Wired) internet setup needs to be created/expanded, maybe information from other wiki's/docs might be helpful?}}<br />
<br />
* [[Ethernet|Ethernet]]<br />
* [[NetworkManager]]<br />
<br />
<br><br />
<br />
== Creating a new user account ==<br />
<br />
After installing Alpine by default you only get a root account. You will probably want to create an account that is not root,<br />
<br />
{{cmd|# adduser <YourUsername>}}<br />
{{Note|replace <YourUsername> with the username of your choice}}<br />
<br />
<br><br />
<br />
You will probably want to install '''doas''' so you can allow <YourUsername> to use root privileges<br />
{{cmd|# apk add doas}}<br />
<br />
<br><br />
<br />
If you want your user to be able to use root privileges add them to the Wheel group<br />
{{cmd|# adduser <YourUsername> wheel}}<br />
<br />
<br><br />
<br />
Allow members of the '''Wheel''' group to use root privileges with doas:<br />
<br />
{{cmd|# <editor> /etc/doas.d/doas.conf}}<br />
<br />
add this to a new line:<br />
{{cmd|permit persist :wheel}}<br />
<br />
<br><br />
<br />
Switch to the new account type '''exit''' in the shell and login with the new user,<br />
<br />
<br><br />
<br />
==== Groups ====<br />
<br />
Groups are needed for certain operations on your system (e.g <code>audio</code> to manage your system audio), below is a list of groups,<br />
{{Note|may be incomplete, if you see a group missing please add it along with a description}}<br />
<br />
{{Cmd|disk:x:6:root,adm Only if need usage vith virtual machines and access to other partitions over new disks for<br />
lp:x:7:lp If will need to use printing services and printers management<br />
floppy:x:11:root Backguard compatible group, use only if need access to external special devices<br />
audio:x:18: Need for audio listening and management of sound volumes as normal user<br />
cdrom:x:19: For access to disck writers and mounting DVD, BR or CD rom disk as normal user<br />
dialout:x:20:root Need for dial private connections and use of modems as normal users<br />
tape:x:26:root Need have into this if plan to use special devices for backup.. rarelly in no servers<br />
video:x:27:root For usage of cameras, mor thant one GPU special features, as normal user<br />
netdev:x:28: For network connections management as normal user<br />
kvm:x:34:kvm Only if as normal user will manage graphically virtual machines.. rarelly on no servers<br />
games:x:35: Need if you want to play games also specially need if will share score between users<br />
cdrw:x:80: To write RW-DVD, RW-BR or RW-CD disk on a disk writing device<br />
apache:x:81: Need if you will perfom development as normal user and want to publish locally on web server<br />
usb:x:85: Need to access to special usb devices, deprecated group<br />
users:x:100:games If you plan to used common files for all users, mandatory as desktop usage}}<br />
<br />
<br><br />
<br />
To add your user to a group use the following command:<br />
<br />
{{Cmd|# adduser <YourUsername> <group>}}<br />
{{Note|you need to log out for the group change(s) to take effect}}<br />
<br />
<br><br />
<br />
== Shell ==<br />
<br />
{{Note|[https://en.wikipedia.org/wiki/Almquist_shell ash] is the only shell included with Alpine by default, you will need to install another shell if you want a different one}}<br />
<br />
<br><br />
<br />
By default AlpineLinux uses the [https://en.wikipedia.org/wiki/Almquist_shell ash] shell, but many users may prefer {{Pkg|bash}}, {{Pkg|zsh}}, {{Pkg|fish}} or another shell, to change this run the following command:<br />
<br />
{{Cmd|$ chsh}}<br />
enter your password and you should get the following output:<br />
<br />
{{Cat|$ chsh|Changing the login shell for user<br />
Enter the new value, or press ENTER for the default<br />
Login Shell [/bin/ash]:}}<br />
<br />
<br><br />
<br />
now enter the path for the shell you want to use (e.g <code>/bin/bash</code>) and press enter to confirm this change,<br />
{{Note|You may need to log out or reboot for this change to take effect, '''ash''' is a part of busybox so you can revert back to '''ash''' at anytime with the same steps}}<br />
<br />
<br><br />
<br />
== Repositories ==<br />
<br />
The Alpine software repositories have three branches:<br />
<br />
* '''Main''': Main packages are the Alpine software that has direct support and updates from the Alpine core and main team. They also have official special documentation, are always available for all releases and will have substitutions if some are not continued from upstream. Commonly, those packages are selected due to their responsibility and stability with respect to upstream availability. When those in ''testing'' perform well or are mature, they go to the ''main'' branch.<br />
* '''Community''': Community packages are those made by users in concert with the official developers and integrated into the Alpine packages. They are user supported. Support could end if the user ends support with respect to Alpine work. For example, could not include substitution in next release due to lack of support by the upstream author. They are in ''edge'' and when accepted, go to the ''community'' branch.<br />
* '''Edge''': New packages come into testing repositories of the edge Alpine version and are those made by any contributor or man power on Alpine. The edge contains unstable current development content. This branch has no release linked or related to Alpine. They are in ''testing'' and when accepted, go to the ''community'' branch.<br />
<br />
<br><br />
<br />
By default only the '''main''' repository is enabled, most users will probably want to enable the '''community''' repository, to enable a repository remove the '''#''' in front of the url along with any blank space.<br />
<br />
<br><br />
<br />
(Example) Disabled:<br />
{{cat|/etc/apk/repositories|#http://dl-cdn.alpinelinux.org/alpine/v3.15/community}}<br />
<br />
(Example) Enabled:<br />
{{cat|/etc/apk/repositories|http://dl-cdn.alpinelinux.org/alpine/v3.15/community}}<br />
<br />
<br />
<br><br />
<br />
To edit the repositories open the file in a text editor:<br />
{{cmd|# <editor> /etc/apk/repositories}}<br />
<br />
<br><br />
<br />
Example default configuration:<br />
<br />
{{cat|/etc/apk/repositories|#/media/cdrom/apks<br />
http://dl-cdn.alpinelinux.org/alpine/v3.15/main<br />
# http://dl-cdn.alpinelinux.org/alpine/v3.15/community<br />
#http://dl-cdn.alpinelinux.org/alpine/edge/main<br />
#http://dl-cdn.alpinelinux.org/alpine/edge/community<br />
#http://dl-cdn.alpinelinux.org/alpine/edge/testing}}<br />
<br />
{{Note|The edge repositories contain unstable and/or possibly untested packages use at your own risk!}}<br />
<br />
<br><br />
<br />
To avoid having to manually update the verison in '''/etc/apk/repositories''' for each Alpine Linux update, change '''v3.15''' to '''latest-stable'''<br />
<br />
Example:<br />
{{cat|/etc/apk/repositories|#/media/cdrom/apks<br />
http://dl-cdn.alpinelinux.org/alpine/latest-stable/main<br />
http://dl-cdn.alpinelinux.org/alpine/latest-stable/community<br />
#http://dl-cdn.alpinelinux.org/alpine/edge/main<br />
#http://dl-cdn.alpinelinux.org/alpine/edge/community<br />
#http://dl-cdn.alpinelinux.org/alpine/edge/testing}}<br />
<br />
{{Note|Changing the repositories to latest-stable may initiate unexpected release upgrades, do this at your own risk!}}<br />
<br />
<br><br />
<br />
For [https://en.wikipedia.org/wiki/HTTPS#Technical security reasons] it may be a good idea to change the url's from '''http''' to '''https'''<br />
<br />
Example:<br />
{{cat|/etc/apk/repositories|#/media/cdrom/apks<br />
https://dl-cdn.alpinelinux.org/alpine/v3.15/main<br />
https://dl-cdn.alpinelinux.org/alpine/v3.15/community<br />
#https://dl-cdn.alpinelinux.org/alpine/edge/main<br />
#https://dl-cdn.alpinelinux.org/alpine/edge/community<br />
#https://dl-cdn.alpinelinux.org/alpine/edge/testing}}<br />
<br />
{{Note|some Alpine Linux package mirrors may not support https, if that is the case you will need to revert back or change mirrors}}<br />
<br />
<br><br />
<br />
Once you have edited '''/etc/apk/repositories''' sync the repositories with:<br />
<br />
{{cmd|# apk update}}<br />
<br />
<br><br />
<br />
== Installing a Display Server (for graphical sessions) ==<br />
<br />
==== Xorg ====<br />
Most desktop enviroments (DE) or Windows Managers (WM) require Xorg (also called: X11, X), although in the future many will fully migrate to [[Wayland]] currently Xorg is still widely used, <br />
<br />
<br><br />
<br />
There is two ways you can get Xorg installed,<br />
<br />
<br><br />
<br />
By default Alpine Linux provides a script that will install Xorg, run the following command to install Xorg:<br />
{{cmd|# setup-xorg-base}}<br />
<br />
or<br />
<br />
{{cmd|# apk add xorg-server xorg-server-common xorg-server-dev xorgproto xorgxrdp xorgxrdp-dev}}<br />
{{Note| the apk add method is probably incomplete}}<br />
<br />
<br><br />
<br />
==== Wayland ====<br />
''See also: [[Wayland]]''<br />
<br />
{{Expand|Wayland documentation needs to be expanded}}<br />
<br />
<br><br />
<br />
== Fonts ==<br />
<br />
If you plan to use a graphical environment you may need/want to install fonts<br />
{{Note|depending on the desktop environment/window manager fonts may or may not be installed automatically or as dependencies}}<br />
<br />
'''See: [[Fonts|Fonts]]'''<br />
<br />
<br><br />
<br />
== Installing a desktop environment or window manager ==<br />
<br />
'''See: [[Desktop environments and Window managers]]'''<br />
<br />
<br><br />
<br />
== Sound ==<br />
<br />
By default Alpine doesnt come with any Sound managment out of the box, these are your options:<br />
<br />
* [[PipeWire]]<br />
* [[PulseAudio]]<br />
* [[ALSA]]<br />
<br />
{{Note|If your unsure {{Pkg|pipewire}} is the recommended option}}<br />
<br />
<br><br />
<br />
== Man pages ==<br />
<br />
Most Linux distributions have '''man''' pages, man pages allow you type <code>man <package></code> in a terminal and get some useful information about packages installed on your system quicky without a internet connection, by default Alpine does not include '''man''', you can add that with the following:<br />
<br />
* <code># apk add man-pages</code> Installs basic manual pages.<br />
* <code># apk add mandoc</code> Installs the man command to be able to open man pages.<br />
* <code># apk add mandoc-apropos</code> Installs the apropos command to search in man pages.<br />
* <code># apk add docs</code> Installs all the *-doc sub-packages of installed packages.<br />
<br />
{{Note|man pages may not be available for every package}}<br />
<br />
<br><br />
<br />
== Language support ==<br />
<br />
{{Expand}}<br />
<br />
* Fix unicode defaults: <code>sed -i 's/#unicode="NO"/#unicode="NO"\nunicode="YES"/' /etc/rc.conf</code><br />
* <code>apk add musl-locales</code> Installs a limited set of locales (languages) for musl (C library) generated console messages.<br />
* Listing defined locales is possible with <code>locale -a</code><br />
* <code>cp /etc/profile.d/locale.sh /etc/profile.d/locale.sh.sh</code> Copies the default locale settings. Then the custom override file can be edited <code>nano /etc/profile.d/locale.sh.sh</code>.<br />
* <code>apk add lang</code> Pulls in the translation packages of all installed packages.<br />
* <code>apk list hunspell*</code> To list available hunspell dictionary packages.<br />
* <code>apk list *-xy *-xy-*</code> To list translation packages for your specific (xy) language (for example, pt for Portuguese).<br />
<br />
<br><br />
<br />
== Miscellaneous ==<br />
<br />
Some other miscellaneous things that might be useful:<br />
<br />
==== basic tools ====<br />
<br />
Alpine is a minimalist Linux distribution. If you expected a behavior like other Linux distributions, the similarity to them will be minimal at best. Run: <br />
<br />
{{Cmd|# apk add sed attr dialog bash bash-completion grep util-linux pciutils usbutils binutils findutils readline lsof less nano curl}}<br />
<br />
{{Cmd|<nowiki>$ export PAGER=less</nowiki>}}<br />
<br />
<br><br />
<br />
== Troubleshooting ==<br />
<br />
==== I dont have permission to do anything in my user's home directory ====<br />
<br />
By default the permissions of your new user(s) home directory may be limited to the root account, run one of these commands to change that: <br />
<br />
{{cmd|# chmod 700 /home/<YourUsername>}}<br />
<br />
or<br />
<br />
{{cmd|# chmod 777 /home/<YourUsername>}}<br />
<br />
<br><br />
<br />
== See also ==<br />
* [[Installation]]<br />
* [[Alpine newbie]]<br />
* [[Comparison with other distros]]<br />
<br />
[[Category:Newbie]]</div>Guest09248https://wiki.alpinelinux.org/w/index.php?title=Post_installation&diff=21376Post installation2022-01-05T21:06:22Z<p>Guest09248: /* Shell */</p>
<hr />
<div>{{Draft|This page "should" contain accurate and up to date information but is a work in progess}}<br />
<br />
== General Notes ==<br />
<br />
* When '''#''' is displayed before a command that means the command needs to be run with root privileges,<br />
<br />
* Anything in < > is likely just a placeholder that you need to replace (example: <editor> file.txt)<br />
<br />
* Some information in here might be a repeat of information in other wiki pages, if you find a section where that is the case please add a link to the original wiki page.<br />
<br />
<br><br />
<br />
== Network setup ==<br />
<br />
==== Wi-Fi ====<br />
<br />
* [[Wi-Fi]]<br />
* [[NetworkManager]]<br />
<br />
==== Ethernet (Wired) ====<br />
<br />
{{Expand|Documentation on Ethernet (Wired) internet setup needs to be created/expanded, maybe information from other wiki's/docs might be helpful?}}<br />
<br />
* [[Ethernet|Ethernet]]<br />
* [[NetworkManager]]<br />
<br />
<br><br />
<br />
== Creating a new user account ==<br />
<br />
After installing Alpine by default you only get a root account. You will probably want to create an account that is not root,<br />
<br />
{{cmd|# adduser <YourUsername>}}<br />
{{Note|replace <YourUsername> with the username of your choice}}<br />
<br />
<br><br />
<br />
You will probably want to install '''doas''' so you can allow <YourUsername> to use root privileges<br />
{{cmd|# apk add doas}}<br />
<br />
<br><br />
<br />
If you want your user to be able to use root privileges add them to the Wheel group<br />
{{cmd|# adduser <YourUsername> wheel}}<br />
<br />
<br><br />
<br />
Allow members of the '''Wheel''' group to use root privileges with doas:<br />
<br />
{{cmd|# <editor> /etc/doas.d/doas.conf}}<br />
<br />
add this to a new line:<br />
{{cmd|permit persist :wheel}}<br />
<br />
<br><br />
<br />
Switch to the new account type '''exit''' in the shell and login with the new user,<br />
<br />
<br><br />
<br />
==== Groups ====<br />
<br />
Groups are needed for certain operations on your system (e.g <code>audio</code> to manage your system audio), below is a list of groups,<br />
{{Note|may be incomplete, if you see a group missing please add it along with a description}}<br />
<br />
{{Cmd|disk:x:6:root,adm Only if need usage vith virtual machines and access to other partitions over new disks for<br />
lp:x:7:lp If will need to use printing services and printers management<br />
floppy:x:11:root Backguard compatible group, use only if need access to external special devices<br />
audio:x:18: Need for audio listening and management of sound volumes as normal user<br />
cdrom:x:19: For access to disck writers and mounting DVD, BR or CD rom disk as normal user<br />
dialout:x:20:root Need for dial private connections and use of modems as normal users<br />
tape:x:26:root Need have into this if plan to use special devices for backup.. rarelly in no servers<br />
video:x:27:root For usage of cameras, mor thant one GPU special features, as normal user<br />
netdev:x:28: For network connections management as normal user<br />
kvm:x:34:kvm Only if as normal user will manage graphically virtual machines.. rarelly on no servers<br />
games:x:35: Need if you want to play games also specially need if will share score between users<br />
cdrw:x:80: To write RW-DVD, RW-BR or RW-CD disk on a disk writing device<br />
apache:x:81: Need if you will perfom development as normal user and want to publish locally on web server<br />
usb:x:85: Need to access to special usb devices, deprecated group<br />
users:x:100:games If you plan to used common files for all users, mandatory as desktop usage}}<br />
<br />
<br><br />
<br />
To add your user to a group use the following command:<br />
<br />
{{Cmd|# adduser <YourUsername> <group>}}<br />
{{Note|you need to log out for the group change(s) to take effect}}<br />
<br />
<br><br />
<br />
== Shell ==<br />
<br />
{{Note|[https://en.wikipedia.org/wiki/Almquist_shell ash] is the only shell included with Alpine by default, you will need to install another shell if you want a different one}}<br />
<br />
<br><br />
<br />
By default AlpineLinux uses the [https://en.wikipedia.org/wiki/Almquist_shell ash] shell, but many users may prefer {{Pkg|bash}}, {{Pkg|zsh}}, {{Pkg|fish}} or another shell, to change this run the following command:<br />
<br />
{{Cmd|$ chsh}}<br />
enter your password and you should get the following output:<br />
<br />
{{Cat|$ chsh|Changing the login shell for user<br />
Enter the new value, or press ENTER for the default<br />
Login Shell [/bin/ash]:}}<br />
<br />
<br><br />
<br />
now enter the path for the shell you want to use (e.g <code>/bin/bash</code>) and press enter to confirm this change,<br />
{{Note|You may need to log out or reboot for this change to take effect, '''ash''' is a part of busybox so you can revert back to '''ash''' at anytime with the same steps}}<br />
<br />
<br><br />
<br />
== Repositories ==<br />
<br />
The Alpine software repositories have three branches:<br />
<br />
* '''Main''': Main packages are the Alpine software that has direct support and updates from the Alpine core and main team. They also have official special documentation, are always available for all releases and will have substitutions if some are not continued from upstream. Commonly, those packages are selected due to their responsibility and stability with respect to upstream availability. When those in ''testing'' perform well or are mature, they go to the ''main'' branch.<br />
* '''Community''': Community packages are those made by users in concert with the official developers and integrated into the Alpine packages. They are user supported. Support could end if the user ends support with respect to Alpine work. For example, could not include substitution in next release due to lack of support by the upstream author. They are in ''edge'' and when accepted, go to the ''community'' branch.<br />
* '''Edge''': New packages come into testing repositories of the edge Alpine version and are those made by any contributor or man power on Alpine. The edge contains unstable current development content. This branch has no release linked or related to Alpine. They are in ''testing'' and when accepted, go to the ''community'' branch.<br />
<br />
<br><br />
<br />
By default only the '''main''' repository is enabled, most users will probably want to enable the '''community''' repository, to enable a repository remove the '''#''' in front of the url along with any blank space.<br />
<br />
<br><br />
<br />
(Example) Disabled:<br />
{{cat|/etc/apk/repositories|#http://dl-cdn.alpinelinux.org/alpine/v3.15/community}}<br />
<br />
(Example) Enabled:<br />
{{cat|/etc/apk/repositories|http://dl-cdn.alpinelinux.org/alpine/v3.15/community}}<br />
<br />
<br />
<br><br />
<br />
To edit the repositories open the file in a text editor:<br />
{{cmd|# <editor> /etc/apk/repositories}}<br />
<br />
<br><br />
<br />
Example default configuration:<br />
<br />
{{cat|/etc/apk/repositories|#/media/cdrom/apks<br />
http://dl-cdn.alpinelinux.org/alpine/v3.15/main<br />
# http://dl-cdn.alpinelinux.org/alpine/v3.15/community<br />
#http://dl-cdn.alpinelinux.org/alpine/edge/main<br />
#http://dl-cdn.alpinelinux.org/alpine/edge/community<br />
#http://dl-cdn.alpinelinux.org/alpine/edge/testing}}<br />
<br />
{{Note|The edge repositories contain unstable and/or possibly untested packages use at your own risk!}}<br />
<br />
<br><br />
<br />
To avoid having to manually update the verison in '''/etc/apk/repositories''' for each Alpine Linux update, change '''v3.15''' to '''latest-stable'''<br />
<br />
Example:<br />
{{cat|/etc/apk/repositories|#/media/cdrom/apks<br />
http://dl-cdn.alpinelinux.org/alpine/latest-stable/main<br />
http://dl-cdn.alpinelinux.org/alpine/latest-stable/community<br />
#http://dl-cdn.alpinelinux.org/alpine/edge/main<br />
#http://dl-cdn.alpinelinux.org/alpine/edge/community<br />
#http://dl-cdn.alpinelinux.org/alpine/edge/testing}}<br />
<br />
{{Note|Changing the repositories to latest-stable may initiate unexpected release upgrades, do this at your own risk!}}<br />
<br />
<br><br />
<br />
For [https://en.wikipedia.org/wiki/HTTPS#Technical security reasons] it may be a good idea to change the url's from '''http''' to '''https'''<br />
<br />
Example:<br />
{{cat|/etc/apk/repositories|#/media/cdrom/apks<br />
https://dl-cdn.alpinelinux.org/alpine/v3.15/main<br />
https://dl-cdn.alpinelinux.org/alpine/v3.15/community<br />
#https://dl-cdn.alpinelinux.org/alpine/edge/main<br />
#https://dl-cdn.alpinelinux.org/alpine/edge/community<br />
#https://dl-cdn.alpinelinux.org/alpine/edge/testing}}<br />
<br />
{{Note|some Alpine Linux package mirrors may not support https, if that is the case you will need to revert back or change mirrors}}<br />
<br />
<br><br />
<br />
Once you have edited '''/etc/apk/repositories''' sync the repositories with:<br />
<br />
{{cmd|# apk update}}<br />
<br />
<br><br />
<br />
== Installing a Display Server (for graphical sessions) ==<br />
<br />
==== Xorg ====<br />
Most desktop enviroments (DE) or Windows Managers (WM) require Xorg (also called: X11, X), although in the future many will fully migrate to [[Wayland]] currently Xorg is still widely used, <br />
<br />
<br><br />
<br />
There is two ways you can get Xorg installed,<br />
<br />
<br><br />
<br />
By default Alpine Linux provides a script that will install Xorg, run the following command to install Xorg:<br />
{{cmd|# setup-xorg-base}}<br />
<br />
or<br />
<br />
{{cmd|# apk add xorg-server xorg-server-common xorg-server-dev xorgproto xorgxrdp xorgxrdp-dev}}<br />
{{Note| the apk add method is probably incomplete}}<br />
<br />
<br><br />
<br />
==== Wayland ====<br />
''See also: [[Wayland]]''<br />
<br />
{{Expand|Wayland documentation needs to be expanded}}<br />
<br />
<br><br />
<br />
== Fonts ==<br />
<br />
If you plan to use a graphical environment you may need/want to install fonts<br />
{{Note|depending on the desktop environment/window manager fonts may or may not be installed automatically or as dependencies}}<br />
<br />
'''See: [[Fonts|Fonts]]'''<br />
<br />
<br><br />
<br />
== Installing a desktop environment or window manager ==<br />
<br />
'''See: [[Desktop environments and Window managers]]'''<br />
<br />
<br><br />
<br />
== Sound ==<br />
<br />
By default Alpine doesnt come with any Sound managment out of the box, these are your options:<br />
<br />
* [[PipeWire]]<br />
* [[PulseAudio]]<br />
* [[ALSA]]<br />
<br />
{{Note|If your unsure {{Pkg|pipewire}} is the recommended option}}<br />
<br />
<br><br />
<br />
== Man pages ==<br />
<br />
Most Linux distributions have '''man''' pages, man pages allow you type <code>man <package></code> in a terminal and get some useful information about packages installed on your system quicky without a internet connection, by default Alpine does not include '''man''', you can add that with one of the following:<br />
<br />
* <code># apk add man-pages</code> Installs basic manual pages.<br />
* <code># apk add mandoc</code> Installs the man command to be able to open man pages.<br />
* <code># apk add mandoc-apropos</code> Installs the apropos command to search in man pages.<br />
* <code># apk add docs</code> Installs all the *-doc sub-packages of installed packages.<br />
<br />
{{Note|man pages may not be available for every package}}<br />
<br />
<br><br />
<br />
== Language support ==<br />
<br />
{{Expand}}<br />
<br />
* Fix unicode defaults: <code>sed -i 's/#unicode="NO"/#unicode="NO"\nunicode="YES"/' /etc/rc.conf</code><br />
* <code>apk add musl-locales</code> Installs a limited set of locales (languages) for musl (C library) generated console messages.<br />
* Listing defined locales is possible with <code>locale -a</code><br />
* <code>cp /etc/profile.d/locale.sh /etc/profile.d/locale.sh.sh</code> Copies the default locale settings. Then the custom override file can be edited <code>nano /etc/profile.d/locale.sh.sh</code>.<br />
* <code>apk add lang</code> Pulls in the translation packages of all installed packages.<br />
* <code>apk list hunspell*</code> To list available hunspell dictionary packages.<br />
* <code>apk list *-xy *-xy-*</code> To list translation packages for your specific (xy) language (for example, pt for Portuguese).<br />
<br />
<br><br />
<br />
== Miscellaneous ==<br />
<br />
Some other miscellaneous things that might be useful:<br />
<br />
==== basic tools ====<br />
<br />
Alpine is a minimalist Linux distribution. If you expected a behavior like other Linux distributions, the similarity to them will be minimal at best. Run: <br />
<br />
{{Cmd|# apk add sed attr dialog bash bash-completion grep util-linux pciutils usbutils binutils findutils readline lsof less nano curl}}<br />
<br />
{{Cmd|<nowiki>$ export PAGER=less</nowiki>}}<br />
<br />
<br><br />
<br />
== Troubleshooting ==<br />
<br />
==== I dont have permission to do anything in my user's home directory ====<br />
<br />
By default the permissions of your new user(s) home directory may be limited to the root account, run one of these commands to change that: <br />
<br />
{{cmd|# chmod 700 /home/<YourUsername>}}<br />
<br />
or<br />
<br />
{{cmd|# chmod 777 /home/<YourUsername>}}<br />
<br />
<br><br />
<br />
== See also ==<br />
* [[Installation]]<br />
* [[Alpine newbie]]<br />
* [[Comparison with other distros]]<br />
<br />
[[Category:Newbie]]</div>Guest09248https://wiki.alpinelinux.org/w/index.php?title=Fonts&diff=21373Fonts2022-01-05T20:31:43Z<p>Guest09248: </p>
<hr />
<div>'''Fonts''' on Alpine Linux covers a wide range of various languages. If you can't see your language, you need to install the font that has glyphs (little picture) created for it. The square box called a substitute character or "tofu" that acts as a placeholder for missing a glyph usually with a two byte sequence. Tofu is a prepared food that is a traditional part of East Asian and Southeast Asian meals. It is often served in a white rectangular appearance.<br />
<br />
<br><br />
<br />
{{Note|The system font directory is located at '''/usr/share/fonts''' which is reserved for the Alpine package creators and the package system. The user font location is located in '''~/.fonts''' which is the preferred install font location especially from unknown sources. Fonts have been used as a source of security exploits [https://www.cvedetails.com/vulnerability-list/vendor_id-4535/product_id-7835/Freetype-Freetype.html (See CVEs)] so to reduce the spread of attack install fonts inside '''~/.fonts'''. The trusted system fonts that Alpine LInux packages typically are from well known sources like corporations like Google, Adobe, open organizations like Xorg or well known font designers or projects licensed as either [https://en.wikipedia.org/wiki/SIL_Open_Font_License SIL], GPL, etc.}}<br />
<br />
<br><br />
<br />
== Installation ==<br />
<br />
Default internal fb fonts (tty console) or xorg fonts (desktops) are suitable for a default installation. {{Pkg|font-misc-misc}} is installed with Xorg, so fonts for most languages (Japanese, Korean, Latin, Cyrillic) are already covered. Exceptions are Arabic, Persian, Thai, Tamil, etc. according to the Wikipedia Page on languages for article translation. <br />
<br />
<br><br />
<br />
These selections will cover most languages and are a good fit for most setups: <br />
<br />
<pre><br />
<nowiki><br />
apk add terminus-font ttf-inconsolata ttf-dejavu font-bitstream-* font-noto font-noto-* ttf-font-awesome font-noto-extra<br />
</nowiki><br />
</pre><br />
<br />
<br><br />
<br />
These selections add special support for '''cyrillic languages like Russian and Serbian, etc.''':<br />
<br />
<pre><br />
<nowiki><br />
apk add font-vollkorn font-misc-cyrillic font-mutt-misc font-screen-cyrillic font-winitzki-cyrillic font-cronyx-cyrillic<br />
</nowiki><br />
</pre><br />
<br />
<br><br />
<br />
These selections cover special '''Asiatic languages like Japanese, etc.''':<br />
<br />
<pre><br />
<nowiki><br />
apk add terminus-font font-noto font-noto-thai font-noto-tibetan font-ipa font-sony-misc font-daewoo-misc font-jis-misc<br />
</nowiki><br />
</pre><br />
<br />
<br><br />
<br />
The following will add some '''partially supported Chinese fonts''':<br />
<br />
<pre><br />
<nowiki><br />
apk add font-isas-misc<br />
</nowiki><br />
</pre><br />
<br />
<br><br />
<br />
These selection will cover, in general '''Arabic, Thai, Ethiopic, Hebrew, Romanian, Persian, Korean Hangul, Greek, Persian, Russian/Slavic Cyrillic, Macedonian/Serbian, Armenian, Georgian, Lao, Devanagari, Urdu (Hindustani as in Northern India and Pakistan), Cherokee, Thaana languages support''' for desktop setups:<br />
<br />
<pre><br />
<nowiki><br />
apk add terminus-font font-bitstream-* font-noto font-noto-extra font-arabic-misc <br />
<br />
apk add font-misc-cyrillic font-mutt-misc font-screen-cyrillic font-winitzki-cyrillic font-cronyx-cyrillic<br />
<br />
apk add font-noto-arabic font-noto-armenian font-noto-cherokee font-noto-devanagari font-noto-ethiopic font-noto-georgian<br />
<br />
apk add font-noto-hebrew font-noto-lao font-noto-malayalam font-noto-tamil font-noto-thaana font-noto-thai<br />
<br />
</nowiki><br />
</pre><br />
<br />
<br><br />
<br />
== Configuration ==<br />
<br />
<code>fc-cache -fv</code> can be used to display the font locations and to update the cache.<br />
<br />
<br><br />
<br />
Some applications do not specify a specific font to use but rather say sans-serif [sans means without as in without tiny lines], serif, monospace [as in proportional square font]. This is where Fontconfig comes into place by substituting the general font type with a specific font that you like. For package developers, '''/etc/fonts/conf.avail''' contains a fontconfig configuration file. This will be symlinked into '''/etc/fonts/conf.d'''. See '''/etc/fonts/conf.d/README''' for details about the meaning behind the priority numbers.<br />
<br />
For regular users, you want to create/edit your personal '''~/.fonts.conf'''. This is in XML and describes which preferred font to use for these general types. See [https://www.freedesktop.org/software/fontconfig/fontconfig-user.html this] for details.<br />
<br />
<br><br />
<br />
Per-user Configuration is made in <code><nowiki>~/.fonts.conf</nowiki></code>but it's hard to configure. An easier method is to use the<br />
<code><nowiki>~/.Xresources</nowiki></code> file.<br />
<br />
The following will set up for all users, a minimal resource usage for fonts. No antialiasing. No hint, etc:<br />
<br />
<pre><br />
<nowiki><br />
cat > /home/*/.Xresources << EOF<br />
Xft.antialias: 0<br />
Xft.rgba: rgb<br />
Xft.autohint: 0<br />
Xft.hinting: 1<br />
Xft.hintstyle: hintslight<br />
EOF<br />
</nowiki><br />
</pre><br />
<br />
<br><br />
<br />
== List of fonts in Alpine Linux ==<br />
<br />
* [https://en.wikipedia.org/wiki/Utopia_(typeface) Utopia] - font-adobe-utopia-*<br />
* [https://en.wikipedia.org/wiki/Noto_fonts Noto] - font-noto-* -- These fonts can cover different glyphs for your language. If you go to https://fonts.google.com/noto , you can try to search for your language to see if it is supported. If Alpine doesn't have it, you can download it from Google into your {{path|~/.font}} . As hinted in the introduction, noto comes from '''no to'''fu or gradual elimination of these substitute characters off the web.<br />
font-noto<br />
font-noto-adlam<br />
font-noto-adlamunjoined<br />
font-noto-arabic<br />
font-noto-armenian<br />
font-noto-avestan<br />
font-noto-bamum<br />
font-noto-bengali<br />
font-noto-buhid<br />
font-noto-carian<br />
font-noto-chakma<br />
font-noto-cherokee<br />
font-noto-cypriot<br />
font-noto-deseret<br />
font-noto-devanagari (Hindi / Sanskrit)<br />
font-noto-emoji<br />
font-noto-ethiopic<br />
font-noto-extra<br />
font-noto-georgian<br />
font-noto-glagolitic<br />
font-noto-gothic<br />
font-noto-gujarati<br />
font-noto-gurmukhi<br />
font-noto-hebrew<br />
font-noto-kannada<br />
font-noto-kayahli<br />
font-noto-khmer<br />
font-noto-lao<br />
font-noto-lisu<br />
font-noto-malayalam<br />
font-noto-mandaic<br />
font-noto-myanmar<br />
font-noto-nko<br />
font-noto-olchiki<br />
font-noto-oldturkic<br />
font-noto-oriya<br />
font-noto-osage<br />
font-noto-osmanya<br />
font-noto-shavian<br />
font-noto-sinhala<br />
font-noto-tamil<br />
font-noto-telugu<br />
font-noto-thaana<br />
font-noto-thai<br />
font-noto-tibetan<br />
font-noto-tifinagh<br />
font-noto-vai<br />
* [http://terminus-font.sourceforge.net/ Terminus] - terminus-font -- Monospace font<br />
* [https://mirrors.ibiblio.org/CTAN/systems/win32/bakoma/fonts/fonts.html BaKoMa] font-bakoma-* -- Fonts for TeX typesetting system (for academics in the math and sciences and book writers) and TeX (WYSIWYG) editors<br />
* [https://en.wikipedia.org/wiki/Bitstream_Speedo_Fonts Bitstream Speedo] - font-bitstream-speedo<br />
* [https://en.wikipedia.org/wiki/Bitstream_Vera Bitstream Vera] font-bitstream-*<br />
* [https://en.wikipedia.org/wiki/Bitstream_Vera Bera (Bitstream Vera Type 1)] - font-bitstream-type1 -- Use for LaTeX<br />
* [https://en.wikipedia.org/wiki/Ubuntu_(typeface) Ubuntu] - ttf-ubuntu-font-family<br />
* [https://fontawesome.com/ Font Awesome] - ttf-font-awesome -- It was used in Twitter Bootstrap. It is a font representing things and brands as Icons.<br />
* [https://www.gnu.org/software/freefont/ GNU FreeFont] - ttf-freefont -- See link for support for different writing systems/languages<br />
* [https://savannah.gnu.org/projects/unifont/ GNU Unifont] - unifont -- It contains glyphs of every codepoint<br />
* font-misc-cyrillic -- Cyrillic fonts (Russian/Slavic Style)<br />
* font-screen-cyrillic -- X.org public domain Cyrillic fonts for screen use<br />
* font-misc-ethiopic -- Ethiopic fonts used in Ethiopia and Eritrea<br />
* font-misc-meltho -- For the Syriac language<br />
* font-misc-misc -- Bitmap fonts in PCF format (shows glyphs of many types and installed by default by xorg-server package)<br />
* [https://www.rockbox.org/mail/archive/rockbox-dev-archive-2005-12/0029.shtml ClearlyU fonts] - font-mutt-misc -- Thai, Ethiopic, Hebrew, Romanian, Persian, Korean Hangul, Greek, Persian, Russian/Slavic Cyrillic, Macedonian/Serbian, Armenian, Georgian, Lao, Devanagari, Urdu (Hindustani as in Northern India and Pakistan), Cherokee, Thaana. See link to changelog for full list of languages supported.<br />
* [https://github.com/lucy/tewi-font tewi font] font-tewi - A tiny bitmap font that contains braille glyphs<br />
* [https://en.wikipedia.org/wiki/Overpass_(typeface) Overpass] - font-overpass<br />
* [https://en.wikipedia.org/wiki/Luxi_fonts Luxi fonts] - font-bh-* -- designed by Kris Holmes and Charles Bigelow which bh is refers to the last name<br />
* [https://en.wikipedia.org/wiki/Lucida#Lucida_Typewriter_Serif Lucida Typewriter] - font-bh-lucidatypewriter-*<br />
* [https://directory.fsf.org/wiki/IPAfont IPA Font] - font-ipa -- A Japanese font<br />
* [https://en.wikipedia.org/wiki/Croscore_fonts Chrome OS core fonts] - font-croscore<br />
* [http://vollkorn-typeface.com/ Vollkorn] - font-vollkorn - A serif font with glyphs for Cyrillic (Russian/Slavic), Greek, Polish, Dutch, Bulgarian, Serbian, and small capitals<br />
* [https://en.wikipedia.org/wiki/Open_Sans Open Sans] - ttf-opensans<br />
* [https://en.wikipedia.org/wiki/Cantarell_(typeface) Cantarell] - ttf-cantarell -- Designed for reading and the default GNOME font<br />
* [https://en.wikipedia.org/wiki/DejaVu_fonts DejaVu] - ttf-dejavu -- A modified Bitstream Vera with more styles and unicode coverage<br />
* [https://en.wikipedia.org/wiki/Linux_Libertine Linux Libertine] - ttf-linux-libertine -- A free alternative to Times New Roman<br />
* [https://en.wikipedia.org/wiki/Liberation_fonts Liberation] ttf-liberation -- A free alternative to Helvetica and Arial<br />
* [https://en.wikipedia.org/wiki/Inconsolata Inconsolata] - ttf-inconsolata -- A monospace font designed for terminals and reading source code<br />
* [https://madmalik.github.io/mononoki/ mononoki] - ttf-mononoki -- A font for programming and code review<br />
* [https://en.wikipedia.org/wiki/Droid_fonts Droid] - ttf-droid / ttf-droid-nonlatin -- Designed for small screens and was used in older Android<br />
* font-schumacher-misc -- Fixed width fonts by Dale Schumacher<br />
* font-sony-misc -- Japanese Kana fonts by Sony Electronics<br />
* font-daewoo-misc -- JIS (Japanese Industrial Standards) Kanji and Korean Hangul fonts by Daewoo Electronics<br />
* font-cursor-misc -- A standard cursor font<br />
* font-sun-misc -- Cursor and glyph fonts by Sun Microsystems<br />
* font-winitzki-cyrillic -- A Cyrillic (Russian) font by Serge Winitzki designed for proofreading mixed Russian-English text<br />
* font-isas-misc -- Chinese Song Ti style fonts (thinner horizontal lines compared to vertical)<br />
* font-jis-misc -- A Japanese International Standard font<br />
* [https://en.wikipedia.org/wiki/Courier_(typeface)#IBM_Courier IBM Courier] font-ibm-type1<br />
* font-dec-misc -- A Digital Equipment Corporation cursor and session fonts<br />
* font-cronyx-cyrillic -- A Russian font for X11 by Cronyx<br />
* font-arabic-misc -- A bitmap and proportional Arabic font in newspaper style [https://unicode.org/mail-arch/unicode-ml/Archives-Old/UML010/0237.html ]<br />
<br />
==Non-free fonts==<br />
<br />
* [https://en.wikipedia.org/wiki/Core_fonts_for_the_Web Core fonts for the Web] ({{Pkg|msttcorefonts-installer}}) - For installing non-free proprietary Microsoft fonts like [https://en.wikipedia.org/wiki/Comic_Sans Comic Sans]. Not recommended for commercial or open source projects. See their [https://web.archive.org/web/20091208063245/http://www.microsoft.com/typography/fontpack/eula.htm licensing].<br />
Arial<br />
Arial Black<br />
Andalé Mono<br />
Courier New<br />
Comic Sans MS<br />
Georgia<br />
Impact<br />
Times New Roman<br />
Trebuchet MS<br />
Verdana<br />
Webdings<br />
<br />
== Changing the console font ==<br />
<br />
The default font may be too small on high-resolution monitors, e.g. 4K ones. To change the default font, e.g. to the 32px ISO Latin-1 Terminus font:<br />
<br />
# <code>apk add terminus-font</code><br />
# try out fonts in a virtual console using <code>setfont /usr/share/consolefonts/ter-132n.psf.gz</code><br />
# edit <code>/etc/conf.d/consolefont</code>, set it to the font you choose, e.g. <code>consolefont="ter-132n.psf.gz"</code><br />
# enable this using <code>rc-update add consolefont boot</code><br />
<br />
== See Also ==<br />
<br />
* [[Emojis]]<br />
<br />
<br />
[[Category:Infographics]]</div>Guest09248https://wiki.alpinelinux.org/w/index.php?title=Fonts&diff=21372Fonts2022-01-05T20:27:42Z<p>Guest09248: </p>
<hr />
<div>'''Fonts''' on Alpine Linux covers a wide range of various languages. If you can't see your language, you need to install the font that has glyphs (little picture) created for it. The square box called a substitute character or "tofu" that acts as a placeholder for missing a glyph usually with a two byte sequence. Tofu is a prepared food that is a traditional part of East Asian and Southeast Asian meals. It is often served in a white rectangular appearance.<br />
<br />
<br><br />
<br />
{{Note|The system font directory is located at '''/usr/share/fonts''' which is reserved for the Alpine package creators and the package system. The user font location is located in '''~/.fonts''' which is the preferred install font location especially from unknown sources. Fonts have been used as a source of security exploits [https://www.cvedetails.com/vulnerability-list/vendor_id-4535/product_id-7835/Freetype-Freetype.html (See CVEs)] so to reduce the spread of attack install fonts inside '''~/.fonts'''. The trusted system fonts that Alpine LInux packages typically are from well known sources like corporations like Google, Adobe, open organizations like Xorg or well known font designers or projects licensed as either [https://en.wikipedia.org/wiki/SIL_Open_Font_License SIL], GPL, etc.}}<br />
<br />
<br><br />
<br />
== Installation ==<br />
<br />
Default internal fb fonts (tty console) or xorg fonts (desktops) are suitable for a default installation. {{Pkg|font-misc-misc}} is installed with Xorg, so fonts for most languages (Japanese, Korean, Latin, Cyrillic) are already covered. Exceptions are Arabic, Persian, Thai, Tamil, etc. according to the Wikipedia Page on languages for article translation. <br />
<br />
<br><br />
<br />
These selections will cover most languages and are a good fit for most setups: <br />
<br />
<pre><br />
<nowiki><br />
apk add terminus-font ttf-inconsolata ttf-dejavu font-bitstream-* font-noto font-noto-* ttf-font-awesome font-noto-extra<br />
</nowiki><br />
</pre><br />
<br />
<br><br />
<br />
These selections add special support for '''cyrillic languages like Russian and Serbian, etc.''':<br />
<br />
<pre><br />
<nowiki><br />
apk add font-vollkorn font-misc-cyrillic font-mutt-misc font-screen-cyrillic font-winitzki-cyrillic font-cronyx-cyrillic<br />
</nowiki><br />
</pre><br />
<br />
<br><br />
<br />
These selections cover special '''Asiatic languages like Japanese, etc.''':<br />
<br />
<pre><br />
<nowiki><br />
apk add terminus-font font-noto font-noto-thai font-noto-tibetan font-ipa font-sony-misc font-daewoo-misc font-jis-misc<br />
</nowiki><br />
</pre><br />
<br />
<br><br />
<br />
The following will add some '''partially supported Chinese fonts''':<br />
<br />
<pre><br />
<nowiki><br />
apk add font-isas-misc<br />
</nowiki><br />
</pre><br />
<br />
<br><br />
<br />
These selection will cover, in general '''Arabic, Thai, Ethiopic, Hebrew, Romanian, Persian, Korean Hangul, Greek, Persian, Russian/Slavic Cyrillic, Macedonian/Serbian, Armenian, Georgian, Lao, Devanagari, Urdu (Hindustani as in Northern India and Pakistan), Cherokee, Thaana languages support''' for desktop setups:<br />
<br />
<pre><br />
<nowiki><br />
apk add terminus-font font-bitstream-* font-noto font-noto-extra font-arabic-misc <br />
<br />
apk add font-misc-cyrillic font-mutt-misc font-screen-cyrillic font-winitzki-cyrillic font-cronyx-cyrillic<br />
<br />
apk add font-noto-arabic font-noto-armenian font-noto-cherokee font-noto-devanagari font-noto-ethiopic font-noto-georgian<br />
<br />
apk add font-noto-hebrew font-noto-lao font-noto-malayalam font-noto-tamil font-noto-thaana font-noto-thai<br />
<br />
</nowiki><br />
</pre><br />
<br />
<br><br />
<br />
Per-user Configuration is made in <code><nowiki>~/.fonts.conf</nowiki></code>but it's hard to configure. An easier method is to use the<br />
<code><nowiki>~/.Xresources</nowiki></code> file.<br />
<br />
The following will set up for all users, a minimal resource usage for fonts. No antialiasing. No hint, etc:<br />
<br />
<pre><br />
<nowiki><br />
cat > /home/*/.Xresources << EOF<br />
Xft.antialias: 0<br />
Xft.rgba: rgb<br />
Xft.autohint: 0<br />
Xft.hinting: 1<br />
Xft.hintstyle: hintslight<br />
EOF<br />
</nowiki><br />
</pre><br />
<br />
<br />
The default may be an eyesore so there are alternatives mentioned below.<br />
<br />
== Configuration ==<br />
<br />
<code>fc-cache -fv</code> can be used to display the font locations and to update the cache.<br />
<br />
<br><br />
<br />
Some applications do not specify a specific font to use but rather say sans-serif [sans means without as in without tiny lines], serif, monospace [as in proportional square font]. This is where Fontconfig comes into place by substituting the general font type with a specific font that you like. For package developers, '''/etc/fonts/conf.avail''' contains a fontconfig configuration file. This will be symlinked into '''/etc/fonts/conf.d'''. See '''/etc/fonts/conf.d/README''' for details about the meaning behind the priority numbers.<br />
<br />
For regular users, you want to create/edit your personal '''~/.fonts.conf'''. This is in XML and describes which preferred font to use for these general types. See [https://www.freedesktop.org/software/fontconfig/fontconfig-user.html this] for details.<br />
<br />
== List of fonts in Alpine Linux ==<br />
<br />
* [https://en.wikipedia.org/wiki/Utopia_(typeface) Utopia] - font-adobe-utopia-*<br />
* [https://en.wikipedia.org/wiki/Noto_fonts Noto] - font-noto-* -- These fonts can cover different glyphs for your language. If you go to https://fonts.google.com/noto , you can try to search for your language to see if it is supported. If Alpine doesn't have it, you can download it from Google into your {{path|~/.font}} . As hinted in the introduction, noto comes from '''no to'''fu or gradual elimination of these substitute characters off the web.<br />
font-noto<br />
font-noto-adlam<br />
font-noto-adlamunjoined<br />
font-noto-arabic<br />
font-noto-armenian<br />
font-noto-avestan<br />
font-noto-bamum<br />
font-noto-bengali<br />
font-noto-buhid<br />
font-noto-carian<br />
font-noto-chakma<br />
font-noto-cherokee<br />
font-noto-cypriot<br />
font-noto-deseret<br />
font-noto-devanagari (Hindi / Sanskrit)<br />
font-noto-emoji<br />
font-noto-ethiopic<br />
font-noto-extra<br />
font-noto-georgian<br />
font-noto-glagolitic<br />
font-noto-gothic<br />
font-noto-gujarati<br />
font-noto-gurmukhi<br />
font-noto-hebrew<br />
font-noto-kannada<br />
font-noto-kayahli<br />
font-noto-khmer<br />
font-noto-lao<br />
font-noto-lisu<br />
font-noto-malayalam<br />
font-noto-mandaic<br />
font-noto-myanmar<br />
font-noto-nko<br />
font-noto-olchiki<br />
font-noto-oldturkic<br />
font-noto-oriya<br />
font-noto-osage<br />
font-noto-osmanya<br />
font-noto-shavian<br />
font-noto-sinhala<br />
font-noto-tamil<br />
font-noto-telugu<br />
font-noto-thaana<br />
font-noto-thai<br />
font-noto-tibetan<br />
font-noto-tifinagh<br />
font-noto-vai<br />
* [http://terminus-font.sourceforge.net/ Terminus] - terminus-font -- Monospace font<br />
* [https://mirrors.ibiblio.org/CTAN/systems/win32/bakoma/fonts/fonts.html BaKoMa] font-bakoma-* -- Fonts for TeX typesetting system (for academics in the math and sciences and book writers) and TeX (WYSIWYG) editors<br />
* [https://en.wikipedia.org/wiki/Bitstream_Speedo_Fonts Bitstream Speedo] - font-bitstream-speedo<br />
* [https://en.wikipedia.org/wiki/Bitstream_Vera Bitstream Vera] font-bitstream-*<br />
* [https://en.wikipedia.org/wiki/Bitstream_Vera Bera (Bitstream Vera Type 1)] - font-bitstream-type1 -- Use for LaTeX<br />
* [https://en.wikipedia.org/wiki/Ubuntu_(typeface) Ubuntu] - ttf-ubuntu-font-family<br />
* [https://fontawesome.com/ Font Awesome] - ttf-font-awesome -- It was used in Twitter Bootstrap. It is a font representing things and brands as Icons.<br />
* [https://www.gnu.org/software/freefont/ GNU FreeFont] - ttf-freefont -- See link for support for different writing systems/languages<br />
* [https://savannah.gnu.org/projects/unifont/ GNU Unifont] - unifont -- It contains glyphs of every codepoint<br />
* font-misc-cyrillic -- Cyrillic fonts (Russian/Slavic Style)<br />
* font-screen-cyrillic -- X.org public domain Cyrillic fonts for screen use<br />
* font-misc-ethiopic -- Ethiopic fonts used in Ethiopia and Eritrea<br />
* font-misc-meltho -- For the Syriac language<br />
* font-misc-misc -- Bitmap fonts in PCF format (shows glyphs of many types and installed by default by xorg-server package)<br />
* [https://www.rockbox.org/mail/archive/rockbox-dev-archive-2005-12/0029.shtml ClearlyU fonts] - font-mutt-misc -- Thai, Ethiopic, Hebrew, Romanian, Persian, Korean Hangul, Greek, Persian, Russian/Slavic Cyrillic, Macedonian/Serbian, Armenian, Georgian, Lao, Devanagari, Urdu (Hindustani as in Northern India and Pakistan), Cherokee, Thaana. See link to changelog for full list of languages supported.<br />
* [https://github.com/lucy/tewi-font tewi font] font-tewi - A tiny bitmap font that contains braille glyphs<br />
* [https://en.wikipedia.org/wiki/Overpass_(typeface) Overpass] - font-overpass<br />
* [https://en.wikipedia.org/wiki/Luxi_fonts Luxi fonts] - font-bh-* -- designed by Kris Holmes and Charles Bigelow which bh is refers to the last name<br />
* [https://en.wikipedia.org/wiki/Lucida#Lucida_Typewriter_Serif Lucida Typewriter] - font-bh-lucidatypewriter-*<br />
* [https://directory.fsf.org/wiki/IPAfont IPA Font] - font-ipa -- A Japanese font<br />
* [https://en.wikipedia.org/wiki/Croscore_fonts Chrome OS core fonts] - font-croscore<br />
* [http://vollkorn-typeface.com/ Vollkorn] - font-vollkorn - A serif font with glyphs for Cyrillic (Russian/Slavic), Greek, Polish, Dutch, Bulgarian, Serbian, and small capitals<br />
* [https://en.wikipedia.org/wiki/Open_Sans Open Sans] - ttf-opensans<br />
* [https://en.wikipedia.org/wiki/Cantarell_(typeface) Cantarell] - ttf-cantarell -- Designed for reading and the default GNOME font<br />
* [https://en.wikipedia.org/wiki/DejaVu_fonts DejaVu] - ttf-dejavu -- A modified Bitstream Vera with more styles and unicode coverage<br />
* [https://en.wikipedia.org/wiki/Linux_Libertine Linux Libertine] - ttf-linux-libertine -- A free alternative to Times New Roman<br />
* [https://en.wikipedia.org/wiki/Liberation_fonts Liberation] ttf-liberation -- A free alternative to Helvetica and Arial<br />
* [https://en.wikipedia.org/wiki/Inconsolata Inconsolata] - ttf-inconsolata -- A monospace font designed for terminals and reading source code<br />
* [https://madmalik.github.io/mononoki/ mononoki] - ttf-mononoki -- A font for programming and code review<br />
* [https://en.wikipedia.org/wiki/Droid_fonts Droid] - ttf-droid / ttf-droid-nonlatin -- Designed for small screens and was used in older Android<br />
* font-schumacher-misc -- Fixed width fonts by Dale Schumacher<br />
* font-sony-misc -- Japanese Kana fonts by Sony Electronics<br />
* font-daewoo-misc -- JIS (Japanese Industrial Standards) Kanji and Korean Hangul fonts by Daewoo Electronics<br />
* font-cursor-misc -- A standard cursor font<br />
* font-sun-misc -- Cursor and glyph fonts by Sun Microsystems<br />
* font-winitzki-cyrillic -- A Cyrillic (Russian) font by Serge Winitzki designed for proofreading mixed Russian-English text<br />
* font-isas-misc -- Chinese Song Ti style fonts (thinner horizontal lines compared to vertical)<br />
* font-jis-misc -- A Japanese International Standard font<br />
* [https://en.wikipedia.org/wiki/Courier_(typeface)#IBM_Courier IBM Courier] font-ibm-type1<br />
* font-dec-misc -- A Digital Equipment Corporation cursor and session fonts<br />
* font-cronyx-cyrillic -- A Russian font for X11 by Cronyx<br />
* font-arabic-misc -- A bitmap and proportional Arabic font in newspaper style [https://unicode.org/mail-arch/unicode-ml/Archives-Old/UML010/0237.html ]<br />
<br />
==Non-free fonts==<br />
<br />
* [https://en.wikipedia.org/wiki/Core_fonts_for_the_Web Core fonts for the Web] ({{Pkg|msttcorefonts-installer}}) - For installing non-free proprietary Microsoft fonts like [https://en.wikipedia.org/wiki/Comic_Sans Comic Sans]. Not recommended for commercial or open source projects. See their [https://web.archive.org/web/20091208063245/http://www.microsoft.com/typography/fontpack/eula.htm licensing].<br />
Arial<br />
Arial Black<br />
Andalé Mono<br />
Courier New<br />
Comic Sans MS<br />
Georgia<br />
Impact<br />
Times New Roman<br />
Trebuchet MS<br />
Verdana<br />
Webdings<br />
<br />
== Changing the console font ==<br />
<br />
The default font may be too small on high-resolution monitors, e.g. 4K ones. To change the default font, e.g. to the 32px ISO Latin-1 Terminus font:<br />
<br />
# <code>apk add terminus-font</code><br />
# try out fonts in a virtual console using <code>setfont /usr/share/consolefonts/ter-132n.psf.gz</code><br />
# edit <code>/etc/conf.d/consolefont</code>, set it to the font you choose, e.g. <code>consolefont="ter-132n.psf.gz"</code><br />
# enable this using <code>rc-update add consolefont boot</code><br />
<br />
== See Also ==<br />
<br />
* [[Emojis]]<br />
<br />
<br />
[[Category:Infographics]]</div>Guest09248https://wiki.alpinelinux.org/w/index.php?title=Fonts&diff=21371Fonts2022-01-05T20:22:23Z<p>Guest09248: /* Installation */</p>
<hr />
<div>{{TOC right}}<br />
<br />
'''Fonts''' on Alpine Linux covers a wide range of various languages. If you can't see your language, you need to install the font that has glyphs (little picture) created for it. The square box called a substitute character or "tofu" that acts as a placeholder for missing a glyph usually with a two byte sequence. Tofu is a prepared food that is a traditional part of East Asian and Southeast Asian meals. It is often served in a white rectangular appearance.<br />
<br />
== Installation ==<br />
<br />
Default internal fb fonts (tty console) or xorg fonts (desktops) are suitable for a default installation. {{Pkg|font-misc-misc}} is installed with Xorg, so fonts for most languages (Japanese, Korean, Latin, Cyrillic) are already covered. Exceptions are Arabic, Persian, Thai, Tamil, etc. according to the Wikipedia Page on languages for article translation. <br />
<br />
These selections will cover most languages and are a good fit for most setups: <br />
<br />
<pre><br />
<nowiki><br />
apk add terminus-font ttf-inconsolata ttf-dejavu font-bitstream-* font-noto font-noto-* ttf-font-awesome font-noto-extra<br />
</nowiki><br />
</pre><br />
<br />
These selections add special support for '''cyrillic languages like Russian and Serbian, etc.''':<br />
<br />
<pre><br />
<nowiki><br />
apk add font-vollkorn font-misc-cyrillic font-mutt-misc font-screen-cyrillic font-winitzki-cyrillic font-cronyx-cyrillic<br />
</nowiki><br />
</pre><br />
<br />
These selections cover special '''Asiatic languages like Japanese, etc.''':<br />
<br />
<pre><br />
<nowiki><br />
apk add terminus-font font-noto font-noto-thai font-noto-tibetan font-ipa font-sony-misc font-daewoo-misc font-jis-misc<br />
</nowiki><br />
</pre><br />
<br />
The following will add some '''partially supported Chinese fonts''':<br />
<br />
<pre><br />
<nowiki><br />
apk add font-isas-misc<br />
</nowiki><br />
</pre><br />
<br />
These selection will cover, in general '''Arabic, Thai, Ethiopic, Hebrew, Romanian, Persian, Korean Hangul, Greek, Persian, Russian/Slavic Cyrillic, Macedonian/Serbian, Armenian, Georgian, Lao, Devanagari, Urdu (Hindustani as in Northern India and Pakistan), Cherokee, Thaana languages support''' for desktop setups:<br />
<br />
<pre><br />
<nowiki><br />
apk add terminus-font font-bitstream-* font-noto font-noto-extra font-arabic-misc <br />
<br />
apk add font-misc-cyrillic font-mutt-misc font-screen-cyrillic font-winitzki-cyrillic font-cronyx-cyrillic<br />
<br />
apk add font-noto-arabic font-noto-armenian font-noto-cherokee font-noto-devanagari font-noto-ethiopic font-noto-georgian<br />
<br />
apk add font-noto-hebrew font-noto-lao font-noto-malayalam font-noto-tamil font-noto-thaana font-noto-thai<br />
<br />
</nowiki><br />
</pre><br />
<br />
<br />
The system font directory is located at <code>/usr/share/fonts</code>. User font location is at <code><nowiki>~/.font</nowiki></code> for security reasons. Configurations are by X server, using the <code><nowiki>~/.Xresources</nowiki></code> file.<br />
<br />
Per-user Configuration is made in <code><nowiki>~/.fonts.conf</nowiki></code>but it's hard to configure. An easier method is to use the<br />
<code><nowiki>~/.Xresources</nowiki></code> file.<br />
<br />
The following will set up for all users, a minimal resource usage for fonts. No antialiasing. No hint, etc. :<br />
<br />
<pre><br />
<nowiki><br />
cat > /home/*/.Xresources << EOF<br />
Xft.antialias: 0<br />
Xft.rgba: rgb<br />
Xft.autohint: 0<br />
Xft.hinting: 1<br />
Xft.hintstyle: hintslight<br />
EOF<br />
</nowiki><br />
</pre><br />
<br />
<code>fc-cache -fv</code> can be used to display the font locations and to update the cache. The system font directory is located at '''/usr/share/fonts''' which is reserved for the Alpine package creators and the package system. The user font location is located in '''~/.fonts''' which is the preferred install font location especially from unknown sources. Fonts have been used as a source of security exploits [https://www.cvedetails.com/vulnerability-list/vendor_id-4535/product_id-7835/Freetype-Freetype.html (See CVEs)] so to reduce the spread of attack install fonts inside '''~/.fonts'''. The trusted system fonts that Alpine LInux packages typically are from well known sources like corporations like Google, Adobe, open organizations like XOrg or well known font designers or projects licensed as either [https://en.wikipedia.org/wiki/SIL_Open_Font_License SIL], GPL, etc.<br />
<br />
The default may be an eyesore so there are alternatives mentioned below.<br />
<br />
== Configuration ==<br />
<br />
Some applications do not specify a specific font to use but rather say sans-serif [sans means without as in without tiny lines], serif, monospace [as in proportional square font]. This is where Fontconfig comes into place by substituting the general font type with a specific font that you like. For package developers, '''/etc/fonts/conf.avail''' contains a fontconfig configuration file. This will be symlinked into '''/etc/fonts/conf.d'''. See '''/etc/fonts/conf.d/README''' for details about the meaning behind the priority numbers.<br />
<br />
For regular users, you want to create/edit your personal '''~/.fonts.conf'''. This is in XML and describes which preferred font to use for these general types. See [https://www.freedesktop.org/software/fontconfig/fontconfig-user.html this] for details.<br />
<br />
== List of fonts in Alpine Linux ==<br />
<br />
* [https://en.wikipedia.org/wiki/Utopia_(typeface) Utopia] - font-adobe-utopia-*<br />
* [https://en.wikipedia.org/wiki/Noto_fonts Noto] - font-noto-* -- These fonts can cover different glyphs for your language. If you go to https://fonts.google.com/noto , you can try to search for your language to see if it is supported. If Alpine doesn't have it, you can download it from Google into your {{path|~/.font}} . As hinted in the introduction, noto comes from '''no to'''fu or gradual elimination of these substitute characters off the web.<br />
font-noto<br />
font-noto-adlam<br />
font-noto-adlamunjoined<br />
font-noto-arabic<br />
font-noto-armenian<br />
font-noto-avestan<br />
font-noto-bamum<br />
font-noto-bengali<br />
font-noto-buhid<br />
font-noto-carian<br />
font-noto-chakma<br />
font-noto-cherokee<br />
font-noto-cypriot<br />
font-noto-deseret<br />
font-noto-devanagari (Hindi / Sanskrit)<br />
font-noto-emoji<br />
font-noto-ethiopic<br />
font-noto-extra<br />
font-noto-georgian<br />
font-noto-glagolitic<br />
font-noto-gothic<br />
font-noto-gujarati<br />
font-noto-gurmukhi<br />
font-noto-hebrew<br />
font-noto-kannada<br />
font-noto-kayahli<br />
font-noto-khmer<br />
font-noto-lao<br />
font-noto-lisu<br />
font-noto-malayalam<br />
font-noto-mandaic<br />
font-noto-myanmar<br />
font-noto-nko<br />
font-noto-olchiki<br />
font-noto-oldturkic<br />
font-noto-oriya<br />
font-noto-osage<br />
font-noto-osmanya<br />
font-noto-shavian<br />
font-noto-sinhala<br />
font-noto-tamil<br />
font-noto-telugu<br />
font-noto-thaana<br />
font-noto-thai<br />
font-noto-tibetan<br />
font-noto-tifinagh<br />
font-noto-vai<br />
* [http://terminus-font.sourceforge.net/ Terminus] - terminus-font -- Monospace font<br />
* [https://mirrors.ibiblio.org/CTAN/systems/win32/bakoma/fonts/fonts.html BaKoMa] font-bakoma-* -- Fonts for TeX typesetting system (for academics in the math and sciences and book writers) and TeX (WYSIWYG) editors<br />
* [https://en.wikipedia.org/wiki/Bitstream_Speedo_Fonts Bitstream Speedo] - font-bitstream-speedo<br />
* [https://en.wikipedia.org/wiki/Bitstream_Vera Bitstream Vera] font-bitstream-*<br />
* [https://en.wikipedia.org/wiki/Bitstream_Vera Bera (Bitstream Vera Type 1)] - font-bitstream-type1 -- Use for LaTeX<br />
* [https://en.wikipedia.org/wiki/Ubuntu_(typeface) Ubuntu] - ttf-ubuntu-font-family<br />
* [https://fontawesome.com/ Font Awesome] - ttf-font-awesome -- It was used in Twitter Bootstrap. It is a font representing things and brands as Icons.<br />
* [https://www.gnu.org/software/freefont/ GNU FreeFont] - ttf-freefont -- See link for support for different writing systems/languages<br />
* [https://savannah.gnu.org/projects/unifont/ GNU Unifont] - unifont -- It contains glyphs of every codepoint<br />
* font-misc-cyrillic -- Cyrillic fonts (Russian/Slavic Style)<br />
* font-screen-cyrillic -- X.org public domain Cyrillic fonts for screen use<br />
* font-misc-ethiopic -- Ethiopic fonts used in Ethiopia and Eritrea<br />
* font-misc-meltho -- For the Syriac language<br />
* font-misc-misc -- Bitmap fonts in PCF format (shows glyphs of many types and installed by default by xorg-server package)<br />
* [https://www.rockbox.org/mail/archive/rockbox-dev-archive-2005-12/0029.shtml ClearlyU fonts] - font-mutt-misc -- Thai, Ethiopic, Hebrew, Romanian, Persian, Korean Hangul, Greek, Persian, Russian/Slavic Cyrillic, Macedonian/Serbian, Armenian, Georgian, Lao, Devanagari, Urdu (Hindustani as in Northern India and Pakistan), Cherokee, Thaana. See link to changelog for full list of languages supported.<br />
* [https://github.com/lucy/tewi-font tewi font] font-tewi - A tiny bitmap font that contains braille glyphs<br />
* [https://en.wikipedia.org/wiki/Overpass_(typeface) Overpass] - font-overpass<br />
* [https://en.wikipedia.org/wiki/Luxi_fonts Luxi fonts] - font-bh-* -- designed by Kris Holmes and Charles Bigelow which bh is refers to the last name<br />
* [https://en.wikipedia.org/wiki/Lucida#Lucida_Typewriter_Serif Lucida Typewriter] - font-bh-lucidatypewriter-*<br />
* [https://directory.fsf.org/wiki/IPAfont IPA Font] - font-ipa -- A Japanese font<br />
* [https://en.wikipedia.org/wiki/Croscore_fonts Chrome OS core fonts] - font-croscore<br />
* [http://vollkorn-typeface.com/ Vollkorn] - font-vollkorn - A serif font with glyphs for Cyrillic (Russian/Slavic), Greek, Polish, Dutch, Bulgarian, Serbian, and small capitals<br />
* [https://en.wikipedia.org/wiki/Open_Sans Open Sans] - ttf-opensans<br />
* [https://en.wikipedia.org/wiki/Cantarell_(typeface) Cantarell] - ttf-cantarell -- Designed for reading and the default GNOME font<br />
* [https://en.wikipedia.org/wiki/DejaVu_fonts DejaVu] - ttf-dejavu -- A modified Bitstream Vera with more styles and unicode coverage<br />
* [https://en.wikipedia.org/wiki/Linux_Libertine Linux Libertine] - ttf-linux-libertine -- A free alternative to Times New Roman<br />
* [https://en.wikipedia.org/wiki/Liberation_fonts Liberation] ttf-liberation -- A free alternative to Helvetica and Arial<br />
* [https://en.wikipedia.org/wiki/Inconsolata Inconsolata] - ttf-inconsolata -- A monospace font designed for terminals and reading source code<br />
* [https://madmalik.github.io/mononoki/ mononoki] - ttf-mononoki -- A font for programming and code review<br />
* [https://en.wikipedia.org/wiki/Droid_fonts Droid] - ttf-droid / ttf-droid-nonlatin -- Designed for small screens and was used in older Android<br />
* font-schumacher-misc -- Fixed width fonts by Dale Schumacher<br />
* font-sony-misc -- Japanese Kana fonts by Sony Electronics<br />
* font-daewoo-misc -- JIS (Japanese Industrial Standards) Kanji and Korean Hangul fonts by Daewoo Electronics<br />
* font-cursor-misc -- A standard cursor font<br />
* font-sun-misc -- Cursor and glyph fonts by Sun Microsystems<br />
* font-winitzki-cyrillic -- A Cyrillic (Russian) font by Serge Winitzki designed for proofreading mixed Russian-English text<br />
* font-isas-misc -- Chinese Song Ti style fonts (thinner horizontal lines compared to vertical)<br />
* font-jis-misc -- A Japanese International Standard font<br />
* [https://en.wikipedia.org/wiki/Courier_(typeface)#IBM_Courier IBM Courier] font-ibm-type1<br />
* font-dec-misc -- A Digital Equipment Corporation cursor and session fonts<br />
* font-cronyx-cyrillic -- A Russian font for X11 by Cronyx<br />
* font-arabic-misc -- A bitmap and proportional Arabic font in newspaper style [https://unicode.org/mail-arch/unicode-ml/Archives-Old/UML010/0237.html ]<br />
<br />
==Non-free fonts==<br />
<br />
* [https://en.wikipedia.org/wiki/Core_fonts_for_the_Web Core fonts for the Web] ({{Pkg|msttcorefonts-installer}}) - For installing non-free proprietary Microsoft fonts like [https://en.wikipedia.org/wiki/Comic_Sans Comic Sans]. Not recommended for commercial or open source projects. See their [https://web.archive.org/web/20091208063245/http://www.microsoft.com/typography/fontpack/eula.htm licensing].<br />
Arial<br />
Arial Black<br />
Andalé Mono<br />
Courier New<br />
Comic Sans MS<br />
Georgia<br />
Impact<br />
Times New Roman<br />
Trebuchet MS<br />
Verdana<br />
Webdings<br />
<br />
== Changing the console font ==<br />
<br />
The default font may be too small on high-resolution monitors, e.g. 4K ones. To change the default font, e.g. to the 32px ISO Latin-1 Terminus font:<br />
<br />
# <code>apk add terminus-font</code><br />
# try out fonts in a virtual console using <code>setfont /usr/share/consolefonts/ter-132n.psf.gz</code><br />
# edit <code>/etc/conf.d/consolefont</code>, set it to the font you choose, e.g. <code>consolefont="ter-132n.psf.gz"</code><br />
# enable this using <code>rc-update add consolefont boot</code><br />
<br />
== See Also ==<br />
<br />
* [[Emojis]]<br />
<br />
<br />
[[Category:Infographics]]</div>Guest09248https://wiki.alpinelinux.org/w/index.php?title=Fonts&diff=21370Fonts2022-01-05T20:22:10Z<p>Guest09248: /* Installation */</p>
<hr />
<div>{{TOC right}}<br />
<br />
'''Fonts''' on Alpine Linux covers a wide range of various languages. If you can't see your language, you need to install the font that has glyphs (little picture) created for it. The square box called a substitute character or "tofu" that acts as a placeholder for missing a glyph usually with a two byte sequence. Tofu is a prepared food that is a traditional part of East Asian and Southeast Asian meals. It is often served in a white rectangular appearance.<br />
<br />
== Installation ==<br />
<br />
Default internal fb fonts (tty console) or xorg fonts (desktops) are suitable for a default installation. {{Pkg|font-misc-misc}} is installed with X server, so fonts for most languages (Japanese, Korean, Latin, Cyrillic) are already covered. Exceptions are Arabic, Persian, Thai, Tamil, etc. according to the Wikipedia Page on languages for article translation. <br />
<br />
These selections will cover most languages and are a good fit for most setups: <br />
<br />
<pre><br />
<nowiki><br />
apk add terminus-font ttf-inconsolata ttf-dejavu font-bitstream-* font-noto font-noto-* ttf-font-awesome font-noto-extra<br />
</nowiki><br />
</pre><br />
<br />
These selections add special support for '''cyrillic languages like Russian and Serbian, etc.''':<br />
<br />
<pre><br />
<nowiki><br />
apk add font-vollkorn font-misc-cyrillic font-mutt-misc font-screen-cyrillic font-winitzki-cyrillic font-cronyx-cyrillic<br />
</nowiki><br />
</pre><br />
<br />
These selections cover special '''Asiatic languages like Japanese, etc.''':<br />
<br />
<pre><br />
<nowiki><br />
apk add terminus-font font-noto font-noto-thai font-noto-tibetan font-ipa font-sony-misc font-daewoo-misc font-jis-misc<br />
</nowiki><br />
</pre><br />
<br />
The following will add some '''partially supported Chinese fonts''':<br />
<br />
<pre><br />
<nowiki><br />
apk add font-isas-misc<br />
</nowiki><br />
</pre><br />
<br />
These selection will cover, in general '''Arabic, Thai, Ethiopic, Hebrew, Romanian, Persian, Korean Hangul, Greek, Persian, Russian/Slavic Cyrillic, Macedonian/Serbian, Armenian, Georgian, Lao, Devanagari, Urdu (Hindustani as in Northern India and Pakistan), Cherokee, Thaana languages support''' for desktop setups:<br />
<br />
<pre><br />
<nowiki><br />
apk add terminus-font font-bitstream-* font-noto font-noto-extra font-arabic-misc <br />
<br />
apk add font-misc-cyrillic font-mutt-misc font-screen-cyrillic font-winitzki-cyrillic font-cronyx-cyrillic<br />
<br />
apk add font-noto-arabic font-noto-armenian font-noto-cherokee font-noto-devanagari font-noto-ethiopic font-noto-georgian<br />
<br />
apk add font-noto-hebrew font-noto-lao font-noto-malayalam font-noto-tamil font-noto-thaana font-noto-thai<br />
<br />
</nowiki><br />
</pre><br />
<br />
<br />
The system font directory is located at <code>/usr/share/fonts</code>. User font location is at <code><nowiki>~/.font</nowiki></code> for security reasons. Configurations are by X server, using the <code><nowiki>~/.Xresources</nowiki></code> file.<br />
<br />
Per-user Configuration is made in <code><nowiki>~/.fonts.conf</nowiki></code>but it's hard to configure. An easier method is to use the<br />
<code><nowiki>~/.Xresources</nowiki></code> file.<br />
<br />
The following will set up for all users, a minimal resource usage for fonts. No antialiasing. No hint, etc. :<br />
<br />
<pre><br />
<nowiki><br />
cat > /home/*/.Xresources << EOF<br />
Xft.antialias: 0<br />
Xft.rgba: rgb<br />
Xft.autohint: 0<br />
Xft.hinting: 1<br />
Xft.hintstyle: hintslight<br />
EOF<br />
</nowiki><br />
</pre><br />
<br />
<code>fc-cache -fv</code> can be used to display the font locations and to update the cache. The system font directory is located at '''/usr/share/fonts''' which is reserved for the Alpine package creators and the package system. The user font location is located in '''~/.fonts''' which is the preferred install font location especially from unknown sources. Fonts have been used as a source of security exploits [https://www.cvedetails.com/vulnerability-list/vendor_id-4535/product_id-7835/Freetype-Freetype.html (See CVEs)] so to reduce the spread of attack install fonts inside '''~/.fonts'''. The trusted system fonts that Alpine LInux packages typically are from well known sources like corporations like Google, Adobe, open organizations like XOrg or well known font designers or projects licensed as either [https://en.wikipedia.org/wiki/SIL_Open_Font_License SIL], GPL, etc.<br />
<br />
The default may be an eyesore so there are alternatives mentioned below.<br />
<br />
== Configuration ==<br />
<br />
Some applications do not specify a specific font to use but rather say sans-serif [sans means without as in without tiny lines], serif, monospace [as in proportional square font]. This is where Fontconfig comes into place by substituting the general font type with a specific font that you like. For package developers, '''/etc/fonts/conf.avail''' contains a fontconfig configuration file. This will be symlinked into '''/etc/fonts/conf.d'''. See '''/etc/fonts/conf.d/README''' for details about the meaning behind the priority numbers.<br />
<br />
For regular users, you want to create/edit your personal '''~/.fonts.conf'''. This is in XML and describes which preferred font to use for these general types. See [https://www.freedesktop.org/software/fontconfig/fontconfig-user.html this] for details.<br />
<br />
== List of fonts in Alpine Linux ==<br />
<br />
* [https://en.wikipedia.org/wiki/Utopia_(typeface) Utopia] - font-adobe-utopia-*<br />
* [https://en.wikipedia.org/wiki/Noto_fonts Noto] - font-noto-* -- These fonts can cover different glyphs for your language. If you go to https://fonts.google.com/noto , you can try to search for your language to see if it is supported. If Alpine doesn't have it, you can download it from Google into your {{path|~/.font}} . As hinted in the introduction, noto comes from '''no to'''fu or gradual elimination of these substitute characters off the web.<br />
font-noto<br />
font-noto-adlam<br />
font-noto-adlamunjoined<br />
font-noto-arabic<br />
font-noto-armenian<br />
font-noto-avestan<br />
font-noto-bamum<br />
font-noto-bengali<br />
font-noto-buhid<br />
font-noto-carian<br />
font-noto-chakma<br />
font-noto-cherokee<br />
font-noto-cypriot<br />
font-noto-deseret<br />
font-noto-devanagari (Hindi / Sanskrit)<br />
font-noto-emoji<br />
font-noto-ethiopic<br />
font-noto-extra<br />
font-noto-georgian<br />
font-noto-glagolitic<br />
font-noto-gothic<br />
font-noto-gujarati<br />
font-noto-gurmukhi<br />
font-noto-hebrew<br />
font-noto-kannada<br />
font-noto-kayahli<br />
font-noto-khmer<br />
font-noto-lao<br />
font-noto-lisu<br />
font-noto-malayalam<br />
font-noto-mandaic<br />
font-noto-myanmar<br />
font-noto-nko<br />
font-noto-olchiki<br />
font-noto-oldturkic<br />
font-noto-oriya<br />
font-noto-osage<br />
font-noto-osmanya<br />
font-noto-shavian<br />
font-noto-sinhala<br />
font-noto-tamil<br />
font-noto-telugu<br />
font-noto-thaana<br />
font-noto-thai<br />
font-noto-tibetan<br />
font-noto-tifinagh<br />
font-noto-vai<br />
* [http://terminus-font.sourceforge.net/ Terminus] - terminus-font -- Monospace font<br />
* [https://mirrors.ibiblio.org/CTAN/systems/win32/bakoma/fonts/fonts.html BaKoMa] font-bakoma-* -- Fonts for TeX typesetting system (for academics in the math and sciences and book writers) and TeX (WYSIWYG) editors<br />
* [https://en.wikipedia.org/wiki/Bitstream_Speedo_Fonts Bitstream Speedo] - font-bitstream-speedo<br />
* [https://en.wikipedia.org/wiki/Bitstream_Vera Bitstream Vera] font-bitstream-*<br />
* [https://en.wikipedia.org/wiki/Bitstream_Vera Bera (Bitstream Vera Type 1)] - font-bitstream-type1 -- Use for LaTeX<br />
* [https://en.wikipedia.org/wiki/Ubuntu_(typeface) Ubuntu] - ttf-ubuntu-font-family<br />
* [https://fontawesome.com/ Font Awesome] - ttf-font-awesome -- It was used in Twitter Bootstrap. It is a font representing things and brands as Icons.<br />
* [https://www.gnu.org/software/freefont/ GNU FreeFont] - ttf-freefont -- See link for support for different writing systems/languages<br />
* [https://savannah.gnu.org/projects/unifont/ GNU Unifont] - unifont -- It contains glyphs of every codepoint<br />
* font-misc-cyrillic -- Cyrillic fonts (Russian/Slavic Style)<br />
* font-screen-cyrillic -- X.org public domain Cyrillic fonts for screen use<br />
* font-misc-ethiopic -- Ethiopic fonts used in Ethiopia and Eritrea<br />
* font-misc-meltho -- For the Syriac language<br />
* font-misc-misc -- Bitmap fonts in PCF format (shows glyphs of many types and installed by default by xorg-server package)<br />
* [https://www.rockbox.org/mail/archive/rockbox-dev-archive-2005-12/0029.shtml ClearlyU fonts] - font-mutt-misc -- Thai, Ethiopic, Hebrew, Romanian, Persian, Korean Hangul, Greek, Persian, Russian/Slavic Cyrillic, Macedonian/Serbian, Armenian, Georgian, Lao, Devanagari, Urdu (Hindustani as in Northern India and Pakistan), Cherokee, Thaana. See link to changelog for full list of languages supported.<br />
* [https://github.com/lucy/tewi-font tewi font] font-tewi - A tiny bitmap font that contains braille glyphs<br />
* [https://en.wikipedia.org/wiki/Overpass_(typeface) Overpass] - font-overpass<br />
* [https://en.wikipedia.org/wiki/Luxi_fonts Luxi fonts] - font-bh-* -- designed by Kris Holmes and Charles Bigelow which bh is refers to the last name<br />
* [https://en.wikipedia.org/wiki/Lucida#Lucida_Typewriter_Serif Lucida Typewriter] - font-bh-lucidatypewriter-*<br />
* [https://directory.fsf.org/wiki/IPAfont IPA Font] - font-ipa -- A Japanese font<br />
* [https://en.wikipedia.org/wiki/Croscore_fonts Chrome OS core fonts] - font-croscore<br />
* [http://vollkorn-typeface.com/ Vollkorn] - font-vollkorn - A serif font with glyphs for Cyrillic (Russian/Slavic), Greek, Polish, Dutch, Bulgarian, Serbian, and small capitals<br />
* [https://en.wikipedia.org/wiki/Open_Sans Open Sans] - ttf-opensans<br />
* [https://en.wikipedia.org/wiki/Cantarell_(typeface) Cantarell] - ttf-cantarell -- Designed for reading and the default GNOME font<br />
* [https://en.wikipedia.org/wiki/DejaVu_fonts DejaVu] - ttf-dejavu -- A modified Bitstream Vera with more styles and unicode coverage<br />
* [https://en.wikipedia.org/wiki/Linux_Libertine Linux Libertine] - ttf-linux-libertine -- A free alternative to Times New Roman<br />
* [https://en.wikipedia.org/wiki/Liberation_fonts Liberation] ttf-liberation -- A free alternative to Helvetica and Arial<br />
* [https://en.wikipedia.org/wiki/Inconsolata Inconsolata] - ttf-inconsolata -- A monospace font designed for terminals and reading source code<br />
* [https://madmalik.github.io/mononoki/ mononoki] - ttf-mononoki -- A font for programming and code review<br />
* [https://en.wikipedia.org/wiki/Droid_fonts Droid] - ttf-droid / ttf-droid-nonlatin -- Designed for small screens and was used in older Android<br />
* font-schumacher-misc -- Fixed width fonts by Dale Schumacher<br />
* font-sony-misc -- Japanese Kana fonts by Sony Electronics<br />
* font-daewoo-misc -- JIS (Japanese Industrial Standards) Kanji and Korean Hangul fonts by Daewoo Electronics<br />
* font-cursor-misc -- A standard cursor font<br />
* font-sun-misc -- Cursor and glyph fonts by Sun Microsystems<br />
* font-winitzki-cyrillic -- A Cyrillic (Russian) font by Serge Winitzki designed for proofreading mixed Russian-English text<br />
* font-isas-misc -- Chinese Song Ti style fonts (thinner horizontal lines compared to vertical)<br />
* font-jis-misc -- A Japanese International Standard font<br />
* [https://en.wikipedia.org/wiki/Courier_(typeface)#IBM_Courier IBM Courier] font-ibm-type1<br />
* font-dec-misc -- A Digital Equipment Corporation cursor and session fonts<br />
* font-cronyx-cyrillic -- A Russian font for X11 by Cronyx<br />
* font-arabic-misc -- A bitmap and proportional Arabic font in newspaper style [https://unicode.org/mail-arch/unicode-ml/Archives-Old/UML010/0237.html ]<br />
<br />
==Non-free fonts==<br />
<br />
* [https://en.wikipedia.org/wiki/Core_fonts_for_the_Web Core fonts for the Web] ({{Pkg|msttcorefonts-installer}}) - For installing non-free proprietary Microsoft fonts like [https://en.wikipedia.org/wiki/Comic_Sans Comic Sans]. Not recommended for commercial or open source projects. See their [https://web.archive.org/web/20091208063245/http://www.microsoft.com/typography/fontpack/eula.htm licensing].<br />
Arial<br />
Arial Black<br />
Andalé Mono<br />
Courier New<br />
Comic Sans MS<br />
Georgia<br />
Impact<br />
Times New Roman<br />
Trebuchet MS<br />
Verdana<br />
Webdings<br />
<br />
== Changing the console font ==<br />
<br />
The default font may be too small on high-resolution monitors, e.g. 4K ones. To change the default font, e.g. to the 32px ISO Latin-1 Terminus font:<br />
<br />
# <code>apk add terminus-font</code><br />
# try out fonts in a virtual console using <code>setfont /usr/share/consolefonts/ter-132n.psf.gz</code><br />
# edit <code>/etc/conf.d/consolefont</code>, set it to the font you choose, e.g. <code>consolefont="ter-132n.psf.gz"</code><br />
# enable this using <code>rc-update add consolefont boot</code><br />
<br />
== See Also ==<br />
<br />
* [[Emojis]]<br />
<br />
<br />
[[Category:Infographics]]</div>Guest09248https://wiki.alpinelinux.org/w/index.php?title=Comparison_with_Gentoo_and_Debian&diff=21369Comparison with Gentoo and Debian2022-01-05T20:12:58Z<p>Guest09248: </p>
<hr />
<div>#REDIRECT [[Comparison with other distros]]<br />
<br />
{{Delete}}</div>Guest09248https://wiki.alpinelinux.org/w/index.php?title=Comparison&diff=21368Comparison2022-01-05T20:12:25Z<p>Guest09248: </p>
<hr />
<div>#REDIRECT [[Comparison with other distros]]<br />
<br />
{{Delete}}</div>Guest09248https://wiki.alpinelinux.org/w/index.php?title=Post_installation&diff=21367Post installation2022-01-05T20:11:34Z<p>Guest09248: /* See also */</p>
<hr />
<div>{{Draft|This page "should" contain accurate and up to date information but is a work in progess}}<br />
<br />
== General Notes ==<br />
<br />
* When '''#''' is displayed before a command that means the command needs to be run with root privileges,<br />
<br />
* Anything in < > is likely just a placeholder that you need to replace (example: <editor> file.txt)<br />
<br />
* Some information in here might be a repeat of information in other wiki pages, if you find a section where that is the case please add a link to the original wiki page.<br />
<br />
<br><br />
<br />
== Network setup ==<br />
<br />
==== Wi-Fi ====<br />
<br />
* [[Wi-Fi]]<br />
* [[NetworkManager]]<br />
<br />
==== Ethernet (Wired) ====<br />
<br />
{{Expand|Documentation on Ethernet (Wired) internet setup needs to be created/expanded, maybe information from other wiki's/docs might be helpful?}}<br />
<br />
* [[Ethernet|Ethernet]]<br />
* [[NetworkManager]]<br />
<br />
<br><br />
<br />
== Creating a new user account ==<br />
<br />
After installing Alpine by default you only get a root account. You will probably want to create an account that is not root,<br />
<br />
{{cmd|# adduser <YourUsername>}}<br />
{{Note|replace <YourUsername> with the username of your choice}}<br />
<br />
<br><br />
<br />
You will probably want to install '''doas''' so you can allow <YourUsername> to use root privileges<br />
{{cmd|# apk add doas}}<br />
<br />
<br><br />
<br />
If you want your user to be able to use root privileges add them to the Wheel group<br />
{{cmd|# adduser <YourUsername> wheel}}<br />
<br />
<br><br />
<br />
Allow members of the '''Wheel''' group to use root privileges with doas:<br />
<br />
{{cmd|# <editor> /etc/doas.d/doas.conf}}<br />
<br />
add this to a new line:<br />
{{cmd|permit persist :wheel}}<br />
<br />
<br><br />
<br />
Switch to the new account type '''exit''' in the shell and login with the new user,<br />
<br />
<br><br />
<br />
==== Groups ====<br />
<br />
Groups are needed for certain operations on your system (e.g <code>audio</code> to manage your system audio), below is a list of groups,<br />
{{Note|may be incomplete, if you see a group missing please add it along with a description}}<br />
<br />
{{Cmd|disk:x:6:root,adm Only if need usage vith virtual machines and access to other partitions over new disks for<br />
lp:x:7:lp If will need to use printing services and printers management<br />
floppy:x:11:root Backguard compatible group, use only if need access to external special devices<br />
audio:x:18: Need for audio listening and management of sound volumes as normal user<br />
cdrom:x:19: For access to disck writers and mounting DVD, BR or CD rom disk as normal user<br />
dialout:x:20:root Need for dial private connections and use of modems as normal users<br />
tape:x:26:root Need have into this if plan to use special devices for backup.. rarelly in no servers<br />
video:x:27:root For usage of cameras, mor thant one GPU special features, as normal user<br />
netdev:x:28: For network connections management as normal user<br />
kvm:x:34:kvm Only if as normal user will manage graphically virtual machines.. rarelly on no servers<br />
games:x:35: Need if you want to play games also specially need if will share score between users<br />
cdrw:x:80: To write RW-DVD, RW-BR or RW-CD disk on a disk writing device<br />
apache:x:81: Need if you will perfom development as normal user and want to publish locally on web server<br />
usb:x:85: Need to access to special usb devices, deprecated group<br />
users:x:100:games If you plan to used common files for all users, mandatory as desktop usage}}<br />
<br />
<br><br />
<br />
To add your user to a group use the following command:<br />
<br />
{{Cmd|# adduser <YourUsername> <group>}}<br />
{{Note|you need to log out for the group change(s) to take effect}}<br />
<br />
<br><br />
<br />
== Shell ==<br />
<br />
{{Note|No other shells besides [https://en.wikipedia.org/wiki/Almquist_shell ash] is included with Alpine by default, you will need to install another shell if you want a different one}}<br />
<br />
<br><br />
<br />
By default AlpineLinux uses the [https://en.wikipedia.org/wiki/Almquist_shell ash] shell, but many users may prefer {{Pkg|bash}}, {{Pkg|zsh}}, {{Pkg|fish}} or another shell, to change this run the following command:<br />
<br />
{{Cmd|$ chsh}}<br />
enter your password and you should get the following output:<br />
<br />
{{Cat|$ chsh|Changing the login shell for user<br />
Enter the new value, or press ENTER for the default<br />
Login Shell [/bin/ash]:}}<br />
<br />
<br><br />
<br />
now enter the path for the shell you want to use (e.g <code>/bin/bash</code>) and press enter to confirm this change,<br />
{{Note|You may need to log out or reboot for this change to take effect, '''ash''' is a part of busybox so you can revert back to '''ash''' at anytime with the same steps}}<br />
<br />
<br><br />
<br />
== Repositories ==<br />
<br />
The Alpine software repositories have three branches:<br />
<br />
* '''Main''': Main packages are the Alpine software that has direct support and updates from the Alpine core and main team. They also have official special documentation, are always available for all releases and will have substitutions if some are not continued from upstream. Commonly, those packages are selected due to their responsibility and stability with respect to upstream availability. When those in ''testing'' perform well or are mature, they go to the ''main'' branch.<br />
* '''Community''': Community packages are those made by users in concert with the official developers and integrated into the Alpine packages. They are user supported. Support could end if the user ends support with respect to Alpine work. For example, could not include substitution in next release due to lack of support by the upstream author. They are in ''edge'' and when accepted, go to the ''community'' branch.<br />
* '''Edge''': New packages come into testing repositories of the edge Alpine version and are those made by any contributor or man power on Alpine. The edge contains unstable current development content. This branch has no release linked or related to Alpine. They are in ''testing'' and when accepted, go to the ''community'' branch.<br />
<br />
<br><br />
<br />
By default only the '''main''' repository is enabled, most users will probably want to enable the '''community''' repository, to enable a repository remove the '''#''' in front of the url along with any blank space.<br />
<br />
<br><br />
<br />
(Example) Disabled:<br />
{{cat|/etc/apk/repositories|#http://dl-cdn.alpinelinux.org/alpine/v3.15/community}}<br />
<br />
(Example) Enabled:<br />
{{cat|/etc/apk/repositories|http://dl-cdn.alpinelinux.org/alpine/v3.15/community}}<br />
<br />
<br />
<br><br />
<br />
To edit the repositories open the file in a text editor:<br />
{{cmd|# <editor> /etc/apk/repositories}}<br />
<br />
<br><br />
<br />
Example default configuration:<br />
<br />
{{cat|/etc/apk/repositories|#/media/cdrom/apks<br />
http://dl-cdn.alpinelinux.org/alpine/v3.15/main<br />
# http://dl-cdn.alpinelinux.org/alpine/v3.15/community<br />
#http://dl-cdn.alpinelinux.org/alpine/edge/main<br />
#http://dl-cdn.alpinelinux.org/alpine/edge/community<br />
#http://dl-cdn.alpinelinux.org/alpine/edge/testing}}<br />
<br />
{{Note|The edge repositories contain unstable and/or possibly untested packages use at your own risk!}}<br />
<br />
<br><br />
<br />
To avoid having to manually update the verison in '''/etc/apk/repositories''' for each Alpine Linux update, change '''v3.15''' to '''latest-stable'''<br />
<br />
Example:<br />
{{cat|/etc/apk/repositories|#/media/cdrom/apks<br />
http://dl-cdn.alpinelinux.org/alpine/latest-stable/main<br />
http://dl-cdn.alpinelinux.org/alpine/latest-stable/community<br />
#http://dl-cdn.alpinelinux.org/alpine/edge/main<br />
#http://dl-cdn.alpinelinux.org/alpine/edge/community<br />
#http://dl-cdn.alpinelinux.org/alpine/edge/testing}}<br />
<br />
{{Note|Changing the repositories to latest-stable may initiate unexpected release upgrades, do this at your own risk!}}<br />
<br />
<br><br />
<br />
For [https://en.wikipedia.org/wiki/HTTPS#Technical security reasons] it may be a good idea to change the url's from '''http''' to '''https'''<br />
<br />
Example:<br />
{{cat|/etc/apk/repositories|#/media/cdrom/apks<br />
https://dl-cdn.alpinelinux.org/alpine/v3.15/main<br />
https://dl-cdn.alpinelinux.org/alpine/v3.15/community<br />
#https://dl-cdn.alpinelinux.org/alpine/edge/main<br />
#https://dl-cdn.alpinelinux.org/alpine/edge/community<br />
#https://dl-cdn.alpinelinux.org/alpine/edge/testing}}<br />
<br />
{{Note|some Alpine Linux package mirrors may not support https, if that is the case you will need to revert back or change mirrors}}<br />
<br />
<br><br />
<br />
Once you have edited '''/etc/apk/repositories''' sync the repositories with:<br />
<br />
{{cmd|# apk update}}<br />
<br />
<br><br />
<br />
== Installing a Display Server (for graphical sessions) ==<br />
<br />
==== Xorg ====<br />
Most desktop enviroments (DE) or Windows Managers (WM) require Xorg (also called: X11, X), although in the future many will fully migrate to [[Wayland]] currently Xorg is still widely used, <br />
<br />
<br><br />
<br />
There is two ways you can get Xorg installed,<br />
<br />
<br><br />
<br />
By default Alpine Linux provides a script that will install Xorg, run the following command to install Xorg:<br />
{{cmd|# setup-xorg-base}}<br />
<br />
or<br />
<br />
{{cmd|# apk add xorg-server xorg-server-common xorg-server-dev xorgproto xorgxrdp xorgxrdp-dev}}<br />
{{Note| the apk add method is probably incomplete}}<br />
<br />
<br><br />
<br />
==== Wayland ====<br />
''See also: [[Wayland]]''<br />
<br />
{{Expand|Wayland documentation needs to be expanded}}<br />
<br />
<br><br />
<br />
== Fonts ==<br />
<br />
If you plan to use a graphical environment you may need/want to install fonts<br />
{{Note|depending on the desktop environment/window manager fonts may or may not be installed automatically or as dependencies}}<br />
<br />
'''See: [[Fonts|Fonts]]'''<br />
<br />
<br><br />
<br />
== Installing a desktop environment or window manager ==<br />
<br />
'''See: [[Desktop environments and Window managers]]'''<br />
<br />
<br><br />
<br />
== Sound ==<br />
<br />
By default Alpine doesnt come with any Sound managment out of the box, these are your options:<br />
<br />
* [[PipeWire]]<br />
* [[PulseAudio]]<br />
* [[ALSA]]<br />
<br />
{{Note|If your unsure {{Pkg|pipewire}} is the recommended option}}<br />
<br />
<br><br />
<br />
== Man pages ==<br />
<br />
Most Linux distributions have '''man''' pages, man pages allow you type <code>man <package></code> in a terminal and get some useful information about packages installed on your system quicky without a internet connection, by default Alpine does not include '''man''', you can add that with one of the following:<br />
<br />
* <code># apk add man-pages</code> Installs basic manual pages.<br />
* <code># apk add mandoc</code> Installs the man command to be able to open man pages.<br />
* <code># apk add mandoc-apropos</code> Installs the apropos command to search in man pages.<br />
* <code># apk add docs</code> Installs all the *-doc sub-packages of installed packages.<br />
<br />
{{Note|man pages may not be available for every package}}<br />
<br />
<br><br />
<br />
== Language support ==<br />
<br />
{{Expand}}<br />
<br />
* Fix unicode defaults: <code>sed -i 's/#unicode="NO"/#unicode="NO"\nunicode="YES"/' /etc/rc.conf</code><br />
* <code>apk add musl-locales</code> Installs a limited set of locales (languages) for musl (C library) generated console messages.<br />
* Listing defined locales is possible with <code>locale -a</code><br />
* <code>cp /etc/profile.d/locale.sh /etc/profile.d/locale.sh.sh</code> Copies the default locale settings. Then the custom override file can be edited <code>nano /etc/profile.d/locale.sh.sh</code>.<br />
* <code>apk add lang</code> Pulls in the translation packages of all installed packages.<br />
* <code>apk list hunspell*</code> To list available hunspell dictionary packages.<br />
* <code>apk list *-xy *-xy-*</code> To list translation packages for your specific (xy) language (for example, pt for Portuguese).<br />
<br />
<br><br />
<br />
== Miscellaneous ==<br />
<br />
Some other miscellaneous things that might be useful:<br />
<br />
==== basic tools ====<br />
<br />
Alpine is a minimalist Linux distribution. If you expected a behavior like other Linux distributions, the similarity to them will be minimal at best. Run: <br />
<br />
{{Cmd|# apk add sed attr dialog bash bash-completion grep util-linux pciutils usbutils binutils findutils readline lsof less nano curl}}<br />
<br />
{{Cmd|<nowiki>$ export PAGER=less</nowiki>}}<br />
<br />
<br><br />
<br />
== Troubleshooting ==<br />
<br />
==== I dont have permission to do anything in my user's home directory ====<br />
<br />
By default the permissions of your new user(s) home directory may be limited to the root account, run one of these commands to change that: <br />
<br />
{{cmd|# chmod 700 /home/<YourUsername>}}<br />
<br />
or<br />
<br />
{{cmd|# chmod 777 /home/<YourUsername>}}<br />
<br />
<br><br />
<br />
== See also ==<br />
* [[Installation]]<br />
* [[Alpine newbie]]<br />
* [[Comparison with other distros]]<br />
<br />
[[Category:Newbie]]</div>Guest09248https://wiki.alpinelinux.org/w/index.php?title=Post_installation&diff=21366Post installation2022-01-05T20:11:07Z<p>Guest09248: /* basic tools */</p>
<hr />
<div>{{Draft|This page "should" contain accurate and up to date information but is a work in progess}}<br />
<br />
== General Notes ==<br />
<br />
* When '''#''' is displayed before a command that means the command needs to be run with root privileges,<br />
<br />
* Anything in < > is likely just a placeholder that you need to replace (example: <editor> file.txt)<br />
<br />
* Some information in here might be a repeat of information in other wiki pages, if you find a section where that is the case please add a link to the original wiki page.<br />
<br />
<br><br />
<br />
== Network setup ==<br />
<br />
==== Wi-Fi ====<br />
<br />
* [[Wi-Fi]]<br />
* [[NetworkManager]]<br />
<br />
==== Ethernet (Wired) ====<br />
<br />
{{Expand|Documentation on Ethernet (Wired) internet setup needs to be created/expanded, maybe information from other wiki's/docs might be helpful?}}<br />
<br />
* [[Ethernet|Ethernet]]<br />
* [[NetworkManager]]<br />
<br />
<br><br />
<br />
== Creating a new user account ==<br />
<br />
After installing Alpine by default you only get a root account. You will probably want to create an account that is not root,<br />
<br />
{{cmd|# adduser <YourUsername>}}<br />
{{Note|replace <YourUsername> with the username of your choice}}<br />
<br />
<br><br />
<br />
You will probably want to install '''doas''' so you can allow <YourUsername> to use root privileges<br />
{{cmd|# apk add doas}}<br />
<br />
<br><br />
<br />
If you want your user to be able to use root privileges add them to the Wheel group<br />
{{cmd|# adduser <YourUsername> wheel}}<br />
<br />
<br><br />
<br />
Allow members of the '''Wheel''' group to use root privileges with doas:<br />
<br />
{{cmd|# <editor> /etc/doas.d/doas.conf}}<br />
<br />
add this to a new line:<br />
{{cmd|permit persist :wheel}}<br />
<br />
<br><br />
<br />
Switch to the new account type '''exit''' in the shell and login with the new user,<br />
<br />
<br><br />
<br />
==== Groups ====<br />
<br />
Groups are needed for certain operations on your system (e.g <code>audio</code> to manage your system audio), below is a list of groups,<br />
{{Note|may be incomplete, if you see a group missing please add it along with a description}}<br />
<br />
{{Cmd|disk:x:6:root,adm Only if need usage vith virtual machines and access to other partitions over new disks for<br />
lp:x:7:lp If will need to use printing services and printers management<br />
floppy:x:11:root Backguard compatible group, use only if need access to external special devices<br />
audio:x:18: Need for audio listening and management of sound volumes as normal user<br />
cdrom:x:19: For access to disck writers and mounting DVD, BR or CD rom disk as normal user<br />
dialout:x:20:root Need for dial private connections and use of modems as normal users<br />
tape:x:26:root Need have into this if plan to use special devices for backup.. rarelly in no servers<br />
video:x:27:root For usage of cameras, mor thant one GPU special features, as normal user<br />
netdev:x:28: For network connections management as normal user<br />
kvm:x:34:kvm Only if as normal user will manage graphically virtual machines.. rarelly on no servers<br />
games:x:35: Need if you want to play games also specially need if will share score between users<br />
cdrw:x:80: To write RW-DVD, RW-BR or RW-CD disk on a disk writing device<br />
apache:x:81: Need if you will perfom development as normal user and want to publish locally on web server<br />
usb:x:85: Need to access to special usb devices, deprecated group<br />
users:x:100:games If you plan to used common files for all users, mandatory as desktop usage}}<br />
<br />
<br><br />
<br />
To add your user to a group use the following command:<br />
<br />
{{Cmd|# adduser <YourUsername> <group>}}<br />
{{Note|you need to log out for the group change(s) to take effect}}<br />
<br />
<br><br />
<br />
== Shell ==<br />
<br />
{{Note|No other shells besides [https://en.wikipedia.org/wiki/Almquist_shell ash] is included with Alpine by default, you will need to install another shell if you want a different one}}<br />
<br />
<br><br />
<br />
By default AlpineLinux uses the [https://en.wikipedia.org/wiki/Almquist_shell ash] shell, but many users may prefer {{Pkg|bash}}, {{Pkg|zsh}}, {{Pkg|fish}} or another shell, to change this run the following command:<br />
<br />
{{Cmd|$ chsh}}<br />
enter your password and you should get the following output:<br />
<br />
{{Cat|$ chsh|Changing the login shell for user<br />
Enter the new value, or press ENTER for the default<br />
Login Shell [/bin/ash]:}}<br />
<br />
<br><br />
<br />
now enter the path for the shell you want to use (e.g <code>/bin/bash</code>) and press enter to confirm this change,<br />
{{Note|You may need to log out or reboot for this change to take effect, '''ash''' is a part of busybox so you can revert back to '''ash''' at anytime with the same steps}}<br />
<br />
<br><br />
<br />
== Repositories ==<br />
<br />
The Alpine software repositories have three branches:<br />
<br />
* '''Main''': Main packages are the Alpine software that has direct support and updates from the Alpine core and main team. They also have official special documentation, are always available for all releases and will have substitutions if some are not continued from upstream. Commonly, those packages are selected due to their responsibility and stability with respect to upstream availability. When those in ''testing'' perform well or are mature, they go to the ''main'' branch.<br />
* '''Community''': Community packages are those made by users in concert with the official developers and integrated into the Alpine packages. They are user supported. Support could end if the user ends support with respect to Alpine work. For example, could not include substitution in next release due to lack of support by the upstream author. They are in ''edge'' and when accepted, go to the ''community'' branch.<br />
* '''Edge''': New packages come into testing repositories of the edge Alpine version and are those made by any contributor or man power on Alpine. The edge contains unstable current development content. This branch has no release linked or related to Alpine. They are in ''testing'' and when accepted, go to the ''community'' branch.<br />
<br />
<br><br />
<br />
By default only the '''main''' repository is enabled, most users will probably want to enable the '''community''' repository, to enable a repository remove the '''#''' in front of the url along with any blank space.<br />
<br />
<br><br />
<br />
(Example) Disabled:<br />
{{cat|/etc/apk/repositories|#http://dl-cdn.alpinelinux.org/alpine/v3.15/community}}<br />
<br />
(Example) Enabled:<br />
{{cat|/etc/apk/repositories|http://dl-cdn.alpinelinux.org/alpine/v3.15/community}}<br />
<br />
<br />
<br><br />
<br />
To edit the repositories open the file in a text editor:<br />
{{cmd|# <editor> /etc/apk/repositories}}<br />
<br />
<br><br />
<br />
Example default configuration:<br />
<br />
{{cat|/etc/apk/repositories|#/media/cdrom/apks<br />
http://dl-cdn.alpinelinux.org/alpine/v3.15/main<br />
# http://dl-cdn.alpinelinux.org/alpine/v3.15/community<br />
#http://dl-cdn.alpinelinux.org/alpine/edge/main<br />
#http://dl-cdn.alpinelinux.org/alpine/edge/community<br />
#http://dl-cdn.alpinelinux.org/alpine/edge/testing}}<br />
<br />
{{Note|The edge repositories contain unstable and/or possibly untested packages use at your own risk!}}<br />
<br />
<br><br />
<br />
To avoid having to manually update the verison in '''/etc/apk/repositories''' for each Alpine Linux update, change '''v3.15''' to '''latest-stable'''<br />
<br />
Example:<br />
{{cat|/etc/apk/repositories|#/media/cdrom/apks<br />
http://dl-cdn.alpinelinux.org/alpine/latest-stable/main<br />
http://dl-cdn.alpinelinux.org/alpine/latest-stable/community<br />
#http://dl-cdn.alpinelinux.org/alpine/edge/main<br />
#http://dl-cdn.alpinelinux.org/alpine/edge/community<br />
#http://dl-cdn.alpinelinux.org/alpine/edge/testing}}<br />
<br />
{{Note|Changing the repositories to latest-stable may initiate unexpected release upgrades, do this at your own risk!}}<br />
<br />
<br><br />
<br />
For [https://en.wikipedia.org/wiki/HTTPS#Technical security reasons] it may be a good idea to change the url's from '''http''' to '''https'''<br />
<br />
Example:<br />
{{cat|/etc/apk/repositories|#/media/cdrom/apks<br />
https://dl-cdn.alpinelinux.org/alpine/v3.15/main<br />
https://dl-cdn.alpinelinux.org/alpine/v3.15/community<br />
#https://dl-cdn.alpinelinux.org/alpine/edge/main<br />
#https://dl-cdn.alpinelinux.org/alpine/edge/community<br />
#https://dl-cdn.alpinelinux.org/alpine/edge/testing}}<br />
<br />
{{Note|some Alpine Linux package mirrors may not support https, if that is the case you will need to revert back or change mirrors}}<br />
<br />
<br><br />
<br />
Once you have edited '''/etc/apk/repositories''' sync the repositories with:<br />
<br />
{{cmd|# apk update}}<br />
<br />
<br><br />
<br />
== Installing a Display Server (for graphical sessions) ==<br />
<br />
==== Xorg ====<br />
Most desktop enviroments (DE) or Windows Managers (WM) require Xorg (also called: X11, X), although in the future many will fully migrate to [[Wayland]] currently Xorg is still widely used, <br />
<br />
<br><br />
<br />
There is two ways you can get Xorg installed,<br />
<br />
<br><br />
<br />
By default Alpine Linux provides a script that will install Xorg, run the following command to install Xorg:<br />
{{cmd|# setup-xorg-base}}<br />
<br />
or<br />
<br />
{{cmd|# apk add xorg-server xorg-server-common xorg-server-dev xorgproto xorgxrdp xorgxrdp-dev}}<br />
{{Note| the apk add method is probably incomplete}}<br />
<br />
<br><br />
<br />
==== Wayland ====<br />
''See also: [[Wayland]]''<br />
<br />
{{Expand|Wayland documentation needs to be expanded}}<br />
<br />
<br><br />
<br />
== Fonts ==<br />
<br />
If you plan to use a graphical environment you may need/want to install fonts<br />
{{Note|depending on the desktop environment/window manager fonts may or may not be installed automatically or as dependencies}}<br />
<br />
'''See: [[Fonts|Fonts]]'''<br />
<br />
<br><br />
<br />
== Installing a desktop environment or window manager ==<br />
<br />
'''See: [[Desktop environments and Window managers]]'''<br />
<br />
<br><br />
<br />
== Sound ==<br />
<br />
By default Alpine doesnt come with any Sound managment out of the box, these are your options:<br />
<br />
* [[PipeWire]]<br />
* [[PulseAudio]]<br />
* [[ALSA]]<br />
<br />
{{Note|If your unsure {{Pkg|pipewire}} is the recommended option}}<br />
<br />
<br><br />
<br />
== Man pages ==<br />
<br />
Most Linux distributions have '''man''' pages, man pages allow you type <code>man <package></code> in a terminal and get some useful information about packages installed on your system quicky without a internet connection, by default Alpine does not include '''man''', you can add that with one of the following:<br />
<br />
* <code># apk add man-pages</code> Installs basic manual pages.<br />
* <code># apk add mandoc</code> Installs the man command to be able to open man pages.<br />
* <code># apk add mandoc-apropos</code> Installs the apropos command to search in man pages.<br />
* <code># apk add docs</code> Installs all the *-doc sub-packages of installed packages.<br />
<br />
{{Note|man pages may not be available for every package}}<br />
<br />
<br><br />
<br />
== Language support ==<br />
<br />
{{Expand}}<br />
<br />
* Fix unicode defaults: <code>sed -i 's/#unicode="NO"/#unicode="NO"\nunicode="YES"/' /etc/rc.conf</code><br />
* <code>apk add musl-locales</code> Installs a limited set of locales (languages) for musl (C library) generated console messages.<br />
* Listing defined locales is possible with <code>locale -a</code><br />
* <code>cp /etc/profile.d/locale.sh /etc/profile.d/locale.sh.sh</code> Copies the default locale settings. Then the custom override file can be edited <code>nano /etc/profile.d/locale.sh.sh</code>.<br />
* <code>apk add lang</code> Pulls in the translation packages of all installed packages.<br />
* <code>apk list hunspell*</code> To list available hunspell dictionary packages.<br />
* <code>apk list *-xy *-xy-*</code> To list translation packages for your specific (xy) language (for example, pt for Portuguese).<br />
<br />
<br><br />
<br />
== Miscellaneous ==<br />
<br />
Some other miscellaneous things that might be useful:<br />
<br />
==== basic tools ====<br />
<br />
Alpine is a minimalist Linux distribution. If you expected a behavior like other Linux distributions, the similarity to them will be minimal at best. Run: <br />
<br />
{{Cmd|# apk add sed attr dialog bash bash-completion grep util-linux pciutils usbutils binutils findutils readline lsof less nano curl}}<br />
<br />
{{Cmd|<nowiki>$ export PAGER=less</nowiki>}}<br />
<br />
<br><br />
<br />
== Troubleshooting ==<br />
<br />
==== I dont have permission to do anything in my user's home directory ====<br />
<br />
By default the permissions of your new user(s) home directory may be limited to the root account, run one of these commands to change that: <br />
<br />
{{cmd|# chmod 700 /home/<YourUsername>}}<br />
<br />
or<br />
<br />
{{cmd|# chmod 777 /home/<YourUsername>}}<br />
<br />
<br><br />
<br />
== See also ==<br />
* [[Installation]]<br />
* [[Alpine newbie]]<br />
<br />
<br />
[[Category:Newbie]]</div>Guest09248https://wiki.alpinelinux.org/w/index.php?title=Post_installation&diff=21365Post installation2022-01-05T20:10:41Z<p>Guest09248: /* basic tools */</p>
<hr />
<div>{{Draft|This page "should" contain accurate and up to date information but is a work in progess}}<br />
<br />
== General Notes ==<br />
<br />
* When '''#''' is displayed before a command that means the command needs to be run with root privileges,<br />
<br />
* Anything in < > is likely just a placeholder that you need to replace (example: <editor> file.txt)<br />
<br />
* Some information in here might be a repeat of information in other wiki pages, if you find a section where that is the case please add a link to the original wiki page.<br />
<br />
<br><br />
<br />
== Network setup ==<br />
<br />
==== Wi-Fi ====<br />
<br />
* [[Wi-Fi]]<br />
* [[NetworkManager]]<br />
<br />
==== Ethernet (Wired) ====<br />
<br />
{{Expand|Documentation on Ethernet (Wired) internet setup needs to be created/expanded, maybe information from other wiki's/docs might be helpful?}}<br />
<br />
* [[Ethernet|Ethernet]]<br />
* [[NetworkManager]]<br />
<br />
<br><br />
<br />
== Creating a new user account ==<br />
<br />
After installing Alpine by default you only get a root account. You will probably want to create an account that is not root,<br />
<br />
{{cmd|# adduser <YourUsername>}}<br />
{{Note|replace <YourUsername> with the username of your choice}}<br />
<br />
<br><br />
<br />
You will probably want to install '''doas''' so you can allow <YourUsername> to use root privileges<br />
{{cmd|# apk add doas}}<br />
<br />
<br><br />
<br />
If you want your user to be able to use root privileges add them to the Wheel group<br />
{{cmd|# adduser <YourUsername> wheel}}<br />
<br />
<br><br />
<br />
Allow members of the '''Wheel''' group to use root privileges with doas:<br />
<br />
{{cmd|# <editor> /etc/doas.d/doas.conf}}<br />
<br />
add this to a new line:<br />
{{cmd|permit persist :wheel}}<br />
<br />
<br><br />
<br />
Switch to the new account type '''exit''' in the shell and login with the new user,<br />
<br />
<br><br />
<br />
==== Groups ====<br />
<br />
Groups are needed for certain operations on your system (e.g <code>audio</code> to manage your system audio), below is a list of groups,<br />
{{Note|may be incomplete, if you see a group missing please add it along with a description}}<br />
<br />
{{Cmd|disk:x:6:root,adm Only if need usage vith virtual machines and access to other partitions over new disks for<br />
lp:x:7:lp If will need to use printing services and printers management<br />
floppy:x:11:root Backguard compatible group, use only if need access to external special devices<br />
audio:x:18: Need for audio listening and management of sound volumes as normal user<br />
cdrom:x:19: For access to disck writers and mounting DVD, BR or CD rom disk as normal user<br />
dialout:x:20:root Need for dial private connections and use of modems as normal users<br />
tape:x:26:root Need have into this if plan to use special devices for backup.. rarelly in no servers<br />
video:x:27:root For usage of cameras, mor thant one GPU special features, as normal user<br />
netdev:x:28: For network connections management as normal user<br />
kvm:x:34:kvm Only if as normal user will manage graphically virtual machines.. rarelly on no servers<br />
games:x:35: Need if you want to play games also specially need if will share score between users<br />
cdrw:x:80: To write RW-DVD, RW-BR or RW-CD disk on a disk writing device<br />
apache:x:81: Need if you will perfom development as normal user and want to publish locally on web server<br />
usb:x:85: Need to access to special usb devices, deprecated group<br />
users:x:100:games If you plan to used common files for all users, mandatory as desktop usage}}<br />
<br />
<br><br />
<br />
To add your user to a group use the following command:<br />
<br />
{{Cmd|# adduser <YourUsername> <group>}}<br />
{{Note|you need to log out for the group change(s) to take effect}}<br />
<br />
<br><br />
<br />
== Shell ==<br />
<br />
{{Note|No other shells besides [https://en.wikipedia.org/wiki/Almquist_shell ash] is included with Alpine by default, you will need to install another shell if you want a different one}}<br />
<br />
<br><br />
<br />
By default AlpineLinux uses the [https://en.wikipedia.org/wiki/Almquist_shell ash] shell, but many users may prefer {{Pkg|bash}}, {{Pkg|zsh}}, {{Pkg|fish}} or another shell, to change this run the following command:<br />
<br />
{{Cmd|$ chsh}}<br />
enter your password and you should get the following output:<br />
<br />
{{Cat|$ chsh|Changing the login shell for user<br />
Enter the new value, or press ENTER for the default<br />
Login Shell [/bin/ash]:}}<br />
<br />
<br><br />
<br />
now enter the path for the shell you want to use (e.g <code>/bin/bash</code>) and press enter to confirm this change,<br />
{{Note|You may need to log out or reboot for this change to take effect, '''ash''' is a part of busybox so you can revert back to '''ash''' at anytime with the same steps}}<br />
<br />
<br><br />
<br />
== Repositories ==<br />
<br />
The Alpine software repositories have three branches:<br />
<br />
* '''Main''': Main packages are the Alpine software that has direct support and updates from the Alpine core and main team. They also have official special documentation, are always available for all releases and will have substitutions if some are not continued from upstream. Commonly, those packages are selected due to their responsibility and stability with respect to upstream availability. When those in ''testing'' perform well or are mature, they go to the ''main'' branch.<br />
* '''Community''': Community packages are those made by users in concert with the official developers and integrated into the Alpine packages. They are user supported. Support could end if the user ends support with respect to Alpine work. For example, could not include substitution in next release due to lack of support by the upstream author. They are in ''edge'' and when accepted, go to the ''community'' branch.<br />
* '''Edge''': New packages come into testing repositories of the edge Alpine version and are those made by any contributor or man power on Alpine. The edge contains unstable current development content. This branch has no release linked or related to Alpine. They are in ''testing'' and when accepted, go to the ''community'' branch.<br />
<br />
<br><br />
<br />
By default only the '''main''' repository is enabled, most users will probably want to enable the '''community''' repository, to enable a repository remove the '''#''' in front of the url along with any blank space.<br />
<br />
<br><br />
<br />
(Example) Disabled:<br />
{{cat|/etc/apk/repositories|#http://dl-cdn.alpinelinux.org/alpine/v3.15/community}}<br />
<br />
(Example) Enabled:<br />
{{cat|/etc/apk/repositories|http://dl-cdn.alpinelinux.org/alpine/v3.15/community}}<br />
<br />
<br />
<br><br />
<br />
To edit the repositories open the file in a text editor:<br />
{{cmd|# <editor> /etc/apk/repositories}}<br />
<br />
<br><br />
<br />
Example default configuration:<br />
<br />
{{cat|/etc/apk/repositories|#/media/cdrom/apks<br />
http://dl-cdn.alpinelinux.org/alpine/v3.15/main<br />
# http://dl-cdn.alpinelinux.org/alpine/v3.15/community<br />
#http://dl-cdn.alpinelinux.org/alpine/edge/main<br />
#http://dl-cdn.alpinelinux.org/alpine/edge/community<br />
#http://dl-cdn.alpinelinux.org/alpine/edge/testing}}<br />
<br />
{{Note|The edge repositories contain unstable and/or possibly untested packages use at your own risk!}}<br />
<br />
<br><br />
<br />
To avoid having to manually update the verison in '''/etc/apk/repositories''' for each Alpine Linux update, change '''v3.15''' to '''latest-stable'''<br />
<br />
Example:<br />
{{cat|/etc/apk/repositories|#/media/cdrom/apks<br />
http://dl-cdn.alpinelinux.org/alpine/latest-stable/main<br />
http://dl-cdn.alpinelinux.org/alpine/latest-stable/community<br />
#http://dl-cdn.alpinelinux.org/alpine/edge/main<br />
#http://dl-cdn.alpinelinux.org/alpine/edge/community<br />
#http://dl-cdn.alpinelinux.org/alpine/edge/testing}}<br />
<br />
{{Note|Changing the repositories to latest-stable may initiate unexpected release upgrades, do this at your own risk!}}<br />
<br />
<br><br />
<br />
For [https://en.wikipedia.org/wiki/HTTPS#Technical security reasons] it may be a good idea to change the url's from '''http''' to '''https'''<br />
<br />
Example:<br />
{{cat|/etc/apk/repositories|#/media/cdrom/apks<br />
https://dl-cdn.alpinelinux.org/alpine/v3.15/main<br />
https://dl-cdn.alpinelinux.org/alpine/v3.15/community<br />
#https://dl-cdn.alpinelinux.org/alpine/edge/main<br />
#https://dl-cdn.alpinelinux.org/alpine/edge/community<br />
#https://dl-cdn.alpinelinux.org/alpine/edge/testing}}<br />
<br />
{{Note|some Alpine Linux package mirrors may not support https, if that is the case you will need to revert back or change mirrors}}<br />
<br />
<br><br />
<br />
Once you have edited '''/etc/apk/repositories''' sync the repositories with:<br />
<br />
{{cmd|# apk update}}<br />
<br />
<br><br />
<br />
== Installing a Display Server (for graphical sessions) ==<br />
<br />
==== Xorg ====<br />
Most desktop enviroments (DE) or Windows Managers (WM) require Xorg (also called: X11, X), although in the future many will fully migrate to [[Wayland]] currently Xorg is still widely used, <br />
<br />
<br><br />
<br />
There is two ways you can get Xorg installed,<br />
<br />
<br><br />
<br />
By default Alpine Linux provides a script that will install Xorg, run the following command to install Xorg:<br />
{{cmd|# setup-xorg-base}}<br />
<br />
or<br />
<br />
{{cmd|# apk add xorg-server xorg-server-common xorg-server-dev xorgproto xorgxrdp xorgxrdp-dev}}<br />
{{Note| the apk add method is probably incomplete}}<br />
<br />
<br><br />
<br />
==== Wayland ====<br />
''See also: [[Wayland]]''<br />
<br />
{{Expand|Wayland documentation needs to be expanded}}<br />
<br />
<br><br />
<br />
== Fonts ==<br />
<br />
If you plan to use a graphical environment you may need/want to install fonts<br />
{{Note|depending on the desktop environment/window manager fonts may or may not be installed automatically or as dependencies}}<br />
<br />
'''See: [[Fonts|Fonts]]'''<br />
<br />
<br><br />
<br />
== Installing a desktop environment or window manager ==<br />
<br />
'''See: [[Desktop environments and Window managers]]'''<br />
<br />
<br><br />
<br />
== Sound ==<br />
<br />
By default Alpine doesnt come with any Sound managment out of the box, these are your options:<br />
<br />
* [[PipeWire]]<br />
* [[PulseAudio]]<br />
* [[ALSA]]<br />
<br />
{{Note|If your unsure {{Pkg|pipewire}} is the recommended option}}<br />
<br />
<br><br />
<br />
== Man pages ==<br />
<br />
Most Linux distributions have '''man''' pages, man pages allow you type <code>man <package></code> in a terminal and get some useful information about packages installed on your system quicky without a internet connection, by default Alpine does not include '''man''', you can add that with one of the following:<br />
<br />
* <code># apk add man-pages</code> Installs basic manual pages.<br />
* <code># apk add mandoc</code> Installs the man command to be able to open man pages.<br />
* <code># apk add mandoc-apropos</code> Installs the apropos command to search in man pages.<br />
* <code># apk add docs</code> Installs all the *-doc sub-packages of installed packages.<br />
<br />
{{Note|man pages may not be available for every package}}<br />
<br />
<br><br />
<br />
== Language support ==<br />
<br />
{{Expand}}<br />
<br />
* Fix unicode defaults: <code>sed -i 's/#unicode="NO"/#unicode="NO"\nunicode="YES"/' /etc/rc.conf</code><br />
* <code>apk add musl-locales</code> Installs a limited set of locales (languages) for musl (C library) generated console messages.<br />
* Listing defined locales is possible with <code>locale -a</code><br />
* <code>cp /etc/profile.d/locale.sh /etc/profile.d/locale.sh.sh</code> Copies the default locale settings. Then the custom override file can be edited <code>nano /etc/profile.d/locale.sh.sh</code>.<br />
* <code>apk add lang</code> Pulls in the translation packages of all installed packages.<br />
* <code>apk list hunspell*</code> To list available hunspell dictionary packages.<br />
* <code>apk list *-xy *-xy-*</code> To list translation packages for your specific (xy) language (for example, pt for Portuguese).<br />
<br />
<br><br />
<br />
== Miscellaneous ==<br />
<br />
Some other miscellaneous things that might be useful:<br />
<br />
==== basic tools ====<br />
<br />
Alpine is a minimalist Linux distribution. If you expected a behavior like other Linux distributions, the similarity to them will be minimal at best. Run: <br />
<br />
{{Cmd|# apk add sed attr dialog bash bash-completion grep util-linux pciutils usbutils binutils findutils readline lsof less nano curl}}<br />
<br />
{{Cmd|<nowiki>export PAGER=less</nowiki>}}<br />
<br />
<br><br />
<br />
== Troubleshooting ==<br />
<br />
==== I dont have permission to do anything in my user's home directory ====<br />
<br />
By default the permissions of your new user(s) home directory may be limited to the root account, run one of these commands to change that: <br />
<br />
{{cmd|# chmod 700 /home/<YourUsername>}}<br />
<br />
or<br />
<br />
{{cmd|# chmod 777 /home/<YourUsername>}}<br />
<br />
<br><br />
<br />
== See also ==<br />
* [[Installation]]<br />
* [[Alpine newbie]]<br />
<br />
<br />
[[Category:Newbie]]</div>Guest09248https://wiki.alpinelinux.org/w/index.php?title=Post_installation&diff=21364Post installation2022-01-05T20:09:21Z<p>Guest09248: </p>
<hr />
<div>{{Draft|This page "should" contain accurate and up to date information but is a work in progess}}<br />
<br />
== General Notes ==<br />
<br />
* When '''#''' is displayed before a command that means the command needs to be run with root privileges,<br />
<br />
* Anything in < > is likely just a placeholder that you need to replace (example: <editor> file.txt)<br />
<br />
* Some information in here might be a repeat of information in other wiki pages, if you find a section where that is the case please add a link to the original wiki page.<br />
<br />
<br><br />
<br />
== Network setup ==<br />
<br />
==== Wi-Fi ====<br />
<br />
* [[Wi-Fi]]<br />
* [[NetworkManager]]<br />
<br />
==== Ethernet (Wired) ====<br />
<br />
{{Expand|Documentation on Ethernet (Wired) internet setup needs to be created/expanded, maybe information from other wiki's/docs might be helpful?}}<br />
<br />
* [[Ethernet|Ethernet]]<br />
* [[NetworkManager]]<br />
<br />
<br><br />
<br />
== Creating a new user account ==<br />
<br />
After installing Alpine by default you only get a root account. You will probably want to create an account that is not root,<br />
<br />
{{cmd|# adduser <YourUsername>}}<br />
{{Note|replace <YourUsername> with the username of your choice}}<br />
<br />
<br><br />
<br />
You will probably want to install '''doas''' so you can allow <YourUsername> to use root privileges<br />
{{cmd|# apk add doas}}<br />
<br />
<br><br />
<br />
If you want your user to be able to use root privileges add them to the Wheel group<br />
{{cmd|# adduser <YourUsername> wheel}}<br />
<br />
<br><br />
<br />
Allow members of the '''Wheel''' group to use root privileges with doas:<br />
<br />
{{cmd|# <editor> /etc/doas.d/doas.conf}}<br />
<br />
add this to a new line:<br />
{{cmd|permit persist :wheel}}<br />
<br />
<br><br />
<br />
Switch to the new account type '''exit''' in the shell and login with the new user,<br />
<br />
<br><br />
<br />
==== Groups ====<br />
<br />
Groups are needed for certain operations on your system (e.g <code>audio</code> to manage your system audio), below is a list of groups,<br />
{{Note|may be incomplete, if you see a group missing please add it along with a description}}<br />
<br />
{{Cmd|disk:x:6:root,adm Only if need usage vith virtual machines and access to other partitions over new disks for<br />
lp:x:7:lp If will need to use printing services and printers management<br />
floppy:x:11:root Backguard compatible group, use only if need access to external special devices<br />
audio:x:18: Need for audio listening and management of sound volumes as normal user<br />
cdrom:x:19: For access to disck writers and mounting DVD, BR or CD rom disk as normal user<br />
dialout:x:20:root Need for dial private connections and use of modems as normal users<br />
tape:x:26:root Need have into this if plan to use special devices for backup.. rarelly in no servers<br />
video:x:27:root For usage of cameras, mor thant one GPU special features, as normal user<br />
netdev:x:28: For network connections management as normal user<br />
kvm:x:34:kvm Only if as normal user will manage graphically virtual machines.. rarelly on no servers<br />
games:x:35: Need if you want to play games also specially need if will share score between users<br />
cdrw:x:80: To write RW-DVD, RW-BR or RW-CD disk on a disk writing device<br />
apache:x:81: Need if you will perfom development as normal user and want to publish locally on web server<br />
usb:x:85: Need to access to special usb devices, deprecated group<br />
users:x:100:games If you plan to used common files for all users, mandatory as desktop usage}}<br />
<br />
<br><br />
<br />
To add your user to a group use the following command:<br />
<br />
{{Cmd|# adduser <YourUsername> <group>}}<br />
{{Note|you need to log out for the group change(s) to take effect}}<br />
<br />
<br><br />
<br />
== Shell ==<br />
<br />
{{Note|No other shells besides [https://en.wikipedia.org/wiki/Almquist_shell ash] is included with Alpine by default, you will need to install another shell if you want a different one}}<br />
<br />
<br><br />
<br />
By default AlpineLinux uses the [https://en.wikipedia.org/wiki/Almquist_shell ash] shell, but many users may prefer {{Pkg|bash}}, {{Pkg|zsh}}, {{Pkg|fish}} or another shell, to change this run the following command:<br />
<br />
{{Cmd|$ chsh}}<br />
enter your password and you should get the following output:<br />
<br />
{{Cat|$ chsh|Changing the login shell for user<br />
Enter the new value, or press ENTER for the default<br />
Login Shell [/bin/ash]:}}<br />
<br />
<br><br />
<br />
now enter the path for the shell you want to use (e.g <code>/bin/bash</code>) and press enter to confirm this change,<br />
{{Note|You may need to log out or reboot for this change to take effect, '''ash''' is a part of busybox so you can revert back to '''ash''' at anytime with the same steps}}<br />
<br />
<br><br />
<br />
== Repositories ==<br />
<br />
The Alpine software repositories have three branches:<br />
<br />
* '''Main''': Main packages are the Alpine software that has direct support and updates from the Alpine core and main team. They also have official special documentation, are always available for all releases and will have substitutions if some are not continued from upstream. Commonly, those packages are selected due to their responsibility and stability with respect to upstream availability. When those in ''testing'' perform well or are mature, they go to the ''main'' branch.<br />
* '''Community''': Community packages are those made by users in concert with the official developers and integrated into the Alpine packages. They are user supported. Support could end if the user ends support with respect to Alpine work. For example, could not include substitution in next release due to lack of support by the upstream author. They are in ''edge'' and when accepted, go to the ''community'' branch.<br />
* '''Edge''': New packages come into testing repositories of the edge Alpine version and are those made by any contributor or man power on Alpine. The edge contains unstable current development content. This branch has no release linked or related to Alpine. They are in ''testing'' and when accepted, go to the ''community'' branch.<br />
<br />
<br><br />
<br />
By default only the '''main''' repository is enabled, most users will probably want to enable the '''community''' repository, to enable a repository remove the '''#''' in front of the url along with any blank space.<br />
<br />
<br><br />
<br />
(Example) Disabled:<br />
{{cat|/etc/apk/repositories|#http://dl-cdn.alpinelinux.org/alpine/v3.15/community}}<br />
<br />
(Example) Enabled:<br />
{{cat|/etc/apk/repositories|http://dl-cdn.alpinelinux.org/alpine/v3.15/community}}<br />
<br />
<br />
<br><br />
<br />
To edit the repositories open the file in a text editor:<br />
{{cmd|# <editor> /etc/apk/repositories}}<br />
<br />
<br><br />
<br />
Example default configuration:<br />
<br />
{{cat|/etc/apk/repositories|#/media/cdrom/apks<br />
http://dl-cdn.alpinelinux.org/alpine/v3.15/main<br />
# http://dl-cdn.alpinelinux.org/alpine/v3.15/community<br />
#http://dl-cdn.alpinelinux.org/alpine/edge/main<br />
#http://dl-cdn.alpinelinux.org/alpine/edge/community<br />
#http://dl-cdn.alpinelinux.org/alpine/edge/testing}}<br />
<br />
{{Note|The edge repositories contain unstable and/or possibly untested packages use at your own risk!}}<br />
<br />
<br><br />
<br />
To avoid having to manually update the verison in '''/etc/apk/repositories''' for each Alpine Linux update, change '''v3.15''' to '''latest-stable'''<br />
<br />
Example:<br />
{{cat|/etc/apk/repositories|#/media/cdrom/apks<br />
http://dl-cdn.alpinelinux.org/alpine/latest-stable/main<br />
http://dl-cdn.alpinelinux.org/alpine/latest-stable/community<br />
#http://dl-cdn.alpinelinux.org/alpine/edge/main<br />
#http://dl-cdn.alpinelinux.org/alpine/edge/community<br />
#http://dl-cdn.alpinelinux.org/alpine/edge/testing}}<br />
<br />
{{Note|Changing the repositories to latest-stable may initiate unexpected release upgrades, do this at your own risk!}}<br />
<br />
<br><br />
<br />
For [https://en.wikipedia.org/wiki/HTTPS#Technical security reasons] it may be a good idea to change the url's from '''http''' to '''https'''<br />
<br />
Example:<br />
{{cat|/etc/apk/repositories|#/media/cdrom/apks<br />
https://dl-cdn.alpinelinux.org/alpine/v3.15/main<br />
https://dl-cdn.alpinelinux.org/alpine/v3.15/community<br />
#https://dl-cdn.alpinelinux.org/alpine/edge/main<br />
#https://dl-cdn.alpinelinux.org/alpine/edge/community<br />
#https://dl-cdn.alpinelinux.org/alpine/edge/testing}}<br />
<br />
{{Note|some Alpine Linux package mirrors may not support https, if that is the case you will need to revert back or change mirrors}}<br />
<br />
<br><br />
<br />
Once you have edited '''/etc/apk/repositories''' sync the repositories with:<br />
<br />
{{cmd|# apk update}}<br />
<br />
<br><br />
<br />
== Installing a Display Server (for graphical sessions) ==<br />
<br />
==== Xorg ====<br />
Most desktop enviroments (DE) or Windows Managers (WM) require Xorg (also called: X11, X), although in the future many will fully migrate to [[Wayland]] currently Xorg is still widely used, <br />
<br />
<br><br />
<br />
There is two ways you can get Xorg installed,<br />
<br />
<br><br />
<br />
By default Alpine Linux provides a script that will install Xorg, run the following command to install Xorg:<br />
{{cmd|# setup-xorg-base}}<br />
<br />
or<br />
<br />
{{cmd|# apk add xorg-server xorg-server-common xorg-server-dev xorgproto xorgxrdp xorgxrdp-dev}}<br />
{{Note| the apk add method is probably incomplete}}<br />
<br />
<br><br />
<br />
==== Wayland ====<br />
''See also: [[Wayland]]''<br />
<br />
{{Expand|Wayland documentation needs to be expanded}}<br />
<br />
<br><br />
<br />
== Fonts ==<br />
<br />
If you plan to use a graphical environment you may need/want to install fonts<br />
{{Note|depending on the desktop environment/window manager fonts may or may not be installed automatically or as dependencies}}<br />
<br />
'''See: [[Fonts|Fonts]]'''<br />
<br />
<br><br />
<br />
== Installing a desktop environment or window manager ==<br />
<br />
'''See: [[Desktop environments and Window managers]]'''<br />
<br />
<br><br />
<br />
== Sound ==<br />
<br />
By default Alpine doesnt come with any Sound managment out of the box, these are your options:<br />
<br />
* [[PipeWire]]<br />
* [[PulseAudio]]<br />
* [[ALSA]]<br />
<br />
{{Note|If your unsure {{Pkg|pipewire}} is the recommended option}}<br />
<br />
<br><br />
<br />
== Man pages ==<br />
<br />
Most Linux distributions have '''man''' pages, man pages allow you type <code>man <package></code> in a terminal and get some useful information about packages installed on your system quicky without a internet connection, by default Alpine does not include '''man''', you can add that with one of the following:<br />
<br />
* <code># apk add man-pages</code> Installs basic manual pages.<br />
* <code># apk add mandoc</code> Installs the man command to be able to open man pages.<br />
* <code># apk add mandoc-apropos</code> Installs the apropos command to search in man pages.<br />
* <code># apk add docs</code> Installs all the *-doc sub-packages of installed packages.<br />
<br />
{{Note|man pages may not be available for every package}}<br />
<br />
<br><br />
<br />
== Language support ==<br />
<br />
{{Expand}}<br />
<br />
* Fix unicode defaults: <code>sed -i 's/#unicode="NO"/#unicode="NO"\nunicode="YES"/' /etc/rc.conf</code><br />
* <code>apk add musl-locales</code> Installs a limited set of locales (languages) for musl (C library) generated console messages.<br />
* Listing defined locales is possible with <code>locale -a</code><br />
* <code>cp /etc/profile.d/locale.sh /etc/profile.d/locale.sh.sh</code> Copies the default locale settings. Then the custom override file can be edited <code>nano /etc/profile.d/locale.sh.sh</code>.<br />
* <code>apk add lang</code> Pulls in the translation packages of all installed packages.<br />
* <code>apk list hunspell*</code> To list available hunspell dictionary packages.<br />
* <code>apk list *-xy *-xy-*</code> To list translation packages for your specific (xy) language (for example, pt for Portuguese).<br />
<br />
<br><br />
<br />
== Miscellaneous ==<br />
<br />
Some other miscellaneous things that might be useful:<br />
<br />
==== basic tools ====<br />
<br />
Alpine is a minimalist Linux distribution. If you expected a behavior like other Linux distributions, the similarity to them will be minimal at best. Run: <br />
<br />
{{Cmd|# apk add sed attr dialog bash bash-completion grep util-linux pciutils usbutils binutils findutils readline lsof less nano nano-doc curl}}<br />
<br />
{{Cmd|export PAGER=less}}<br />
<br />
<br><br />
<br />
== Troubleshooting ==<br />
<br />
==== I dont have permission to do anything in my user's home directory ====<br />
<br />
By default the permissions of your new user(s) home directory may be limited to the root account, run one of these commands to change that: <br />
<br />
{{cmd|# chmod 700 /home/<YourUsername>}}<br />
<br />
or<br />
<br />
{{cmd|# chmod 777 /home/<YourUsername>}}<br />
<br />
<br><br />
<br />
== See also ==<br />
* [[Installation]]<br />
* [[Alpine newbie]]<br />
<br />
<br />
[[Category:Newbie]]</div>Guest09248https://wiki.alpinelinux.org/w/index.php?title=Ethernet&diff=21363Ethernet2022-01-05T20:04:55Z<p>Guest09248: </p>
<hr />
<div>''From [https://en.wikipedia.org/wiki/Ethernet Wikipedia]:''<br />
<br />
Ethernet is a family of wired computer networking technologies commonly used in local area networks (LAN), metropolitan area networks (MAN) and wide area networks (WAN). It was commercially introduced in 1980 and first standardized in 1983 as IEEE 802.3. Ethernet has since been refined to support higher bit rates, a greater number of nodes, and longer link distances, but retains much backward compatibility. <br />
<br />
<br><br />
<br />
== Setup ==<br />
<br />
When installing [[Alpine setup scripts|setup-alpine]] should give you the option to easily setup Ethernet or if you need to setup Ethernet after installation you can use [[Alpine setup scripts#setup-interfaces|setup-interfaces]].<br />
<br />
==== setup-interfaces ====<br />
<br />
start by running this command:<br />
<br />
{{Cmd|# setup-interfaces}}<br />
<br />
<br><br />
<br />
{{Cat|setup-interfaces|Available interfaces are: eth0 wlan0.<br />
Enter '?' for help on bridges, bonding and vlans.<br />
Which one do you want to initialize? (or '?' or 'done') [eth0]}}<br />
<br />
choose <code>eth0</code> (or your Ethernet device, Ethernet devices usually start with <code>e</code> )<br />
<br />
<br><br />
<br />
if asked:<br />
<br />
<code>Ip address for eth0? (or 'dhcp', 'none', '?') [dhcp]</code><br />
<br />
choose '''dhcp'''<br />
<br />
<br><br />
<br />
Now it will ask <code>Do you to do any manual network configuration? (y/n) [n]</code><br />
<br />
unless you need to do manual network configuration choose '''n''', if you need to do manual network configuration choose '''y''' and it will open the <code>/etc/network/interfaces</code> file.<br />
<br />
<br><br />
<br />
if <code>setup-interfaces</code> doesnt do this automatically, then you need to '''start''' (or '''restart''') the networking service:<br />
<br />
{{Cmd|# /etc/init.d/networking --quiet start &}}<br />
<br />
<br><br />
<br />
and add it to start on boot:<br />
<br />
{{Cmd|# rc-update add networking boot}}<br />
<br />
[[Category:Networking]]</div>Guest09248https://wiki.alpinelinux.org/w/index.php?title=GNU_core_utilities&diff=21362GNU core utilities2022-01-05T20:02:29Z<p>Guest09248: </p>
<hr />
<div>''From [https://www.gnu.org/software/coreutils/ gnu.org]:''<br />
<br />
''The GNU Core Utilities (often called {{Pkg|coreutils}}) are the basic file, shell and text manipulation utilities of the GNU operating system. These are the core utilities which are expected to exist on every operating system.'' <br />
<br />
<br><br />
<br />
The {{Pkg|coreutils}} is used in most Linux distributions by default (which is why Linux is often refered to as GNU/linux or GNU+Linux), Alpine uses [https://www.busybox.net/ Busybox] in place of the '''coreutils''' for a more ligthweight, minimalist and secure experience but the '''coreutils''' is still available on AlpineLinux if you wish to use it.<br />
<br />
<br><br />
<br />
{{Expand}}<br />
<br />
===== coreutils libc and utmps in alpine =====<br />
<br />
Some programs like wall(1) depend on a libc feature named "utmp", that cannot be implemented<br />
in libc securely. For this reason, musl (the libc that Alpine uses) does not implement utmp. Instead, it provides stubs that do nothing.<br />
<br />
That is why programs that use utmp - such as wall, who or w - output nothing but still exit successfully. This is expected, a feature, and cannot be fixed easily.<br />
<br />
<br><br />
<br />
Some have a nice solution. For example, a {{Pkg|utmps}} login monitor: <br />
<br />
{{Cmd|apk add coreutils utmps}}<br />
<br />
{{Note|Take into consideration that there's an alternative to {{Pkg|coreutils}} named {{Pkg|ubase}} (only available in edge) that provides better functionality than the built-in busybox, but less than what coreutils offers}}</div>Guest09248https://wiki.alpinelinux.org/w/index.php?title=GNU_core_utilities&diff=21361GNU core utilities2022-01-05T20:01:35Z<p>Guest09248: Created page with "''From [https://www.gnu.org/software/coreutils/ gnu.org]:'' ''The GNU Core Utilities (often called {{Pkg|coreutils}}) are the basic file, shell and text manipulation utilitie..."</p>
<hr />
<div>''From [https://www.gnu.org/software/coreutils/ gnu.org]:''<br />
<br />
''The GNU Core Utilities (often called {{Pkg|coreutils}}) are the basic file, shell and text manipulation utilities of the GNU operating system. These are the core utilities which are expected to exist on every operating system.'' <br />
<br />
<br><br />
<br />
The {{Pkg|coreutils}} is used in most Linux distributions by default (which is why Linux is often refered to as GNU/linux or GNU+Linux), Alpine uses [https://www.busybox.net/ Busybox] in place of the '''coreutils''' for a more ligthweight, minimalist and secure experience but the '''coreutils''' is still available on AlpineLinux if you wish to use it.<br />
<br />
<br><br />
<br />
===== coreutils libc and utmps in alpine =====<br />
<br />
Some programs like wall(1) depend on a libc feature named "utmp", that cannot be implemented<br />
in libc securely. For this reason, musl (the libc that Alpine uses) does not implement utmp. Instead, it provides stubs that do nothing.<br />
<br />
That is why programs that use utmp - such as wall, who or w - output nothing but still exit successfully. This is expected, a feature, and cannot be fixed easily.<br />
<br />
<br><br />
<br />
Some have a nice solution. For example, a {{Pkg|utmps}} login monitor: <br />
<br />
{{Cmd|apk add coreutils utmps}}<br />
<br />
{{Note|Take into consideration that there's an alternative to {{Pkg|coreutils}} named {{Pkg|ubase}} (only available in edge) that provides better functionality than the built-in busybox, but less than what coreutils offers}}</div>Guest09248https://wiki.alpinelinux.org/w/index.php?title=Ethernet&diff=21358Ethernet2022-01-05T19:27:18Z<p>Guest09248: /* Setup */</p>
<hr />
<div>''From [https://en.wikipedia.org/wiki/Ethernet Wikipedia]:''<br />
<br />
Ethernet is a family of wired computer networking technologies commonly used in local area networks (LAN), metropolitan area networks (MAN) and wide area networks (WAN). It was commercially introduced in 1980 and first standardized in 1983 as IEEE 802.3. Ethernet has since been refined to support higher bit rates, a greater number of nodes, and longer link distances, but retains much backward compatibility. <br />
<br />
<br><br />
<br />
== Setup ==<br />
<br />
When installing [[Alpine setup scripts|setup-alpine]] should give you the option to easily setup Ethernet or if you need to setup Ethernet after installation you can use [[Alpine setup scripts#setup-interfaces|setup-interfaces]].<br />
<br />
==== setup-interfaces ====<br />
<br />
start by running this command:<br />
<br />
{{Cmd|# setup-interfaces}}<br />
<br />
<br><br />
<br />
{{Cat|setup-interfaces|Available interfaces are: eth0 wlan0.<br />
Enter '?' for help on bridges, bonding and vlans.<br />
Which one do you want to initialize? (or '?' or 'done') [eth0]}}<br />
<br />
choose <code>eth0</code> (or your Ethernet device, Ethernet devices usually start with <code>e</code> )<br />
<br />
<br><br />
<br />
if asked:<br />
<br />
<code>Ip address for eth0? (or 'dhcp', 'none', '?') [dhcp]</code><br />
<br />
choose '''dhcp'''<br />
<br />
<br><br />
<br />
Now it will ask <code>Do you to do any manual network configuration? (y/n) [n]</code><br />
<br />
unless you need to do manual network configuration choose '''n''', if you need to do manual network configuration choose '''y''' and it will open the <code>/etc/network/interfaces</code> file.<br />
<br />
<br><br />
<br />
if <code>setup-interfaces</code> doesnt do this automatically, then you need to '''start''' (or '''restart''') the networking service:<br />
<br />
{{Cmd|# /etc/init.d/networking --quiet start &}}<br />
<br />
<br><br />
<br />
and add it to start on boot:<br />
<br />
{{Cmd|# rc-update add networking boot}}</div>Guest09248https://wiki.alpinelinux.org/w/index.php?title=Ethernet&diff=21357Ethernet2022-01-05T19:21:39Z<p>Guest09248: /* setup-interfaces */</p>
<hr />
<div>''From [https://en.wikipedia.org/wiki/Ethernet Wikipedia]:''<br />
<br />
Ethernet is a family of wired computer networking technologies commonly used in local area networks (LAN), metropolitan area networks (MAN) and wide area networks (WAN). It was commercially introduced in 1980 and first standardized in 1983 as IEEE 802.3. Ethernet has since been refined to support higher bit rates, a greater number of nodes, and longer link distances, but retains much backward compatibility. <br />
<br />
<br><br />
<br />
== Setup ==<br />
<br />
When installing [[Alpine setup scripts|setup-alpine]] should give you the option to easily setup Ethernet or if you need to setup Ethernet after installation you can use [[Alpine setup scripts#setup-interfaces|setup-interfaces]].<br />
<br />
==== setup-interfaces ====<br />
<br />
start by running this command:<br />
<br />
{{Cmd|# setup-interfaces}}<br />
<br />
<br><br />
<br />
{{Cat|setup-interfaces|Available interfaces are: eth0 wlan0.<br />
Enter '?' for help on bridges, bonding and vlans.<br />
Which one do you want to initialize? (or '?' or 'done') [eth0]}}<br />
<br />
choose <code>eth0</code> (or your Ethernet device, Ethernet devices usually start with <code>e</code> )<br />
<br />
<br><br />
<br />
if asked:<br />
<br />
<code>Ip address for eth0? (or 'dhcp', 'none', '?') [dhcp]</code><br />
<br />
choose '''dhcp'''<br />
<br />
<br><br />
<br />
Now it will ask <code>Do you to do any manual network configuration? (y/n) [n]</code><br />
<br />
unless you need to do manual network configuration choose '''n''', if you need to do manual network configuration choose '''y''' and it will open the '''interfaces''' file.<br />
<br />
<br><br />
<br />
if <code>setup-interfaces</code> doesnt do this automatically, then you need to '''start''' (or '''restart''') the networking service:<br />
<br />
{{Cmd|# /etc/init.d/networking --quiet start &}}<br />
<br />
<br><br />
<br />
and add it to start on boot:<br />
<br />
{{Cmd|# rc-update add networking boot}}</div>Guest09248https://wiki.alpinelinux.org/w/index.php?title=Ethernet&diff=21356Ethernet2022-01-05T19:19:16Z<p>Guest09248: /* setup-interfaces */</p>
<hr />
<div>''From [https://en.wikipedia.org/wiki/Ethernet Wikipedia]:''<br />
<br />
Ethernet is a family of wired computer networking technologies commonly used in local area networks (LAN), metropolitan area networks (MAN) and wide area networks (WAN). It was commercially introduced in 1980 and first standardized in 1983 as IEEE 802.3. Ethernet has since been refined to support higher bit rates, a greater number of nodes, and longer link distances, but retains much backward compatibility. <br />
<br />
<br><br />
<br />
== Setup ==<br />
<br />
When installing [[Alpine setup scripts|setup-alpine]] should give you the option to easily setup Ethernet or if you need to setup Ethernet after installation you can use [[Alpine setup scripts#setup-interfaces|setup-interfaces]].<br />
<br />
==== setup-interfaces ====<br />
<br />
start by running this command:<br />
<br />
{{Cmd|# setup-interfaces}}<br />
<br />
<br><br />
<br />
{{Cat|setup-interfaces|Available interfaces are: eth0 wlan0.<br />
Enter '?' for help on bridges, bonding and vlans.<br />
Which one do you want to initialize? (or '?' or 'done') [eth0]}}<br />
<br />
choose <code>eth0</code> (or your Ethernet device, Ethernet devices usually start with e <code>e</code> )<br />
<br />
<br><br />
<br />
if asked:<br />
<br />
<code>Ip address for eth0? (or 'dhcp', 'none', '?') [dhcp]</code><br />
<br />
choose '''dhcp'''<br />
<br />
<br><br />
<br />
Now it will ask <code>Do you to do any manual network configuration? (y/n) [n]</code><br />
<br />
unless you need to do manual network configuration choose '''n''', if you need to do manual network configuration choose '''y''' and it will open the '''interfaces''' file.<br />
<br />
<br><br />
<br />
if <code>setup-interfaces</code> doesnt do this automatically, then you need to '''start''' (or '''restart''') the networking service:<br />
<br />
{{Cmd|# /etc/init.d/networking --quiet start &}}<br />
<br />
<br><br />
<br />
and add it to start on boot:<br />
<br />
{{Cmd|# rc-update add networking boot}}</div>Guest09248https://wiki.alpinelinux.org/w/index.php?title=Ethernet&diff=21355Ethernet2022-01-05T19:15:25Z<p>Guest09248: /* Setup */</p>
<hr />
<div>''From [https://en.wikipedia.org/wiki/Ethernet Wikipedia]:''<br />
<br />
Ethernet is a family of wired computer networking technologies commonly used in local area networks (LAN), metropolitan area networks (MAN) and wide area networks (WAN). It was commercially introduced in 1980 and first standardized in 1983 as IEEE 802.3. Ethernet has since been refined to support higher bit rates, a greater number of nodes, and longer link distances, but retains much backward compatibility. <br />
<br />
<br><br />
<br />
== Setup ==<br />
<br />
When installing [[Alpine setup scripts|setup-alpine]] should give you the option to easily setup Ethernet or if you need to setup Ethernet after installation you can use [[Alpine setup scripts#setup-interfaces|setup-interfaces]].<br />
<br />
==== setup-interfaces ====<br />
<br />
start by running this command:<br />
<br />
{{Cmd|# setup-interfaces}}<br />
<br />
<br><br />
<br />
{{Cat|setup-interfaces|Available interfaces are: eth0 wlan0.<br />
Enter '?' for help on bridges, bonding and vlans.<br />
Which one do you want to initialize? (or '?' or 'done') [eth0]}}<br />
<br />
choose <code>eth0</code> (or your Ethernet device)<br />
<br />
<br><br />
<br />
if asked:<br />
<br />
<code>Ip address for eth0? (or 'dhcp', 'none', '?') [dhcp]</code><br />
<br />
choose '''dhcp'''<br />
<br />
<br><br />
<br />
Now it will ask <code>Do you to do any manual network configuration? (y/n) [n]</code><br />
<br />
unless you need to do manual network configuration choose '''n''', if you need to do manual network configuration choose '''y''' and it will open the '''interfaces''' file.</div>Guest09248https://wiki.alpinelinux.org/w/index.php?title=Ethernet&diff=21354Ethernet2022-01-05T19:14:42Z<p>Guest09248: Created page with "''From [https://en.wikipedia.org/wiki/Ethernet Wikipedia]:'' Ethernet is a family of wired computer networking technologies commonly used in local area networks (LAN), metrop..."</p>
<hr />
<div>''From [https://en.wikipedia.org/wiki/Ethernet Wikipedia]:''<br />
<br />
Ethernet is a family of wired computer networking technologies commonly used in local area networks (LAN), metropolitan area networks (MAN) and wide area networks (WAN). It was commercially introduced in 1980 and first standardized in 1983 as IEEE 802.3. Ethernet has since been refined to support higher bit rates, a greater number of nodes, and longer link distances, but retains much backward compatibility. <br />
<br />
<br><br />
<br />
== Setup ==<br />
<br />
When installing [[Alpine setup scripts|setup-alpine]] should give you the option to easily setup Ethernet or if you need to setup Ethernet after installation you can use [[Alpine setup scripts#setup-interfaces|setup-interfaces]].<br />
<br />
==== setup-interfaces ====<br />
<br />
start by running this command:<br />
<br />
{{Cmd|# setup-interfaces}}<br />
<br />
<br><br />
<br />
{{Cat|setup-interfaces|Available interfaces are: eth0 wlan0.<br />
Enter '?' for help on bridges, bonding and vlans.<br />
Which one do you want to initialize? (or '?' or 'done') [eth0]}}<br />
<br />
choose <code>eth0</code> (or your Ethernet device)<br />
<br />
<br><br />
<br />
if asked:<br />
<br />
<code>Ip address for eth0? (or 'dhcp', 'none', '?') [dhcp]</code><br />
<br />
choose '''dhcp'''<br />
<br />
<br><br />
<br />
Now it will ask <code>Do you to do any manual network configuration? (y/n) [n]</code><br />
<br />
unless you have a reason to choose '''n''', if you need to do manual network configuration choose '''y''' and it will open the '''interfaces''' file.</div>Guest09248https://wiki.alpinelinux.org/w/index.php?title=Alpine_Package_Keeper&diff=21353Alpine Package Keeper2022-01-05T18:48:52Z<p>Guest09248: /* Table of comparison with other Linux/Unix-like OSes for packages */</p>
<hr />
<div><!--For searching: apk, APK--><br />
<br />
{{TOC right}}<br />
<br />
Because Alpine Linux is designed to run from RAM, package management involves two phases:<br />
* Installing / Upgrading / Deleting packages on a running system.<br />
* Restoring a system to a previously configured state (e.g. after reboot), including all previously installed packages and locally modified configuration files. '''(RAM-Based Installs Only)'''<br />
<br /><br />
'''apk''' is the tool used to install, upgrade, or delete software on a running system.<br /><br />
'''lbu''' is the tool used to capture the data necessary to restore a system to a previously configured state.<br />
<br />
This page documents the [https://git.alpinelinux.org/apk-tools/ apk tool] - See the [[Alpine_local_backup|Alpine Local Backup page]] for the lbu tool.<br />
<br />
= Overview =<br />
<br />
The '''apk''' tool supports the following operations:<br />
<br />
{|<br />
| [[#Add a Package|add]] <br />
| Add new packages or upgrade packages to the running system<br />
|-<br />
| [[#Remove a Package|del]]<br />
| Delete packages from the running system<br />
|-<br />
| fix <br />
| Attempt to repair or upgrade an installed package <br />
|-<br />
| [[#Update the Package list|update]] <br />
| Update the index of available packages<br />
|-<br />
| [[#Information on Packages|info]]<br />
| Prints information about installed or available packages<br />
|-<br />
| [[#Search for Packages|search]] <br />
| Search for packages or descriptions with wildcard patterns<br />
|-<br />
| [[#Upgrade a Running System|upgrade]]<br />
| Upgrade the currently installed packages<br />
|-<br />
| [[#Cache maintenance|cache]]<br />
| Maintenance operations for locally cached package repository<br />
|-<br />
| version <br />
| Compare version differences between installed and available packages<br />
|-<br />
| index <br />
| create a repository index from a list of packages<br />
|-<br />
| fetch <br />
| download (but not install) packages<br />
|-<br />
| audit <br />
| List changes to the file system from pristine package install state<br />
|-<br />
| verify <br />
| Verify a package signature<br />
|- <br />
| dot<br />
| Create a [http://graphviz.org/ graphviz] graph description for a given package<br />
|- <br />
| [[#apk_policy|policy]]<br />
| Display the repository that updates a given package, plus repositories that also offer the package<br />
|- <br />
| stats <br />
| Display statistics, including number of packages installed and available, number of directories and files, etc.<br />
|- <br />
| manifest<br />
| Display checksums for files contained in a given package<br />
|}<br />
<br />
= Packages and Repositories =<br />
<br />
Software packages for Alpine Linux are digitally signed tar.gz archives containing programs, configuration files, and dependency metadata. They have the extension <code>.apk</code>, and are often called "a-packs".<br />
<br />
The packages are stored in one or more ''repositories''. A repository is simply a directory with a collection of *.apk files. The directory must include a special index file, named {{Path|APKINDEX.tar.gz}} to be considered a repository.<br />
<br />
The '''apk''' utility can install packages from multiple repositories. The list of repositories to check is stored in {{Path|/etc/apk/repositories}}, one repository per line. If you booted from a USB stick ({{Path|/media/sda1}}) or CD-ROM ({{Path|/media/cdrom}}), your repository file probably looks something like this:<br />
<br />
{{Cat|/etc/apk/repositories|/media/sda1/apks/}}<br />
<br />
In addition to local repositories, the '''apk''' utility uses '''busybox wget''' to fetch packages using ''http:'', ''https:'' or ''ftp:'' protocols. The following is a valid repository file:<br />
<br />
{{Cat|/etc/apk/repositories|<br />
/media/sda1/apks<br />
http://dl-3.alpinelinux.org/alpine/v2.6/main<br />
https://dl-3.alpinelinux.org/alpine/v2.6/main<br />
ftp://dl-3.alpinelinux.org/alpine/v2.6/main<br />
}}<br />
<br />
{{Note| A list of public repositories is in [https://mirrors.alpinelinux.org/ mirrors.alpinelinux.org]. Accepted protocols vary.}}<br />
<br />
== Repository pinning ==<br />
<br />
You can specify additional "tagged" repositories in {{Path|/etc/apk/repositories}}:<br />
<br />
{{Cat|/etc/apk/repositories|<br />
http://nl.alpinelinux.org/alpine/v3.7/main<br />
http://nl.alpinelinux.org/alpine/v3.7/community<br />
@edge http://nl.alpinelinux.org/alpine/edge/main<br />
@edgecommunity http://nl.alpinelinux.org/alpine/edge/community<br />
@testing http://nl.alpinelinux.org/alpine/edge/testing<br />
}}<br />
<br />
After which you can "pin" dependencies to these tags using:<br />
<br />
{{cmd|apk add stableapp newapp@edge bleedingapp@testing}}<br />
<br />
Apk will now by default only use the untagged repositories, but adding a tag to specific package:<br />
<br />
1. will prefer the repository with that tag for the named package, even if a later version of the package is available in another repository<br />
<br />
2. ''allows'' pulling in dependencies for the tagged package from the tagged repository (though it ''prefers'' to use untagged repositories to satisfy dependencies if possible)<br />
<br />
== Commandline repository options ==<br />
<br />
By default, the '''apk''' utility will use the system repositories for all operations. This behavior can be overridden by the following options:<br />
<br />
{|<br />
| --repositories-file REPOFILE<br />
| Override the system repositories by specifying a repositories file.<br />
|-<br />
| <nowiki>-X|--repository REPO</nowiki><br />
| Specify a supplemental repository that will be used in addition to the system repositories. This option can be provided multiple times.<br />
|}<br />
<br />
= Update the Package list =<br />
<br />
Remote repositories change as packages are added and upgraded. To get the latest list of available packages, use the ''update'' command. The command downloads the {{Path|APKINDEX.tar.gz}} from each repository and stores it in the local cache, typically {{Path|/var/cache/apk/}}, {{Path|/var/lib/apk/}} or {{Path|/etc/apk/cache/}}.<br />
<br />
{{Cmd|apk update}}<br />
<br />
<!--<br />
fetch http://dl-3.alpinelinux.org/alpine/v2.1/main/APKINDEX.tar.gz<br />
--><br />
<br />
Adding the <code>--update-cache</code>, or for short <code>-U</code> switch to another apk command, as in <code>apk --update-cache upgrade</code> or <code>apk -U add ...</code>, the command has the same effect as first running <code>apk update</code> before the other apk command.<br />
<br />
{{Tip|With remote repositories, it is a good idea to always do an '''update''' right '''before''' doing an '''upgrade or add''' command. That way the command will install the latest available packages.}}<br />
<br />
= Add a Package =<br />
<br />
Use '''add''' to install packages from a repository. Any necessary dependencies are also installed. If you have multiple repositories, the '''add''' command installs the newest package.<br />
<br />
{{Cmd|apk add openssh<br />
apk add openssh openntp vim}}<br />
<br />
If you only have the main repository enabled in your configuration, apk will not include packages from the other repositories. To install a package from the edge/testing repository without changing your repository configuration file, use the command below. This will tell apk to use that particular repository.<br />
<br />
{{cmd|apk add cherokee --update-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing/ --allow-untrusted}}<br />
<br />
{{Note|Be careful when using third-party or the testing repository. Your system can go down.}}<br />
<br />
= Add a local Package =<br />
<br />
To install a locally available apk package, for example if this device has no internet access but you can upload apk packages directly to it, use the '''--allow-untrusted''' flag:<br />
<br />
{{cmd|apk add --allow-untrusted /path/to/file.apk}}<br />
<br />
Note that multiple packages can be given. When installing a local package, all dependencies should also be specified. For example:<br />
<br />
{{cmd|apk add --allow-untrusted /var/tig-2.2-r0.apk /var/git-2.11.1-20.apk}}<br />
<br />
= Remove a Package =<br />
Use '''del''' to remove a package (and dependencies that are no longer needed.) <br />
<br />
{{cmd|apk del openssh<br />
apk del openssh openntp vim}}<br />
<br />
= Upgrade a Running System =<br />
<br />
=== Packages in general ===<br />
<br />
To get the latest security upgrades and bugfixes available for the ''installed'' packages of a running system, first '''update''' the list of available packages and then '''upgrade''' the installed packages:<br />
<br />
{{cmd|apk update<br />
apk upgrade<br />
}}<br />
<br />
Or, combining the same into one single command:<br />
<br />
{{cmd|apk -U upgrade<br />
}}<br />
<br />
Here is an example, showing the procedure on a system that has several additional [[#Repository_pinning|repositories pinned]]:<br />
<br />
# apk update<br />
fetch <nowiki>http://dl-3.alpinelinux.org/alpine/v3.6/main/x86_64/APKINDEX.tar.gz</nowiki><br />
fetch <nowiki>http://dl-3.alpinelinux.org/alpine/v3.6/community/x86_64/APKINDEX.tar.gz</nowiki><br />
fetch <nowiki>http://dl-3.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz</nowiki><br />
fetch <nowiki>http://dl-3.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz</nowiki><br />
fetch <nowiki>http://dl-3.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz</nowiki><br />
v3.6.2-191-gf98d79930f <nowiki>[http://dl-3.alpinelinux.org/alpine/v3.6/main]</nowiki><br />
v3.6.2-190-ga5d68c47df <nowiki>[http://dl-3.alpinelinux.org/alpine/v3.6/community]</nowiki><br />
v3.6.0-4618-g0bf77c9821 <nowiki>[http://dl-3.alpinelinux.org/alpine/edge/main]</nowiki><br />
v3.6.0-4605-g85ed51dd83 <nowiki>[http://dl-3.alpinelinux.org/alpine/edge/community]</nowiki><br />
v3.6.0-4624-g11f1b9c8ab <nowiki>[http://dl-3.alpinelinux.org/alpine/edge/testing]</nowiki><br />
OK: 20118 distinct packages available<br />
<br />
# apk upgrade<br />
(1/2) Upgrading extra-cmake-modules@testing (5.38.0-r0 -> 5.39.0-r0)<br />
(2/2) Upgrading extra-cmake-modules-doc@testing (5.38.0-r0 -> 5.39.0-r0)<br />
Executing mdocml-apropos-1.14.1-r0.trigger<br />
OK: 2635 MiB in 803 packages<br />
<br />
To upgrade only ''specific'' packages, use the ''-u'' or ''--upgrade'' option of the '''add''' command:<br />
<br />
{{cmd|apk update<br />
apk add --upgrade busybox <br />
}}<br />
<br />
<br />
<br />
To enable unattended, automatic upgrades of packages, see the {{pkg|apk-autoupdate}} package.<br />
<br />
To upgrade to a newer release, refer to the corresponding release notes and [[Upgrading_Alpine]].<br />
<br />
=== Upgrading "diskless" and "data" disk mode installs ===<br />
<br />
If booting a "diskless" system from a read-only device, or iso image on writable media, it's not possible to update the boot files (kernel, modules, firmware, ...) that reside on that device.<br />
<br />
It becomes possible to update the boot files, though, if using a boot device that is writable and has been prepared with <code>[[Alpine_setup_scripts#setup-bootable|setup-bootable]]</code>.<br />
<br />
However, even then, the kernel, with its modules and firmware files, can still not be updated directly through regular packages updates. Instead, there is the <code>update-kernel</code> script that can generate initfs images and install them together with upgraded kernels.<br />
<br />
Upgrading can be done as follows.<br />
{{cmd|apk add mkinitfs<br />
}}<br />
This package is required for the generation of the initial filesystem used during boot.<br />
* Additional initfs features that are missing in the default configuration, like the [[Btrfs|btrfs]] filesystem support (at the time of writing, to allow loading .apkovl configs and package cache during boot), may be enabled in <code>/etc/mkinitfs/mkinitfs.conf</code>.<br />
* Available initfs features may be listed with <code>ls /etc/mkinitfs/features.d</code><br />
{{cmd|ls /etc/mkinitfs/features.d<br />
apk add nano<br />
nano /etc/mkinitfs/mkinitfs.conf<br />
lbu commit<br />
}}<br />
Finally update the kernel and its boot environment.<br />
{{cmd|update-kernel /media/sdXY/boot/<br />
}}<br />
* An <code>update-kernel</code> run needs at least 8 GB free ram memory to avoid a broken modloop-image.<br />
* See <code>update-kernel --help</code> for options to manually add additional module or firmware packages.<br />
<br />
= Search for Packages =<br />
The '''search''' command searches the repository Index files for installable packages. <br />
<br />
The return format is '''Package'''-'''Version'''. Omit '''Version''' for ''apk add '''Package'''''<br />
<br />
Examples:<br />
* To list all packages available, along with their descriptions: {{cmd|apk search -v}}<br />
* To list all packages are part of the ACF system: {{cmd|apk search -v 'acf*' }}<br />
* To list all packages that list NTP as part of their description, use the ''-d'' or ''--description'' option: {{cmd|apk search -v --description 'NTP' }}<br />
<br />
= Information on Packages =<br />
<br />
== apk info ==<br />
<br />
The '''info''' command provides information on the contents of packages, their dependencies, and which files belong to a package.<br />
<br />
For a given package, each element can be chosen (for example, ''-w'' to show just the webpage information), or all information displayed with the ''-a'' command.<br />
<br />
Example: {{cmd|apk info -a zlib}}<br />
<br />
'''zlib-1.2.5-r1 description:'''<br />
A compression/decompression Library<br />
<br />
'''zlib-1.2.5-r1 webpage:'''<br />
<nowiki>http://zlib.net</nowiki><br />
<br />
'''zlib-1.2.5-r1 installed size:'''<br />
94208<br />
<br />
'''zlib-1.2.5-r1 depends on:'''<br />
libc0.9.32<br />
<br />
'''zlib-1.2.5-r1 is required by:'''<br />
libcrypto1.0-1.0.0-r0<br />
apk-tools-2.0.2-r4<br />
openssh-client-5.4_p1-r2<br />
openssh-5.4_p1-r2<br />
libssl1.0-1.0.0-r0<br />
freeswitch-1.0.6-r6<br />
atop-1.25-r0 <br />
<br />
'''zlib-1.2.5-r1 contains:'''<br />
lib/libz.so.1.2.5<br />
lib/libz.so.1<br />
lib/libz.so <br />
<br />
'''zlib-1.2.5-r1 triggers:'''<br />
<br />
As shown in the example you can determine<br />
* The '''description''' of the package (''-d'' or ''--description'')<br />
* The '''webpage''' where the application is hosted (''-w'' or ''--webpage'')<br />
* The '''size''' the package will require once installed (in bytes) (''-s'' or ''--size'')<br />
* What packages are required to use this one ('''depends''') (''-R'' or ''--depends'')<br />
* What packages require this one to be installed ('''required by''') (''-r'' or ''--rdepends'')<br />
* The '''contents''' of the package, that is, which files it installs (''-L'' or ''--contents'')<br />
* Any '''triggers''' this package sets. (''-t'' or ''--triggers'') Listed here are directories that are watched; if a change happens to the directory, then the trigger script is run at the end of the apk add/delete. For example, doing a depmod once after installing all packages that add kernel modules.<br />
<br />
{{Tip|The '''info''' command is also useful to determine which package a file belongs to. For example: {{cmd|apk info --who-owns /sbin/lbu}} will display<br />
<br />
/sbin/lbu is owned by alpine-conf-x.x-rx<br />
}}<br />
<br />
=== Listing installed packages ===<br />
<br />
To list all installed packages, use:<br />
<br />
<pre>apk info</pre><br />
<br />
To list all installed packages in alphabetical order, with a description of each, do:<br />
<br />
<pre>apk -vv info|sort</pre><br />
<br />
The apk tool does not have a subcommand to list manually-installed packages that do not have reverse dependencies. To get this information on a traditional system that is not using [[Alpine local backup|lbu]], try this script. Note that this approach will also list core packages like alpine-base that should not be removed.<br />
<br />
<pre>#!/bin/sh<br />
apk info | grep -ve '-doc$' | sort | while read pkg<br />
do<br />
rdep=`apk info -qr "$pkg"`<br />
[ -z "$rdep" ] && echo $pkg<br />
done</pre><br />
<br />
== apk policy ==<br />
<br />
To display the repository a package was installed from and will be updated from, plus any [[#Repository_pinning|tagged]] or enabled repositories where it is also offered, if any, for this architecture - its '''policy''':<br />
<br />
apk policy ''package''<br />
<br />
For example:<br />
<pre><br />
$ apk policy vlc<br />
vlc policy:<br />
2.2.6-r1:<br />
lib/apk/db/installed<br />
http://dl-3.alpinelinux.org/alpine/v3.7/community<br />
3.0.0_rc2-r1:<br />
@edgecommunity http://dl-3.alpinelinux.org/alpine/edge/community<br />
</pre><br />
<br />
= Additional apk Commands =<br />
In progress...<br />
<br />
= Local Cache =<br />
<br />
{{:Local_APK_cache}}<br />
<br />
= Advanced APK Usage =<br />
<br />
== Holding a specific package back ==<br />
<br />
In certain cases, you may want to upgrade a system, but keep a specific package at a back level. It is possible to add "sticky" or versioned dependencies. For instance, to hold the ''asterisk'' package to the 1.6.2 level or lower:<br />
{{cmd|1=apk add asterisk=1.6.0.21-r0}}<br />
or<br />
{{cmd|apk add 'asterisk<1.6.1'}}<br />
<br />
after which a {{cmd|apk upgrade}}<br />
<br />
will upgrade the entire system, keeping the asterisk package at the 1.6.0 or lower level<br />
<br />
To later upgrade to the current version,<br />
<br />
{{cmd|apk add 'asterisk>1.6.1'}}<br />
<br />
will ensure that 1.6.1 is the minimum version used.<br />
<br />
You can also use "fuzzy" version matching to pin the version to a major/minor release. For example:<br />
<br />
{{cmd|1=apk add 'asterisk=~1.6'}}<br />
<br />
will match any version of asterisk that starts with 1.6 (such as 1.6.0.21-r0 or 1.6.9.31-r9) <ref>[https://git.alpinelinux.org/apk-tools/commit/?id=693b4bcdb0f22904a521a7c8ac4f13e697dc4d71 Alpine source commit message]</ref><br />
<br />
If you desire deterministic, repeatable package installation (such as with containerized environments) via package pinning, it is important to understand your package repo's version retention rules. For example, most Alpine package repos contain an "edge" branch, which may drop package versions that are not deemed fit to make it into a stable branch. This means that pinning to a version on the edge branch may stop working after the package version is revoked from the repo. Always pin to a package version that is intended for your current Alpine Linux version.<br />
<br />
<br><br />
<br />
= Table of comparison with other Linux/Unix-like OSes for packages =<br />
<br />
{| class="wikitable"<br />
|-<br />
! OS !! File Format !! Tools<br />
|-<br />
| Alpine || .apk || apk<br />
|-<br />
| Debian || .deb || apt, aptitude, dpkg<br />
|-<br />
| Gentoo || .tbz2 || emerge<br />
|-<br />
| FreeBSD || .txz || pkg<br />
|}<br />
<br />
<br><br />
<br />
= Troubleshooting =<br />
<br />
== "apk-tools is old" == <br />
<br />
'''apk update''', '''apk upgrade''' or '''apk add''' may report the following: <br />
WARNING: This apk-tools is OLD! Some packages might not function properly<br />
<br />
This may happen if you are running Alpine Linux stable version with a certain edge/main, edge/community or testing package(s) also installed. One resolution is to consider upgrading {{pkg|apk-tools}}. If edge is already [https://wiki.alpinelinux.org/wiki/Alpine_Linux_package_management#Repository_pinning tagged] in your repositories, then try:<br />
<br />
<pre>sudo apk add --upgrade apk-tools@edge</pre><br />
<br />
= External Links =<br />
* [https://www.cyberciti.biz/faq/10-alpine-linux-apk-command-examples/ 10 Alpine Linux apk Command Examples] Vivek Gite 2019<br />
<br />
[[Category:Package Manager]]</div>Guest09248https://wiki.alpinelinux.org/w/index.php?title=Alpine_Package_Keeper&diff=21352Alpine Package Keeper2022-01-05T18:48:39Z<p>Guest09248: /* Table of comparison with other Linux/Unix-like OSes for packages */</p>
<hr />
<div><!--For searching: apk, APK--><br />
<br />
{{TOC right}}<br />
<br />
Because Alpine Linux is designed to run from RAM, package management involves two phases:<br />
* Installing / Upgrading / Deleting packages on a running system.<br />
* Restoring a system to a previously configured state (e.g. after reboot), including all previously installed packages and locally modified configuration files. '''(RAM-Based Installs Only)'''<br />
<br /><br />
'''apk''' is the tool used to install, upgrade, or delete software on a running system.<br /><br />
'''lbu''' is the tool used to capture the data necessary to restore a system to a previously configured state.<br />
<br />
This page documents the [https://git.alpinelinux.org/apk-tools/ apk tool] - See the [[Alpine_local_backup|Alpine Local Backup page]] for the lbu tool.<br />
<br />
= Overview =<br />
<br />
The '''apk''' tool supports the following operations:<br />
<br />
{|<br />
| [[#Add a Package|add]] <br />
| Add new packages or upgrade packages to the running system<br />
|-<br />
| [[#Remove a Package|del]]<br />
| Delete packages from the running system<br />
|-<br />
| fix <br />
| Attempt to repair or upgrade an installed package <br />
|-<br />
| [[#Update the Package list|update]] <br />
| Update the index of available packages<br />
|-<br />
| [[#Information on Packages|info]]<br />
| Prints information about installed or available packages<br />
|-<br />
| [[#Search for Packages|search]] <br />
| Search for packages or descriptions with wildcard patterns<br />
|-<br />
| [[#Upgrade a Running System|upgrade]]<br />
| Upgrade the currently installed packages<br />
|-<br />
| [[#Cache maintenance|cache]]<br />
| Maintenance operations for locally cached package repository<br />
|-<br />
| version <br />
| Compare version differences between installed and available packages<br />
|-<br />
| index <br />
| create a repository index from a list of packages<br />
|-<br />
| fetch <br />
| download (but not install) packages<br />
|-<br />
| audit <br />
| List changes to the file system from pristine package install state<br />
|-<br />
| verify <br />
| Verify a package signature<br />
|- <br />
| dot<br />
| Create a [http://graphviz.org/ graphviz] graph description for a given package<br />
|- <br />
| [[#apk_policy|policy]]<br />
| Display the repository that updates a given package, plus repositories that also offer the package<br />
|- <br />
| stats <br />
| Display statistics, including number of packages installed and available, number of directories and files, etc.<br />
|- <br />
| manifest<br />
| Display checksums for files contained in a given package<br />
|}<br />
<br />
= Packages and Repositories =<br />
<br />
Software packages for Alpine Linux are digitally signed tar.gz archives containing programs, configuration files, and dependency metadata. They have the extension <code>.apk</code>, and are often called "a-packs".<br />
<br />
The packages are stored in one or more ''repositories''. A repository is simply a directory with a collection of *.apk files. The directory must include a special index file, named {{Path|APKINDEX.tar.gz}} to be considered a repository.<br />
<br />
The '''apk''' utility can install packages from multiple repositories. The list of repositories to check is stored in {{Path|/etc/apk/repositories}}, one repository per line. If you booted from a USB stick ({{Path|/media/sda1}}) or CD-ROM ({{Path|/media/cdrom}}), your repository file probably looks something like this:<br />
<br />
{{Cat|/etc/apk/repositories|/media/sda1/apks/}}<br />
<br />
In addition to local repositories, the '''apk''' utility uses '''busybox wget''' to fetch packages using ''http:'', ''https:'' or ''ftp:'' protocols. The following is a valid repository file:<br />
<br />
{{Cat|/etc/apk/repositories|<br />
/media/sda1/apks<br />
http://dl-3.alpinelinux.org/alpine/v2.6/main<br />
https://dl-3.alpinelinux.org/alpine/v2.6/main<br />
ftp://dl-3.alpinelinux.org/alpine/v2.6/main<br />
}}<br />
<br />
{{Note| A list of public repositories is in [https://mirrors.alpinelinux.org/ mirrors.alpinelinux.org]. Accepted protocols vary.}}<br />
<br />
== Repository pinning ==<br />
<br />
You can specify additional "tagged" repositories in {{Path|/etc/apk/repositories}}:<br />
<br />
{{Cat|/etc/apk/repositories|<br />
http://nl.alpinelinux.org/alpine/v3.7/main<br />
http://nl.alpinelinux.org/alpine/v3.7/community<br />
@edge http://nl.alpinelinux.org/alpine/edge/main<br />
@edgecommunity http://nl.alpinelinux.org/alpine/edge/community<br />
@testing http://nl.alpinelinux.org/alpine/edge/testing<br />
}}<br />
<br />
After which you can "pin" dependencies to these tags using:<br />
<br />
{{cmd|apk add stableapp newapp@edge bleedingapp@testing}}<br />
<br />
Apk will now by default only use the untagged repositories, but adding a tag to specific package:<br />
<br />
1. will prefer the repository with that tag for the named package, even if a later version of the package is available in another repository<br />
<br />
2. ''allows'' pulling in dependencies for the tagged package from the tagged repository (though it ''prefers'' to use untagged repositories to satisfy dependencies if possible)<br />
<br />
== Commandline repository options ==<br />
<br />
By default, the '''apk''' utility will use the system repositories for all operations. This behavior can be overridden by the following options:<br />
<br />
{|<br />
| --repositories-file REPOFILE<br />
| Override the system repositories by specifying a repositories file.<br />
|-<br />
| <nowiki>-X|--repository REPO</nowiki><br />
| Specify a supplemental repository that will be used in addition to the system repositories. This option can be provided multiple times.<br />
|}<br />
<br />
= Update the Package list =<br />
<br />
Remote repositories change as packages are added and upgraded. To get the latest list of available packages, use the ''update'' command. The command downloads the {{Path|APKINDEX.tar.gz}} from each repository and stores it in the local cache, typically {{Path|/var/cache/apk/}}, {{Path|/var/lib/apk/}} or {{Path|/etc/apk/cache/}}.<br />
<br />
{{Cmd|apk update}}<br />
<br />
<!--<br />
fetch http://dl-3.alpinelinux.org/alpine/v2.1/main/APKINDEX.tar.gz<br />
--><br />
<br />
Adding the <code>--update-cache</code>, or for short <code>-U</code> switch to another apk command, as in <code>apk --update-cache upgrade</code> or <code>apk -U add ...</code>, the command has the same effect as first running <code>apk update</code> before the other apk command.<br />
<br />
{{Tip|With remote repositories, it is a good idea to always do an '''update''' right '''before''' doing an '''upgrade or add''' command. That way the command will install the latest available packages.}}<br />
<br />
= Add a Package =<br />
<br />
Use '''add''' to install packages from a repository. Any necessary dependencies are also installed. If you have multiple repositories, the '''add''' command installs the newest package.<br />
<br />
{{Cmd|apk add openssh<br />
apk add openssh openntp vim}}<br />
<br />
If you only have the main repository enabled in your configuration, apk will not include packages from the other repositories. To install a package from the edge/testing repository without changing your repository configuration file, use the command below. This will tell apk to use that particular repository.<br />
<br />
{{cmd|apk add cherokee --update-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing/ --allow-untrusted}}<br />
<br />
{{Note|Be careful when using third-party or the testing repository. Your system can go down.}}<br />
<br />
= Add a local Package =<br />
<br />
To install a locally available apk package, for example if this device has no internet access but you can upload apk packages directly to it, use the '''--allow-untrusted''' flag:<br />
<br />
{{cmd|apk add --allow-untrusted /path/to/file.apk}}<br />
<br />
Note that multiple packages can be given. When installing a local package, all dependencies should also be specified. For example:<br />
<br />
{{cmd|apk add --allow-untrusted /var/tig-2.2-r0.apk /var/git-2.11.1-20.apk}}<br />
<br />
= Remove a Package =<br />
Use '''del''' to remove a package (and dependencies that are no longer needed.) <br />
<br />
{{cmd|apk del openssh<br />
apk del openssh openntp vim}}<br />
<br />
= Upgrade a Running System =<br />
<br />
=== Packages in general ===<br />
<br />
To get the latest security upgrades and bugfixes available for the ''installed'' packages of a running system, first '''update''' the list of available packages and then '''upgrade''' the installed packages:<br />
<br />
{{cmd|apk update<br />
apk upgrade<br />
}}<br />
<br />
Or, combining the same into one single command:<br />
<br />
{{cmd|apk -U upgrade<br />
}}<br />
<br />
Here is an example, showing the procedure on a system that has several additional [[#Repository_pinning|repositories pinned]]:<br />
<br />
# apk update<br />
fetch <nowiki>http://dl-3.alpinelinux.org/alpine/v3.6/main/x86_64/APKINDEX.tar.gz</nowiki><br />
fetch <nowiki>http://dl-3.alpinelinux.org/alpine/v3.6/community/x86_64/APKINDEX.tar.gz</nowiki><br />
fetch <nowiki>http://dl-3.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz</nowiki><br />
fetch <nowiki>http://dl-3.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz</nowiki><br />
fetch <nowiki>http://dl-3.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz</nowiki><br />
v3.6.2-191-gf98d79930f <nowiki>[http://dl-3.alpinelinux.org/alpine/v3.6/main]</nowiki><br />
v3.6.2-190-ga5d68c47df <nowiki>[http://dl-3.alpinelinux.org/alpine/v3.6/community]</nowiki><br />
v3.6.0-4618-g0bf77c9821 <nowiki>[http://dl-3.alpinelinux.org/alpine/edge/main]</nowiki><br />
v3.6.0-4605-g85ed51dd83 <nowiki>[http://dl-3.alpinelinux.org/alpine/edge/community]</nowiki><br />
v3.6.0-4624-g11f1b9c8ab <nowiki>[http://dl-3.alpinelinux.org/alpine/edge/testing]</nowiki><br />
OK: 20118 distinct packages available<br />
<br />
# apk upgrade<br />
(1/2) Upgrading extra-cmake-modules@testing (5.38.0-r0 -> 5.39.0-r0)<br />
(2/2) Upgrading extra-cmake-modules-doc@testing (5.38.0-r0 -> 5.39.0-r0)<br />
Executing mdocml-apropos-1.14.1-r0.trigger<br />
OK: 2635 MiB in 803 packages<br />
<br />
To upgrade only ''specific'' packages, use the ''-u'' or ''--upgrade'' option of the '''add''' command:<br />
<br />
{{cmd|apk update<br />
apk add --upgrade busybox <br />
}}<br />
<br />
<br />
<br />
To enable unattended, automatic upgrades of packages, see the {{pkg|apk-autoupdate}} package.<br />
<br />
To upgrade to a newer release, refer to the corresponding release notes and [[Upgrading_Alpine]].<br />
<br />
=== Upgrading "diskless" and "data" disk mode installs ===<br />
<br />
If booting a "diskless" system from a read-only device, or iso image on writable media, it's not possible to update the boot files (kernel, modules, firmware, ...) that reside on that device.<br />
<br />
It becomes possible to update the boot files, though, if using a boot device that is writable and has been prepared with <code>[[Alpine_setup_scripts#setup-bootable|setup-bootable]]</code>.<br />
<br />
However, even then, the kernel, with its modules and firmware files, can still not be updated directly through regular packages updates. Instead, there is the <code>update-kernel</code> script that can generate initfs images and install them together with upgraded kernels.<br />
<br />
Upgrading can be done as follows.<br />
{{cmd|apk add mkinitfs<br />
}}<br />
This package is required for the generation of the initial filesystem used during boot.<br />
* Additional initfs features that are missing in the default configuration, like the [[Btrfs|btrfs]] filesystem support (at the time of writing, to allow loading .apkovl configs and package cache during boot), may be enabled in <code>/etc/mkinitfs/mkinitfs.conf</code>.<br />
* Available initfs features may be listed with <code>ls /etc/mkinitfs/features.d</code><br />
{{cmd|ls /etc/mkinitfs/features.d<br />
apk add nano<br />
nano /etc/mkinitfs/mkinitfs.conf<br />
lbu commit<br />
}}<br />
Finally update the kernel and its boot environment.<br />
{{cmd|update-kernel /media/sdXY/boot/<br />
}}<br />
* An <code>update-kernel</code> run needs at least 8 GB free ram memory to avoid a broken modloop-image.<br />
* See <code>update-kernel --help</code> for options to manually add additional module or firmware packages.<br />
<br />
= Search for Packages =<br />
The '''search''' command searches the repository Index files for installable packages. <br />
<br />
The return format is '''Package'''-'''Version'''. Omit '''Version''' for ''apk add '''Package'''''<br />
<br />
Examples:<br />
* To list all packages available, along with their descriptions: {{cmd|apk search -v}}<br />
* To list all packages are part of the ACF system: {{cmd|apk search -v 'acf*' }}<br />
* To list all packages that list NTP as part of their description, use the ''-d'' or ''--description'' option: {{cmd|apk search -v --description 'NTP' }}<br />
<br />
= Information on Packages =<br />
<br />
== apk info ==<br />
<br />
The '''info''' command provides information on the contents of packages, their dependencies, and which files belong to a package.<br />
<br />
For a given package, each element can be chosen (for example, ''-w'' to show just the webpage information), or all information displayed with the ''-a'' command.<br />
<br />
Example: {{cmd|apk info -a zlib}}<br />
<br />
'''zlib-1.2.5-r1 description:'''<br />
A compression/decompression Library<br />
<br />
'''zlib-1.2.5-r1 webpage:'''<br />
<nowiki>http://zlib.net</nowiki><br />
<br />
'''zlib-1.2.5-r1 installed size:'''<br />
94208<br />
<br />
'''zlib-1.2.5-r1 depends on:'''<br />
libc0.9.32<br />
<br />
'''zlib-1.2.5-r1 is required by:'''<br />
libcrypto1.0-1.0.0-r0<br />
apk-tools-2.0.2-r4<br />
openssh-client-5.4_p1-r2<br />
openssh-5.4_p1-r2<br />
libssl1.0-1.0.0-r0<br />
freeswitch-1.0.6-r6<br />
atop-1.25-r0 <br />
<br />
'''zlib-1.2.5-r1 contains:'''<br />
lib/libz.so.1.2.5<br />
lib/libz.so.1<br />
lib/libz.so <br />
<br />
'''zlib-1.2.5-r1 triggers:'''<br />
<br />
As shown in the example you can determine<br />
* The '''description''' of the package (''-d'' or ''--description'')<br />
* The '''webpage''' where the application is hosted (''-w'' or ''--webpage'')<br />
* The '''size''' the package will require once installed (in bytes) (''-s'' or ''--size'')<br />
* What packages are required to use this one ('''depends''') (''-R'' or ''--depends'')<br />
* What packages require this one to be installed ('''required by''') (''-r'' or ''--rdepends'')<br />
* The '''contents''' of the package, that is, which files it installs (''-L'' or ''--contents'')<br />
* Any '''triggers''' this package sets. (''-t'' or ''--triggers'') Listed here are directories that are watched; if a change happens to the directory, then the trigger script is run at the end of the apk add/delete. For example, doing a depmod once after installing all packages that add kernel modules.<br />
<br />
{{Tip|The '''info''' command is also useful to determine which package a file belongs to. For example: {{cmd|apk info --who-owns /sbin/lbu}} will display<br />
<br />
/sbin/lbu is owned by alpine-conf-x.x-rx<br />
}}<br />
<br />
=== Listing installed packages ===<br />
<br />
To list all installed packages, use:<br />
<br />
<pre>apk info</pre><br />
<br />
To list all installed packages in alphabetical order, with a description of each, do:<br />
<br />
<pre>apk -vv info|sort</pre><br />
<br />
The apk tool does not have a subcommand to list manually-installed packages that do not have reverse dependencies. To get this information on a traditional system that is not using [[Alpine local backup|lbu]], try this script. Note that this approach will also list core packages like alpine-base that should not be removed.<br />
<br />
<pre>#!/bin/sh<br />
apk info | grep -ve '-doc$' | sort | while read pkg<br />
do<br />
rdep=`apk info -qr "$pkg"`<br />
[ -z "$rdep" ] && echo $pkg<br />
done</pre><br />
<br />
== apk policy ==<br />
<br />
To display the repository a package was installed from and will be updated from, plus any [[#Repository_pinning|tagged]] or enabled repositories where it is also offered, if any, for this architecture - its '''policy''':<br />
<br />
apk policy ''package''<br />
<br />
For example:<br />
<pre><br />
$ apk policy vlc<br />
vlc policy:<br />
2.2.6-r1:<br />
lib/apk/db/installed<br />
http://dl-3.alpinelinux.org/alpine/v3.7/community<br />
3.0.0_rc2-r1:<br />
@edgecommunity http://dl-3.alpinelinux.org/alpine/edge/community<br />
</pre><br />
<br />
= Additional apk Commands =<br />
In progress...<br />
<br />
= Local Cache =<br />
<br />
{{:Local_APK_cache}}<br />
<br />
= Advanced APK Usage =<br />
<br />
== Holding a specific package back ==<br />
<br />
In certain cases, you may want to upgrade a system, but keep a specific package at a back level. It is possible to add "sticky" or versioned dependencies. For instance, to hold the ''asterisk'' package to the 1.6.2 level or lower:<br />
{{cmd|1=apk add asterisk=1.6.0.21-r0}}<br />
or<br />
{{cmd|apk add 'asterisk<1.6.1'}}<br />
<br />
after which a {{cmd|apk upgrade}}<br />
<br />
will upgrade the entire system, keeping the asterisk package at the 1.6.0 or lower level<br />
<br />
To later upgrade to the current version,<br />
<br />
{{cmd|apk add 'asterisk>1.6.1'}}<br />
<br />
will ensure that 1.6.1 is the minimum version used.<br />
<br />
You can also use "fuzzy" version matching to pin the version to a major/minor release. For example:<br />
<br />
{{cmd|1=apk add 'asterisk=~1.6'}}<br />
<br />
will match any version of asterisk that starts with 1.6 (such as 1.6.0.21-r0 or 1.6.9.31-r9) <ref>[https://git.alpinelinux.org/apk-tools/commit/?id=693b4bcdb0f22904a521a7c8ac4f13e697dc4d71 Alpine source commit message]</ref><br />
<br />
If you desire deterministic, repeatable package installation (such as with containerized environments) via package pinning, it is important to understand your package repo's version retention rules. For example, most Alpine package repos contain an "edge" branch, which may drop package versions that are not deemed fit to make it into a stable branch. This means that pinning to a version on the edge branch may stop working after the package version is revoked from the repo. Always pin to a package version that is intended for your current Alpine Linux version.<br />
<br />
<br><br />
<br />
== Table of comparison with other Linux/Unix-like OSes for packages ==<br />
<br />
{| class="wikitable"<br />
|-<br />
! OS !! File Format !! Tools<br />
|-<br />
| Alpine || .apk || apk<br />
|-<br />
| Debian || .deb || apt, aptitude, dpkg<br />
|-<br />
| Gentoo || .tbz2 || emerge<br />
|-<br />
| FreeBSD || .txz || pkg<br />
|}<br />
<br />
<br><br />
<br />
= Troubleshooting =<br />
<br />
== "apk-tools is old" == <br />
<br />
'''apk update''', '''apk upgrade''' or '''apk add''' may report the following: <br />
WARNING: This apk-tools is OLD! Some packages might not function properly<br />
<br />
This may happen if you are running Alpine Linux stable version with a certain edge/main, edge/community or testing package(s) also installed. One resolution is to consider upgrading {{pkg|apk-tools}}. If edge is already [https://wiki.alpinelinux.org/wiki/Alpine_Linux_package_management#Repository_pinning tagged] in your repositories, then try:<br />
<br />
<pre>sudo apk add --upgrade apk-tools@edge</pre><br />
<br />
= External Links =<br />
* [https://www.cyberciti.biz/faq/10-alpine-linux-apk-command-examples/ 10 Alpine Linux apk Command Examples] Vivek Gite 2019<br />
<br />
[[Category:Package Manager]]</div>Guest09248https://wiki.alpinelinux.org/w/index.php?title=Alpine_Package_Keeper&diff=21351Alpine Package Keeper2022-01-05T18:48:24Z<p>Guest09248: </p>
<hr />
<div><!--For searching: apk, APK--><br />
<br />
{{TOC right}}<br />
<br />
Because Alpine Linux is designed to run from RAM, package management involves two phases:<br />
* Installing / Upgrading / Deleting packages on a running system.<br />
* Restoring a system to a previously configured state (e.g. after reboot), including all previously installed packages and locally modified configuration files. '''(RAM-Based Installs Only)'''<br />
<br /><br />
'''apk''' is the tool used to install, upgrade, or delete software on a running system.<br /><br />
'''lbu''' is the tool used to capture the data necessary to restore a system to a previously configured state.<br />
<br />
This page documents the [https://git.alpinelinux.org/apk-tools/ apk tool] - See the [[Alpine_local_backup|Alpine Local Backup page]] for the lbu tool.<br />
<br />
= Overview =<br />
<br />
The '''apk''' tool supports the following operations:<br />
<br />
{|<br />
| [[#Add a Package|add]] <br />
| Add new packages or upgrade packages to the running system<br />
|-<br />
| [[#Remove a Package|del]]<br />
| Delete packages from the running system<br />
|-<br />
| fix <br />
| Attempt to repair or upgrade an installed package <br />
|-<br />
| [[#Update the Package list|update]] <br />
| Update the index of available packages<br />
|-<br />
| [[#Information on Packages|info]]<br />
| Prints information about installed or available packages<br />
|-<br />
| [[#Search for Packages|search]] <br />
| Search for packages or descriptions with wildcard patterns<br />
|-<br />
| [[#Upgrade a Running System|upgrade]]<br />
| Upgrade the currently installed packages<br />
|-<br />
| [[#Cache maintenance|cache]]<br />
| Maintenance operations for locally cached package repository<br />
|-<br />
| version <br />
| Compare version differences between installed and available packages<br />
|-<br />
| index <br />
| create a repository index from a list of packages<br />
|-<br />
| fetch <br />
| download (but not install) packages<br />
|-<br />
| audit <br />
| List changes to the file system from pristine package install state<br />
|-<br />
| verify <br />
| Verify a package signature<br />
|- <br />
| dot<br />
| Create a [http://graphviz.org/ graphviz] graph description for a given package<br />
|- <br />
| [[#apk_policy|policy]]<br />
| Display the repository that updates a given package, plus repositories that also offer the package<br />
|- <br />
| stats <br />
| Display statistics, including number of packages installed and available, number of directories and files, etc.<br />
|- <br />
| manifest<br />
| Display checksums for files contained in a given package<br />
|}<br />
<br />
= Packages and Repositories =<br />
<br />
Software packages for Alpine Linux are digitally signed tar.gz archives containing programs, configuration files, and dependency metadata. They have the extension <code>.apk</code>, and are often called "a-packs".<br />
<br />
The packages are stored in one or more ''repositories''. A repository is simply a directory with a collection of *.apk files. The directory must include a special index file, named {{Path|APKINDEX.tar.gz}} to be considered a repository.<br />
<br />
The '''apk''' utility can install packages from multiple repositories. The list of repositories to check is stored in {{Path|/etc/apk/repositories}}, one repository per line. If you booted from a USB stick ({{Path|/media/sda1}}) or CD-ROM ({{Path|/media/cdrom}}), your repository file probably looks something like this:<br />
<br />
{{Cat|/etc/apk/repositories|/media/sda1/apks/}}<br />
<br />
In addition to local repositories, the '''apk''' utility uses '''busybox wget''' to fetch packages using ''http:'', ''https:'' or ''ftp:'' protocols. The following is a valid repository file:<br />
<br />
{{Cat|/etc/apk/repositories|<br />
/media/sda1/apks<br />
http://dl-3.alpinelinux.org/alpine/v2.6/main<br />
https://dl-3.alpinelinux.org/alpine/v2.6/main<br />
ftp://dl-3.alpinelinux.org/alpine/v2.6/main<br />
}}<br />
<br />
{{Note| A list of public repositories is in [https://mirrors.alpinelinux.org/ mirrors.alpinelinux.org]. Accepted protocols vary.}}<br />
<br />
== Repository pinning ==<br />
<br />
You can specify additional "tagged" repositories in {{Path|/etc/apk/repositories}}:<br />
<br />
{{Cat|/etc/apk/repositories|<br />
http://nl.alpinelinux.org/alpine/v3.7/main<br />
http://nl.alpinelinux.org/alpine/v3.7/community<br />
@edge http://nl.alpinelinux.org/alpine/edge/main<br />
@edgecommunity http://nl.alpinelinux.org/alpine/edge/community<br />
@testing http://nl.alpinelinux.org/alpine/edge/testing<br />
}}<br />
<br />
After which you can "pin" dependencies to these tags using:<br />
<br />
{{cmd|apk add stableapp newapp@edge bleedingapp@testing}}<br />
<br />
Apk will now by default only use the untagged repositories, but adding a tag to specific package:<br />
<br />
1. will prefer the repository with that tag for the named package, even if a later version of the package is available in another repository<br />
<br />
2. ''allows'' pulling in dependencies for the tagged package from the tagged repository (though it ''prefers'' to use untagged repositories to satisfy dependencies if possible)<br />
<br />
== Commandline repository options ==<br />
<br />
By default, the '''apk''' utility will use the system repositories for all operations. This behavior can be overridden by the following options:<br />
<br />
{|<br />
| --repositories-file REPOFILE<br />
| Override the system repositories by specifying a repositories file.<br />
|-<br />
| <nowiki>-X|--repository REPO</nowiki><br />
| Specify a supplemental repository that will be used in addition to the system repositories. This option can be provided multiple times.<br />
|}<br />
<br />
= Update the Package list =<br />
<br />
Remote repositories change as packages are added and upgraded. To get the latest list of available packages, use the ''update'' command. The command downloads the {{Path|APKINDEX.tar.gz}} from each repository and stores it in the local cache, typically {{Path|/var/cache/apk/}}, {{Path|/var/lib/apk/}} or {{Path|/etc/apk/cache/}}.<br />
<br />
{{Cmd|apk update}}<br />
<br />
<!--<br />
fetch http://dl-3.alpinelinux.org/alpine/v2.1/main/APKINDEX.tar.gz<br />
--><br />
<br />
Adding the <code>--update-cache</code>, or for short <code>-U</code> switch to another apk command, as in <code>apk --update-cache upgrade</code> or <code>apk -U add ...</code>, the command has the same effect as first running <code>apk update</code> before the other apk command.<br />
<br />
{{Tip|With remote repositories, it is a good idea to always do an '''update''' right '''before''' doing an '''upgrade or add''' command. That way the command will install the latest available packages.}}<br />
<br />
= Add a Package =<br />
<br />
Use '''add''' to install packages from a repository. Any necessary dependencies are also installed. If you have multiple repositories, the '''add''' command installs the newest package.<br />
<br />
{{Cmd|apk add openssh<br />
apk add openssh openntp vim}}<br />
<br />
If you only have the main repository enabled in your configuration, apk will not include packages from the other repositories. To install a package from the edge/testing repository without changing your repository configuration file, use the command below. This will tell apk to use that particular repository.<br />
<br />
{{cmd|apk add cherokee --update-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing/ --allow-untrusted}}<br />
<br />
{{Note|Be careful when using third-party or the testing repository. Your system can go down.}}<br />
<br />
= Add a local Package =<br />
<br />
To install a locally available apk package, for example if this device has no internet access but you can upload apk packages directly to it, use the '''--allow-untrusted''' flag:<br />
<br />
{{cmd|apk add --allow-untrusted /path/to/file.apk}}<br />
<br />
Note that multiple packages can be given. When installing a local package, all dependencies should also be specified. For example:<br />
<br />
{{cmd|apk add --allow-untrusted /var/tig-2.2-r0.apk /var/git-2.11.1-20.apk}}<br />
<br />
= Remove a Package =<br />
Use '''del''' to remove a package (and dependencies that are no longer needed.) <br />
<br />
{{cmd|apk del openssh<br />
apk del openssh openntp vim}}<br />
<br />
= Upgrade a Running System =<br />
<br />
=== Packages in general ===<br />
<br />
To get the latest security upgrades and bugfixes available for the ''installed'' packages of a running system, first '''update''' the list of available packages and then '''upgrade''' the installed packages:<br />
<br />
{{cmd|apk update<br />
apk upgrade<br />
}}<br />
<br />
Or, combining the same into one single command:<br />
<br />
{{cmd|apk -U upgrade<br />
}}<br />
<br />
Here is an example, showing the procedure on a system that has several additional [[#Repository_pinning|repositories pinned]]:<br />
<br />
# apk update<br />
fetch <nowiki>http://dl-3.alpinelinux.org/alpine/v3.6/main/x86_64/APKINDEX.tar.gz</nowiki><br />
fetch <nowiki>http://dl-3.alpinelinux.org/alpine/v3.6/community/x86_64/APKINDEX.tar.gz</nowiki><br />
fetch <nowiki>http://dl-3.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz</nowiki><br />
fetch <nowiki>http://dl-3.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz</nowiki><br />
fetch <nowiki>http://dl-3.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz</nowiki><br />
v3.6.2-191-gf98d79930f <nowiki>[http://dl-3.alpinelinux.org/alpine/v3.6/main]</nowiki><br />
v3.6.2-190-ga5d68c47df <nowiki>[http://dl-3.alpinelinux.org/alpine/v3.6/community]</nowiki><br />
v3.6.0-4618-g0bf77c9821 <nowiki>[http://dl-3.alpinelinux.org/alpine/edge/main]</nowiki><br />
v3.6.0-4605-g85ed51dd83 <nowiki>[http://dl-3.alpinelinux.org/alpine/edge/community]</nowiki><br />
v3.6.0-4624-g11f1b9c8ab <nowiki>[http://dl-3.alpinelinux.org/alpine/edge/testing]</nowiki><br />
OK: 20118 distinct packages available<br />
<br />
# apk upgrade<br />
(1/2) Upgrading extra-cmake-modules@testing (5.38.0-r0 -> 5.39.0-r0)<br />
(2/2) Upgrading extra-cmake-modules-doc@testing (5.38.0-r0 -> 5.39.0-r0)<br />
Executing mdocml-apropos-1.14.1-r0.trigger<br />
OK: 2635 MiB in 803 packages<br />
<br />
To upgrade only ''specific'' packages, use the ''-u'' or ''--upgrade'' option of the '''add''' command:<br />
<br />
{{cmd|apk update<br />
apk add --upgrade busybox <br />
}}<br />
<br />
<br />
<br />
To enable unattended, automatic upgrades of packages, see the {{pkg|apk-autoupdate}} package.<br />
<br />
To upgrade to a newer release, refer to the corresponding release notes and [[Upgrading_Alpine]].<br />
<br />
=== Upgrading "diskless" and "data" disk mode installs ===<br />
<br />
If booting a "diskless" system from a read-only device, or iso image on writable media, it's not possible to update the boot files (kernel, modules, firmware, ...) that reside on that device.<br />
<br />
It becomes possible to update the boot files, though, if using a boot device that is writable and has been prepared with <code>[[Alpine_setup_scripts#setup-bootable|setup-bootable]]</code>.<br />
<br />
However, even then, the kernel, with its modules and firmware files, can still not be updated directly through regular packages updates. Instead, there is the <code>update-kernel</code> script that can generate initfs images and install them together with upgraded kernels.<br />
<br />
Upgrading can be done as follows.<br />
{{cmd|apk add mkinitfs<br />
}}<br />
This package is required for the generation of the initial filesystem used during boot.<br />
* Additional initfs features that are missing in the default configuration, like the [[Btrfs|btrfs]] filesystem support (at the time of writing, to allow loading .apkovl configs and package cache during boot), may be enabled in <code>/etc/mkinitfs/mkinitfs.conf</code>.<br />
* Available initfs features may be listed with <code>ls /etc/mkinitfs/features.d</code><br />
{{cmd|ls /etc/mkinitfs/features.d<br />
apk add nano<br />
nano /etc/mkinitfs/mkinitfs.conf<br />
lbu commit<br />
}}<br />
Finally update the kernel and its boot environment.<br />
{{cmd|update-kernel /media/sdXY/boot/<br />
}}<br />
* An <code>update-kernel</code> run needs at least 8 GB free ram memory to avoid a broken modloop-image.<br />
* See <code>update-kernel --help</code> for options to manually add additional module or firmware packages.<br />
<br />
= Search for Packages =<br />
The '''search''' command searches the repository Index files for installable packages. <br />
<br />
The return format is '''Package'''-'''Version'''. Omit '''Version''' for ''apk add '''Package'''''<br />
<br />
Examples:<br />
* To list all packages available, along with their descriptions: {{cmd|apk search -v}}<br />
* To list all packages are part of the ACF system: {{cmd|apk search -v 'acf*' }}<br />
* To list all packages that list NTP as part of their description, use the ''-d'' or ''--description'' option: {{cmd|apk search -v --description 'NTP' }}<br />
<br />
= Information on Packages =<br />
<br />
== apk info ==<br />
<br />
The '''info''' command provides information on the contents of packages, their dependencies, and which files belong to a package.<br />
<br />
For a given package, each element can be chosen (for example, ''-w'' to show just the webpage information), or all information displayed with the ''-a'' command.<br />
<br />
Example: {{cmd|apk info -a zlib}}<br />
<br />
'''zlib-1.2.5-r1 description:'''<br />
A compression/decompression Library<br />
<br />
'''zlib-1.2.5-r1 webpage:'''<br />
<nowiki>http://zlib.net</nowiki><br />
<br />
'''zlib-1.2.5-r1 installed size:'''<br />
94208<br />
<br />
'''zlib-1.2.5-r1 depends on:'''<br />
libc0.9.32<br />
<br />
'''zlib-1.2.5-r1 is required by:'''<br />
libcrypto1.0-1.0.0-r0<br />
apk-tools-2.0.2-r4<br />
openssh-client-5.4_p1-r2<br />
openssh-5.4_p1-r2<br />
libssl1.0-1.0.0-r0<br />
freeswitch-1.0.6-r6<br />
atop-1.25-r0 <br />
<br />
'''zlib-1.2.5-r1 contains:'''<br />
lib/libz.so.1.2.5<br />
lib/libz.so.1<br />
lib/libz.so <br />
<br />
'''zlib-1.2.5-r1 triggers:'''<br />
<br />
As shown in the example you can determine<br />
* The '''description''' of the package (''-d'' or ''--description'')<br />
* The '''webpage''' where the application is hosted (''-w'' or ''--webpage'')<br />
* The '''size''' the package will require once installed (in bytes) (''-s'' or ''--size'')<br />
* What packages are required to use this one ('''depends''') (''-R'' or ''--depends'')<br />
* What packages require this one to be installed ('''required by''') (''-r'' or ''--rdepends'')<br />
* The '''contents''' of the package, that is, which files it installs (''-L'' or ''--contents'')<br />
* Any '''triggers''' this package sets. (''-t'' or ''--triggers'') Listed here are directories that are watched; if a change happens to the directory, then the trigger script is run at the end of the apk add/delete. For example, doing a depmod once after installing all packages that add kernel modules.<br />
<br />
{{Tip|The '''info''' command is also useful to determine which package a file belongs to. For example: {{cmd|apk info --who-owns /sbin/lbu}} will display<br />
<br />
/sbin/lbu is owned by alpine-conf-x.x-rx<br />
}}<br />
<br />
=== Listing installed packages ===<br />
<br />
To list all installed packages, use:<br />
<br />
<pre>apk info</pre><br />
<br />
To list all installed packages in alphabetical order, with a description of each, do:<br />
<br />
<pre>apk -vv info|sort</pre><br />
<br />
The apk tool does not have a subcommand to list manually-installed packages that do not have reverse dependencies. To get this information on a traditional system that is not using [[Alpine local backup|lbu]], try this script. Note that this approach will also list core packages like alpine-base that should not be removed.<br />
<br />
<pre>#!/bin/sh<br />
apk info | grep -ve '-doc$' | sort | while read pkg<br />
do<br />
rdep=`apk info -qr "$pkg"`<br />
[ -z "$rdep" ] && echo $pkg<br />
done</pre><br />
<br />
== apk policy ==<br />
<br />
To display the repository a package was installed from and will be updated from, plus any [[#Repository_pinning|tagged]] or enabled repositories where it is also offered, if any, for this architecture - its '''policy''':<br />
<br />
apk policy ''package''<br />
<br />
For example:<br />
<pre><br />
$ apk policy vlc<br />
vlc policy:<br />
2.2.6-r1:<br />
lib/apk/db/installed<br />
http://dl-3.alpinelinux.org/alpine/v3.7/community<br />
3.0.0_rc2-r1:<br />
@edgecommunity http://dl-3.alpinelinux.org/alpine/edge/community<br />
</pre><br />
<br />
= Additional apk Commands =<br />
In progress...<br />
<br />
= Local Cache =<br />
<br />
{{:Local_APK_cache}}<br />
<br />
= Advanced APK Usage =<br />
<br />
== Holding a specific package back ==<br />
<br />
In certain cases, you may want to upgrade a system, but keep a specific package at a back level. It is possible to add "sticky" or versioned dependencies. For instance, to hold the ''asterisk'' package to the 1.6.2 level or lower:<br />
{{cmd|1=apk add asterisk=1.6.0.21-r0}}<br />
or<br />
{{cmd|apk add 'asterisk<1.6.1'}}<br />
<br />
after which a {{cmd|apk upgrade}}<br />
<br />
will upgrade the entire system, keeping the asterisk package at the 1.6.0 or lower level<br />
<br />
To later upgrade to the current version,<br />
<br />
{{cmd|apk add 'asterisk>1.6.1'}}<br />
<br />
will ensure that 1.6.1 is the minimum version used.<br />
<br />
You can also use "fuzzy" version matching to pin the version to a major/minor release. For example:<br />
<br />
{{cmd|1=apk add 'asterisk=~1.6'}}<br />
<br />
will match any version of asterisk that starts with 1.6 (such as 1.6.0.21-r0 or 1.6.9.31-r9) <ref>[https://git.alpinelinux.org/apk-tools/commit/?id=693b4bcdb0f22904a521a7c8ac4f13e697dc4d71 Alpine source commit message]</ref><br />
<br />
If you desire deterministic, repeatable package installation (such as with containerized environments) via package pinning, it is important to understand your package repo's version retention rules. For example, most Alpine package repos contain an "edge" branch, which may drop package versions that are not deemed fit to make it into a stable branch. This means that pinning to a version on the edge branch may stop working after the package version is revoked from the repo. Always pin to a package version that is intended for your current Alpine Linux version.<br />
<br />
<br><br />
<br />
===== Table of comparison with other Linux/Unix-like OSes for packages =====<br />
<br />
{| class="wikitable"<br />
|-<br />
! OS !! File Format !! Tools<br />
|-<br />
| Alpine || .apk || apk<br />
|-<br />
| Debian || .deb || apt, aptitude, dpkg<br />
|-<br />
| Gentoo || .tbz2 || emerge<br />
|-<br />
| FreeBSD || .txz || pkg<br />
|}<br />
<br />
<br><br />
<br />
= Troubleshooting =<br />
<br />
== "apk-tools is old" == <br />
<br />
'''apk update''', '''apk upgrade''' or '''apk add''' may report the following: <br />
WARNING: This apk-tools is OLD! Some packages might not function properly<br />
<br />
This may happen if you are running Alpine Linux stable version with a certain edge/main, edge/community or testing package(s) also installed. One resolution is to consider upgrading {{pkg|apk-tools}}. If edge is already [https://wiki.alpinelinux.org/wiki/Alpine_Linux_package_management#Repository_pinning tagged] in your repositories, then try:<br />
<br />
<pre>sudo apk add --upgrade apk-tools@edge</pre><br />
<br />
= External Links =<br />
* [https://www.cyberciti.biz/faq/10-alpine-linux-apk-command-examples/ 10 Alpine Linux apk Command Examples] Vivek Gite 2019<br />
<br />
[[Category:Package Manager]]</div>Guest09248https://wiki.alpinelinux.org/w/index.php?title=Installation&diff=21350Installation2022-01-05T18:43:56Z<p>Guest09248: /* Post-Install */</p>
<hr />
<div><br />
[[Image:hdd_mount.png|left|link=]]<br />
<br /><br />
<br />
<br />
<br />
<br />
This page explains the basics to get started. But before actually installing, it can also help to skim through the [[Alpine_Linux:FAQ| Frequenty Asked Questions (FAQ)]].<br />
<br />
{{Tip|This is a wiki!<br />
If something isn't correct (anymore), or still incomplete, you will have to try figuring it out, or ask for the correct solution in the [https://alpinelinux.org/community/ community].<br />
<br />
And then carefully edit the wiki page.<br />
<br />
Just as those before you did it for you.<br />
}}<br />
<br />
<br />
== Minimal Hardware Requirements ==<br />
<br />
* At least 100 MB of RAM. [A graphical desktop system may require up to 1 GB minimum.]<br />
* At least 0-700 MB space on a writable storage device. [Only required in "sys" or "data" mode installations (explained below). It is optional in "diskless" mode, only needed to save newer data and configurations states of a running system.]<br />
<br />
For more information please check [[Requirements]]<br />
<br />
== Installation Overview ==<br />
<br />
=== The general course of action ===<br />
{{Note|For single-board-computer (SBC) architectures which can not boot .iso images, see [[Alpine_on_ARM|Alpine on ARM]] for peculiarities.}}<br />
<br />
As usual, the regular installation procedure starts with three basic steps (additional details for all the steps follow [[Installation#additional details|below]]):<br><br />
<br />
# Downloading and verifying the proper [http://alpinelinux.org/downloads stable-release ISO installation image-file] for the computer's architecture, and the corresponding <code>sha256</code> (checksum) and <code>GPG</code> (signature) files. <br />
# Either burning the ISO image-file onto a blank CD/DVD/Blu-ray disk with disk burning software, or flashing the installation image onto a bootable storage device (USB-device, CF-/MMC-/SD-card, floppy, ...).<br />
# Booting the computer from the prepared disk or storage device.<br />
<br />
The boot process copies the entire operating system into the RAM memory, then runs it from there, after which, the command line environment does not depend on reading from the (possibly slow) initial boot media.<br />
<br />
Log-in is possible as the user <code>root</code>. Initially, the root user has no password.<br />
<br />
An interactive script named <code>[[Alpine_setup_scripts#setup-alpine|setup-alpine]]</code> is available at the command prompt to configure and install the initial Alpine Linux system.<br />
<br />
The <code>[[Alpine_setup_scripts#setup-alpine|setup-alpine]]</code> question-and-answer dialog can configure installations that boot into one of three different '''Alpinelinux disk modes''', '''"diskless"''', '''"data"''', and '''"sys"'''. These are explained in more detail in the following subsections. However, a newly installed system may always be configured into a fully usable, standalone, "diskless" live-system by runing <code>[[Alpine_setup_scripts#setup-alpine|setup-alpine]]</code> and answering "none" when asked for the disk to use, where to store configs, and the location for the package cache.<br />
<br />
Once a "diskless" system is configured by running <code>[[Alpine_setup_scripts#setup-alpine|setup-alpine]]</code>, it's possible to use the [[Alpine_Linux_package_management|apk package manager]] to install any desired tool that may be missing in the live system to configure available hardware.<br />
<br />
Specific hardware configuration may be desired, for example, for available disk drives. <br />
e.g. If you need to install a custom partition or filesystem scheme, and if the installation should not use and/or overwrite the entire disk ([[Installation#Custom_partitioning_of_the_harddisk|details below]]).<br />
<br />
After the desired adjustments have been made using the "diskless" system, <code>[[Alpine_setup_scripts#setup-lbu|setup-lbu]]</code> and <code>[[Alpine_setup_scripts#setup-apkcache|setup-apkcache]]</code> may be run to add persistent configuration and package cache storage to the running "diskless" system. After that, the system state may be saved with <code>[[Alpine_local_backup|lbu commit]]</code>. Or, <code>[[Alpine_setup_scripts#setup-disk|setup-disk]]</code> may be run to add a "data" mode partition, or do a classic full install of the "diskless" system onto a "sys" disk or partition.<br />
<br />
More [[Alpine_setup_scripts|setup-scripts]] are available to configure other specifics. They may be run separately to set up a system, or to adjust only specific parts later. For example, to set up a graphical environment (covered in [[Installation#Post-Install|Post-Install]] below).<br />
<br />
==='''Diskless Mode'''=== <br />
This is the default boot mode of the .iso images. <code>[[Alpine_setup_scripts#setup-alpine|setup-alpine]]</code> configures this if "disk=none" is selected during installation. It means the entire operating system and all applications are loaded into, then run from, RAM. This is extremely fast and can save on unnecessary disk spin-ups, power, and wear. It is similar to what is called a "frugal" install running with the "toram" option as with some other distros, but without the need to<br />
remaster the install media.<br />
<br />
Custom configurations and package selections may be preserved across reboots with the Alpine local backup tool <code>[[Alpine_local_backup|lbu]]</code>. It enables committing and reverting system states using .apkovl files that are saved to writable storage and loaded when booting. If additional or updated packages have been added to the system, these may also be made available for automatic (re)installation during the boot phase, by enabling a [[Alpine_Linux_package_management#Local_Cache|local package cache]] on the writable storage.<br />
<br />
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10473 FIXME-1]: Storing local configs and the package cache on an ''internal'' disk still requires [[Alpine_local_backup#Saving_and_loading_ISO_image_customizations|some manual steps]] to have the partition listed, i.e. making a /etc/fstab entry, mountpoint, and mount, *before* running setup-alpine. And requires manually committing the configuration to disk afterwards.]<br />
<br />
To allow for local backups, <code>setup-alpine</code> can be told to store the configs and the package cache on a writable partition. (Later, directories on that same partition or another available partition may also be mounted as /home, or for important applications, e.g. to keep their run-time and user data on it.)<br />
<br />
The boot device of the newly configured local "diskless" system may remain the initial (and possibly read-only) installation media. But it is also possible to copy the boot system to a partition (e.g. /dev/sdXY) with <code>[[Alpine_setup_scripts#setup-bootable|setup-bootable]]</code>.<br />
<br />
==='''Data Disk Mode'''=== <br />
This mode also runs from system RAM, thus it enjoys the same accelerated operation speed as "diskless" mode. However, swap storage and the entire {{Path|/var}} directory tree get mounted from a persistent storage device (two newly created partitions). The directory {{Path|/var}} holds e.g. all log files, mailspools, databases, etc., as well as <code>[[Alpine_local_backup|lbu]]</code> backup commits and the package cache. This mode is useful for having RAM accelerated servers with variable amounts of user-data that exceed the available RAM size. It enables the entire current system state (not just the boot state) to survive a system crash in accordance with the particular filesystem guarantees. <br />
<br />
[[https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10474 FIXME-2]]: Setup-alpine will create the data partition and mount it as /var, but can not yet configure lbu storage settings automatically. It is currently necessary to select "none" at the 'where to store configs' prompt (the new data partition is not listed) and configure lbu manually. For example, after running <code>setup-alpine</code> and before rebooting:<br />
<br />
# Set LBU_MEDIA=sdXY in /etc/lbu/lbu.conf<br />
# Execute a corresponding <code>echo "/dev/sdXY /media/sdXY <fstype> rw 0 0" >> /etc/fstab</code><br />
# Save the configuration for the next boot with <code>lbu commit</code>.<br />
<br />
In data disk mode, the boot device may also remain the initial (and possibly read-only) installation media, or be copied to a partition (e.g. /dev/sdXY) with <code>[[Alpine_setup_scripts#setup-bootable|setup-bootable]]</code>.<br />
<br />
==='''System Disk Mode'''=== <br />
This is a traditional hard-disk install.<br />
<br />
If this mode is selected, the <code>[[setup-alpine]]</code> script creates three partitions on the selected storage device, {{Path|/boot}}, {{Path|swap}} and {{Path|/}} (the filesystem root). This mode may, for example, be used for generic [[Desktops|desktop]] and development machines.<br />
<br />
For custom partitioning, see [[Setting_up_disks_manually]].<br />
<br />
To install along side another operating systems, see [[Installing_Alpine_on_HDD_dualbooting]].<br />
<br />
== Additional Details ==<br />
<br />
{{Expand| }}<br />
<br />
This "Additional Details" section needs to be consolidated with the work at '''[https://docs.alpinelinux.org https://docs.alpinelinux.org] (not finished)''' <br />
(Restructuring things there, moving and linking from here or there?). <br />
<br />
<br />
=== Verifying the downloaded image-file ===<br />
<br />
{| class="wikitable" style="width:95%; align=center"<br />
|+ Commands to verify the checksum and GPG signature of a downloaded image-file on different systems.<br />
|-<br />
! width=100px | OS type<br />
! <code>SHA256</code> check !! <code>SHA256</code> calculation (to be compared manually) !! <code>GPG</code> signature verification<br />
|-<br />
! Linux<br />
| <code>sha256sum -c alpine-*.iso.sha256</code> || || <code>curl https://alpinelinux.org/keys/ncopa.asc &#124; gpg --import ;</code><br />
<code> gpg --verify alpine-<version>.iso.asc alpine-<version>.iso</code><br />
|-<br />
! MACOS <br />
| - ? - || <code>shasum -a 256 alpine-*.iso</code> || - ? -<br />
|-<br />
! OpenBSD <br />
| <code>sha256 -C alpine-*.sha256 alpine-*.iso</code> || || <code>doas pkg_add gnupg;<br />
ftp -o - https://alpinelinux.org/keys/ncopa.asc &#124; gpg --import ;<br />
gpg --verify alpine-<version>.iso.asc alpine-<version>.iso</code><br />
|-<br />
! FreeBSD <br />
| - ? - || <code>/usr/local/bin/shasum -a 256 alpine-*.iso</code> || - ? -<br />
|-<br />
! NetBSD <br />
| - ? - || <code>/usr/local/bin/shasum -a 256 alpine-*.iso</code> || - ? -<br />
|-<br />
! Windows (PowerShell installed)<br />
| - ? - || <code>Get-FileHash .\alpine-<image-version>.iso -Algorithm SHA256</code> || - ? -<br />
|}<br />
<br />
=== Flashing (direct data writing) the installation image-file onto a device or media ===<br />
<br />
==== Unix/Linux ====<br />
<br />
Under Unix (and thus Linux), "everything is a file" and the data in the image-file can be written to a device or media with the <code>dd</code> command. Afterward, executing the <code>eject</code> command removes the target device from the system and ensures the write cache is completely flushed.<br />
<br />
dd if=<iso-file-to-read-in> of=<target-device-node-to-write-out-to> bs=4M oflag=sync status=progress; eject <target-device-node-to-write-to><br />
<br />
Be careful to correctly identify the target device as any data on it '''will''' be lost! All connected "bulk storage devices" can be listed with <code><nowiki>lsblk</nowiki></code> and <code><nowiki>blkid</nowiki></code>.<br />
<br />
# lsblk<br />
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT<br />
sdX 0:0 0 64,0G 0 disk <br />
├─sdX1 0:1 0 2G 0 part <br />
└─sdX2 0:2 0 30G 0 part /mnt/sdX2<br />
<br />
# blkid<br />
/dev/sdX1: LABEL="some" UUID="..." TYPE="vfat"<br />
/dev/sdX2: LABEL="other" UUID="..." TYPE="ext4"<br />
<br />
For example, if /dev/sdX is the desired target device, first make sure you un-mount all mounted partitions of the target device. For example sdX1 and sdX2:<br />
<br />
umount /dev/sdX1 /dev/sdX2<br />
<br />
<br />
For <code>dd</code>'s output-file (<code>of=</code>), however, do '''not''' specify a partition number. For example, write to sdX, '''not''' sdX1:<br />
<br />
Warning: '''This will overwrite the target device /dev/sdX''', so before executing, make sure you have a backup of the data if you can't afford to lose it.<br />
<br />
dd if=~/Downloads/alpine-standard-3.00.0-x86_64.iso of=/dev/sdX bs=4M oflag=sync status=progress; eject /dev/sdX<br />
<br />
==== Windows ====<br />
<br />
For example, there is the [https://rufus.ie/ Rufus] program. Rufus will enable you to create bootable USB flash drives under Windows. <br />
<br />
Rufus has been tested and works for Alpine Linux 3.12.x with the following settings:<br />
* '''Partition scheme''': <code>MBR</code><br />
* '''Target system''': <code>BIOS or UEFI</code><br />
* '''File system''': <code>FAT32</code><br />
* '''Cluster size''': <code>4096 bytes (default)</code><br />
<br />
=== Verifying the written installation media ===<br />
<br />
After detaching and re-attaching the device, a bit-wise comparison can verify the data written to the device (instead of just data buffered in RAM). If the comparison terminates with an end-of-file error on the .iso file side, all the contents from the image have been written (and re-read) successfully:<br />
<br />
# cmp ~/Downloads/alpine-standard-3.00.0-x86_64.iso /dev/sdX<br />
cmp: EOF on alpine-standard-3.00.0-x86_64.iso<br />
<br />
=== Booting from external devices ===<br />
<br />
Insert the boot media to a proper drive or port of the computer and turn the machine on, or restart it, if already running.<br />
<br />
If the computer does not automatically boot from the desired device, one needs to bring up the boot menu and choose the media to boot from. Depending on the computer, the menu may be accessed by repeatedly pressing a key quickly when booting starts. Some computers require that you press the button ''before'' starting the computer and hold it down while the computer boots. Typical keys are: `F9`-`F12`, sometimes `F7` or `F8`. If these don't bring up the boot menu, it may be necessary to enter the BIOS configuration and adjust the boot settings, for which typical keys are: `Del.` `F1` `F2` `F6` or `Esc.`<br />
<br />
=== Custom partitioning of the harddisk ===<br />
<br />
It is possible to specify configurations for RAID, encryption, LVM, etc. as well as manual partitioning.<br />
<br />
For "diskless" or "data disk" mode installs, manual partitioning may be needed to prepare the harddisk for committing local backups of the system state with <code>[[Alpine_local_backup|lbu commit]]</code>, a package cache, or to use it as the /var mount. <br />
<br />
For a "sys" install, custom partitioning is needed only if the desired scheme differs from overwriting an entire disk, or creating the default /boot, swap and root partitions.<br />
<br />
See [[Setting_up_disks_manually]] for the alpine options for RAID, encryption, LVM, etc. and manual partitioning.<br />
<br />
=== Questions asked by <code>setup-alpine</code> ===<br />
[[File:Installation-alpine-alpine-setup-3-setup-scripts.png|350px|thumb|right|Example <code>setup-alpine</code> session]]<br />
<br />
The <code>[[setup-alpine]]</code> script offers the following configuration options:<br />
<br />
* '''Keyboard Layout''' (Local keyboard language and usage mode, e.g. ''us'' and variant of ''us-nodeadkeys''.)<br />
* '''Hostname''' (The name for the computer.)<br />
* '''Network''' (For example, automatic IP address discovery with the "DHCP" protocol.)<br />
* '''DNS Servers''' (Domain Name Servers to query. For privacy reasons it is NOT recommended to route every local request to servers like google's <s>8.8.8.8</s> .)<br />
* '''Timezone'''<br />
* '''Proxy''' (Proxy server to use for accessing the web. Use "none" for direct connections to the internet.)<br />
* '''Mirror''' (From where to download packages. Choose the organization you trust giving your usage patterns to.)<br />
* '''SSH''' (Secure SHell remote access server. "Openssh" is part of the default install image. Use "none" to disable remote login, e.g. on laptops.)<br />
* '''NTP''' (Network Time Protocol client used for keeping the system clock in sync with a time server. Package "chrony" is part of the default install image.)<br />
* '''Disk Mode''' (Select between diskless (disk="none"), "data" or "sys", as described above.) <br />
{{Warning|The data on a chosen device will be overwritten!}}<br />
<br />
=== Preparing for the first boot ===<br />
<br />
If <code>setup-alpine</code> has finished configuring the "sys" disk mode, the system should be ready to reboot right away (see next subsection).<br />
<br />
If the new local system was configured to run in "diskless" or "data" mode, and you do not want keep booting from the initial (and possibly read-only) installation media, the boot system needs to be copied to another device or partition.<br />
<br />
The target partition may be identified using <code><nowiki>lsblk</nowiki></code> (after installing it with <code>apk add lsblk</code>) and/or <code>blkid</code>, similar to previously identifying the initial installation media device.<br />
<br />
The procedure to copy the boot system is explained at <code>[[Alpine_setup_scripts#setup-bootable|setup-bootable]]</code><br />
<br />
Once everything is in place, save your customized configuration with <code>lbu commit</code> before rebooting.<br />
<br />
=== Rebooting and testing the new system ===<br />
<br />
First, remove the initial installation media from the boot drive, or detach it fron the port it's connected to.<br />
<br />
The system may now be power-cycled or rebooted to confirm everything is working correctly.<br />
<br />
The relevant commands for this are <code>poweroff</code> or <code>reboot</code>.<br />
<br />
=== Completing the installation ===<br />
<br />
The installation script installs only the base operating system. '''No''' applications e.g. web server, mail server, desktop environment, or web browser are installed, and <code>root</code> is the only user.<br />
<br />
Please look under "Post-Install" below, for some common things to do after installation.<br />
<br />
= Additional Documentation =<br />
<br><br />
<br />
{{Note|A [[Post installation|Post Installation]] wiki page has been created and some of this information may be moved there in the future, if you would like to help with this process please go ahead.}}<br />
<br />
<br><br />
=== Installing ===<br />
<br />
* [[Kernels]] ''(kernel selection, e.g. for VMs or RPi)''<br />
* [[Directly booting an ISO file]] ''(without flashing it to a disk or device)''<br />
* [[Dualbooting|Dual/multi-boot install to HDD partition]]<br />
* [[Tutorials_and_Howtos#Networking|Setting up Networking]] ''(including non-standard configurations)''<br />
<br><br />
* [[How to make a custom ISO image with mkimage]] ''(installation media with its own configuration)''<br />
<br />
=== [[Post installation|Post-Install]] ===<br />
<br />
<!-- If you edit post-install, also consider [[Tutorials_and_Howtos#Post-Install]], [[Developer_Documentation#Package_management]] and the Handbook.<br />
Here, only the most relevant jumping off points are listed, not exact list duplicates!!! --><br />
<br />
<br />
<br><br />
* [[Setting up a new user]] ''(to allow remote, console, or graphical logins)''<br />
<br><br />
* [[Enable Community Repository]] ''(access to additional packages)''<br />
* [[Alpine Linux package management|Package Management (apk)]] ''(how to search/add/del packages etc.)''<br />
* [[Alpine setup scripts#setup-xorg-base|<code>setup-xorg-base</code>]] ''(setup graphical base environment)''<br />
** [[Xfce_Setup]] / [[Gnome_Setup]] / [[KDE]] / [[MATE]] (desktop environments)<br />
* [[How to get regular stuff working]] ''(things one may miss in a too lightweight installation )''<br />
<br><br />
* [[Alpine_local_backup|Local backup utility <code>lbu</code>]] ''(persisting RAM system configurations)''<br />
** [[Back Up a Flash Memory Installation]] ''("diskless mode" systems)''<br />
** [[Manually_editing_a_existing_apkovl]] ''(the stored custom configs)''<br />
<br><br />
* [[Alpine Linux Init System|Init System (OpenRC)]] ''(configure a service to automatically boot at next reboot)''<br />
** [[Multiple Instances of Services]]<br />
** [[Writing Init Scripts]]<br />
<br><br />
* [[Hosting services on Alpine]] ''(links to several mail/web/ssh server setup pages)''<br />
* Running applications and services in their own [[Firejail Security Sandbox]]<br />
<br><br />
* [[Alpine_Linux_package_management#Upgrade_a_Running_System|Upgrading Alpine]] ''(checking for and installing updates)''<br />
<br />
=== Additional Help and Information ===<br />
<br />
* [[Comparison with other distros]] ''(how common things are done on Alpine)''<br />
* [[Running glibc programs]] ''(installation and development)''<br />
<br />
<!-- * [[setup-acf]] ''(configures ACF (webconfiguration) so you can manage your box through https)''<br />
* [[Changing passwords for ACF|Changing passwords]]<br />
--><br />
<br />
* [[FAQ|FAQs]]<br />
* [[Tutorials and Howtos]]<br />
<br />
* [[Contribute|How to Contribute]]<br />
* [[Developer Documentation]]<br />
* [[Alpine_Linux:Wiki_etiquette|Wiki etiquette]] ''to collaborate on this documentation''<br />
<br />
<br />
<br />
{{Tip| Alpine linux packages stay close to the upstream design. Therefore, all upstream documentation about configuring a software package, as well as good configuration guides from other distributions that stay close to upstream, e.g. those in the [https://wiki.archlinux.org/ Arch Wiki], are to a large degree, also applicable to configuring the software on alpine linux, thus can be very useful.}}<br />
<br />
= Other Guides =<br />
<br />
Please check the: [[[https://wiki.alpinelinux.org/wiki/Category:Installation Installation Category]]] pages.<br />
<br />
[[Category:Installation]]</div>Guest09248