Alpine Linux: Difference between revisions

Content deleted Content added
Version history: updated version history; could not find what kernel version 3.7.0 ships with
Cleanup
Tags: Mobile edit Mobile web edit Advanced mobile edit
 
(271 intermediate revisions by more than 100 users not shown)
Line 1:
{{short description|Linux distribution based on musl and BusyBox}}
{{Use dmy dates|date=June 2025}}
{{Infobox OS
| name = Alpine Linux
| logo = Alpine Linux.svg{{!}}class=skin-invert
| screenshot =
| caption =
| developer = Alpine Linux development team
| caption =
| family = [[Linux]] ([[Unix-like]])
| developer = Alpine Linux development team
| working state = Active
| family = [[Unix-like]]
| source model = [[Open-source software|Open source]]
| working state = Active
| released = {{Start date and age|2005|08|df=yes}}<ref name="sf-history"/>
| source model = [[Open-source model|Open source]]
| latest release version = {{wikidata|property|reference|P348}}
| released =
| latest release versiondate = 3.7.0{{start date and age|{{wikidata|qualifier|P348|P577}}}}
| marketing target = General-purpose. Security, embedded systems and other resource-constrained systems, such as containers.<ref name="about">{{Cite web |title=about &#124; Alpine Linux |url=https://alpinelinux.org/about/ |website=alpinelinux.org}}</ref>
| latest release date = {{Start date and age|2017|11|30|df=yes}}<ref>{{cite web |url=https://alpinelinux.org/posts/Alpine-3.7.0-released.html |title=Alpine Linux 3.7.0 released |website=Alpine Linux |publisher=Alpine Linux Development Team |date=2017-11-30 |accessdate=2017-12-01}}</ref>
| language = [[Multilingualism|Multilingual]]
| marketing target = Developers, power users
| package manager = APK ''(Alpine Package Keeper)''<ref name="apk">{{Cite web |title=Alpine Package Keeper |url=https://wiki.alpinelinux.org/wiki/Alpine_Package_Keeper |website=wiki.alpinelinux.org}}</ref>
| language = [[Multilingualism|Multilingual]]
| supported platforms = {{Plain list|
| package manager = APK
* [[x86]]
| supported platforms = [[x86]], [[x86-64]], [[ARMhf]], [[AArch64]]
* [[x86-64]]
| kernel type = [[Monolithic kernel|Monolithic]] ([[Linux kernel|Linux]])
* [[ARMhf]]
| userland = [[BusyBox]] ([[GNU Core Utilities]] are optional)
* [[ARMv7]]
| ui = [[Command-line interface]]
* [[AArch64]]
| license =
* [[ppc64le]]
| website = {{URL|https://alpinelinux.org}}
* [[s390x]]
| latest test version = Edge
* [[LoongArch]]
| latest test date = Current ([[Rolling release]])
* [[RISC-V|riscv64]]
| frequently updated = yes
}}
| APK (command line frontend)
| kernel type = [[Monolithic kernel|Monolithic]] ([[Linux kernel|Linux]])
| userland = [[BusyBox]]
| ui = [[Almquist shell#Embedded Linux|Ash]]
| license =
| website = {{URL|https://alpinelinux.org}}
}}
 
'''Alpine Linux''' is a [[Linux distribution]] designed to be small, simple, and secure.<ref name="about">{{Cite web |title=about &#124; Alpine Linux |url=https://alpinelinux.org/about/ |website=alpinelinux.org}}</ref> It uses [[musl]], [[BusyBox]], and [[OpenRC]] instead of the more commonly used [[glibc]], [[GNU Core Utilities]], and [[systemd]].<ref name="linuxbsdos">{{Cite web|url=https://linuxbsdos.com/2010/08/23/alpine-linux-2-review/|title=Alpine Linux 2 review &#124; LinuxBSDos.com|first=GigaTux|last=says|date=24 August 2010}}</ref><ref name="softpedia">[https://news.softpedia.com/news/security-oriented-alpine-linux-3-7-has-uefi-support-grub-support-in-installer-518820.shtml Security-Oriented Alpine Linux 3.7 Has UEFI Support, GRUB Support in Installer], ''Softpedia News''</ref><ref name="fossbytes">[https://fossbytes.com/secure-linux-distros-privacy-anonymity/ 10 Most Secure Linux Distros For Complete Privacy & Anonymity | 2017 Edition], ''FossBytes''</ref><ref name="networkworld">{{Cite web|url=https://www.networkworld.com/article/3031762/is-docker-ditching-ubuntu-linux-confusion-reigns.html|title=Is Docker ditching Ubuntu Linux? Confusion reigns|first=Katherine|last=Noyes|date=9 February 2016|website=Network World}}</ref><ref>{{Cite web |title=OpenRC - Alpine Linux |url=https://wiki.alpinelinux.org/wiki/OpenRC |website=wiki.alpinelinux.org}}</ref> This makes Alpine one of few Linux distributions not to be based on the GNU Core Utilities or glibc.<ref>{{Cite web |title=What is Alpine Linux? {{!}} Definition from TechTarget |url=https://www.techtarget.com/searchitoperations/definition/Alpine-Linux |access-date=24 November 2023 |website=IT Operations |language=en}}</ref>
'''Alpine Linux''' is a [[Linux distribution]] based on [[musl]] and [[BusyBox]], primarily designed for "[[power user]]s who appreciate security, simplicity and resource efficiency". It uses a hardened kernel and compiles all [[user space]] binaries as [[position-independent executable]]s with [[stack-smashing protection]].<ref name="about">{{URL|//alpinelinux.org/about}}</ref>
 
For security, Alpine compiles all [[user space|user-space]] binaries as [[position-independent executable]]s with [[stack-smashing protection]].<ref>{{Cite web |title=Alpine Linux official website under Secure section. |url=https://alpinelinux.org/about/ |website=alpinelinux.org/}}</ref>
A fork of the distribution, [[postmarketOS]], is designed to run on mobile devices.
== History ==
Originally, Alpine Linux began as a fork of the [[LEAF Project|LEAF project]].<ref>{{cite web|url=http://osdir.com/ml/linux.leaf.devel/2005-08/msg00039.html|title=linux.leaf.devel - Re: [leaf-devel] 2.6.x kernel support? - msg#00039 - Recent Discussion OSDir.com|publisher=}}</ref> The members of LEAF wanted to continue making a Linux distribution that could fit on a single floppy disk, whereas the Alpine Linux wished to include some more heavyweight packages such as [[Squid (software)|Squid]] and [[Samba (software)|Samba]], as well as additional security features and a newer kernel. One of the original goals was to create a framework for larger systems; although usable for this purpose, this is no longer a primary goal.{{citation needed|date=November 2015}}
 
Because of its small size and rapid startup, it is commonly used in [[Operating-system-level virtualization|containers]] providing quick boot-up times,<ref name="thenewstack">{{Cite web|url=https://thenewstack.io/alpine-linux-heart-docker/|title=Meet Alpine Linux, Docker's Distribution of Choice for Containers|date=28 March 2017}}</ref><ref name="infoworld">{{Cite web|url=https://www.infoworld.com/article/3206644/review-alpine-linux-is-made-for-docker.html|title=Review: Alpine Linux is made for Docker|date=10 July 2017|website=InfoWorld}}</ref> on [[virtual machine]]s as well as on real hardware in [[Embedded system|embedded devices]], such as [[Router (computing)|routers]], [[Server (computing)|servers]] and [[Network-attached storage|NAS]].{{Citation needed|date=May 2023}}
=== Version history ===
<!-- Template:Version - for version & release history. Documentation and examples: http://en.wikipedia.org/wiki/Template:Version -->
{| class="wikitable" style="text-align:center; margin-left:1em; margin-right:0"
|-
! Version !! Release date<ref>https://alpinelinux.org/posts/ Alpine Linux News archive</reF> !! End-of-life date<ref> https://wiki.alpinelinux.org/wiki/Alpine_Linux:Releases Alpine Linux:Releases</ref> !! Kernel release
|-
| {{Version |o |3.2}}
| 2015-05-26
| 2017-05-01
| 3.18.xx
|-
| {{Version |o |3.3}}
| 2016-01-06
| 2017-11-01
| 4.1.xx
|-
| {{Version |co |3.4}}
| 2016-05-31
| 2018-05-01
| 4.4.xx
|-
| {{Version |co |3.5}}
| 2016-12-22
| 2018-11-01
| 4.4.xx
|-
| {{Version |co |3.6}}
| 2017-05-24
| 2019-05-01
| 4.9.xx
|-
| {{Version |c |3.7}}
| 2017-11-30
| 2019-11-01
| 4.9.xx
|-
| {{Version |cp |edge}}
| rolling
| {{N/A}}
| {{N/A}}
|-
| colspan="4" | <small>{{Version |l |show=111110}}</small>
|}
 
== Features History==
Originally, Alpine Linux began as an embedded-first distribution for devices such as [[wireless router]]s, based on [[Gentoo Linux]],<ref>{{cite web|url=https://sourceforge.net/p/leaf/mailman/message/12731262/|title=Re: [leaf-devel] 2.6.x kernel support?|website=SourceForge}}</ref> inspired by {{Tooltip|GNAP|Gentoo Network Appliance Project}} and the Bering-uClibc branch of the [[LEAF Project]].<ref name="sf-history">{{cite web|url=https://sourceforge.net/p/leaf/mailman/message/12731159/|title=Re: [leaf-devel] 2.6.x kernel support?|website=SourceForge}}</ref> Founder Natanael Copa has said that the name was chosen as a [[backronym]] for "A Linux-Powered Network Engine" or some such similar phrase, but that the exact phrase has since been forgotten.<ref name=":0">{{Citation |title=Small, Simple, and Secure: Alpine Linux under the Microscope | date=3 November 2017 |url=https://www.youtube.com/watch?v=sIG2P9k6EjA |access-date=30 June 2023 |language=en}}</ref>
* [[Package management]]: Alpine uses its own package management system, apk-tools,<ref>{{cite web|url=http://wiki.alpinelinux.org/wiki/Alpine_Linux_package_management|title=Alpine Linux package management|publisher=}}</ref> which originally was a collection of [http://sourceforge.net/projects/apk-tools/ shell scripts] but was later [http://git.alpinelinux.org/cgit/apk-tools.git/ rewritten] in C. Alpine currently contains most commonly used packages such as [[GNOME]], [[Xfce]], [[Firefox]], and others. Typical package installation times are between 1 and a few seconds.
* [[RAM drive|Running from RAM]]: Alpine Linux can be installed as a run-from-RAM distribution. The LBU (Alpine Local Backup)<ref>{{cite web|url=http://wiki.alpinelinux.org/wiki/Alpine_local_backup|title=Alpine local backup|publisher=}}</ref> tool optionally allows all configuration files to be backed up to an APK overlay file (usually shortened to ''apkovl''), a tar.gz file that by default stores a copy of all changed files in /etc (with the option to add more directories). This allows Alpine to work reliably in demanding embedded environments or to (temporarily) survive partial disk failures as sometimes experienced in public cloud environments.
* Security: A hardened kernel is included in the default Alpine Linux kernel, which aids in reducing the impact from exploits similar to the [[vmsplice() local root exploit]]. All packages are also compiled with stack-smashing protection to help mitigate the effects of userland [[buffer overflow]]s.
* Networking: Alpine Linux is the only distribution that as a default includes patches that allow using efficient meshed VPNs using the DMVPN standard.
* Virtualization: Alpine Linux has reliably had excellent support of Xen hypervisors in up-to-date versions, which avoids issues as experienced with Enterprise Distributions. (The standard Linux hypervisor KVM, is also available.)
* Size: the base system in Alpine Linux is designed to be only 4–5 [[Megabyte|MB]] in size (excluding the kernel).{{citation needed|date=November 2015}} This allows very small [[Linux containers]], around 8 MB in size, while a minimal installation to disk might be around 130 MB.<ref name="about" /> The Linux kernel is much larger; the 3.18.16 kernel includes 121 MB of loadable kernel modules (primarily drivers) in addition to the 3.3 MB for the base [[x86-64]] kernel image.{{citation needed|date=November 2015}}
* Alpine Configuration Framework (ACF): While optional, ACF is an application for configuring an Alpine Linux machine, with goals similar to [[Debian|Debian's]] [[Debconf (software package)|debconf]]. It is a standard framework based on simple LUA scripts.{{citation needed|date=November 2015}}
* [[C standard library]]: Alpine Linux previously used [[uClibc]] instead of the traditional [[GNU C Library]] (glibc) most commonly used. Although it is lighter weight, it does have the significant drawback of being [[Binary code compatibility|binary incompatible]] with glibc. Thus, all software must be compiled for use with uClibc to work properly. As of April 9, 2014, Alpine Linux switched to [[musl]], which is partially binary compatible with glibc.<ref>{{cite web|url=http://www.musl-libc.org/faq.html|title=musl FAQ|publisher=}}</ref>
* [[Init system]]: The simple and lightweight [[OpenRC]] is the init system currently used by Alpine Linux.<ref>{{cite web|url=http://wiki.alpinelinux.org/wiki/Alpine_Linux_Init_System|title=Alpine Linux Init System|publisher=}}</ref> Unlike [[Debian]], [[Ubuntu (operating system)|Ubuntu]], [[RHEL]], [[Arch Linux]] and [[CentOS]] distributions of Linux, Alpine does not use [[systemd]].
 
Alpine's [[package management]] system, the Alpine Package Keeper (apk),{{efn|Not to be confused with the [[apk (file format)|apk file format]] used by [[Android (operating system)|Android]]}}<ref name="apk"/> was originally a collection of [[shell script]]s<ref>{{Cite web|url=https://sourceforge.net/projects/apk-tools/|title=apk-tools|website=SourceForge|date=18 April 2013 }}</ref> but was later rewritten in [[C (programming language)|C]].<ref>{{Cite web|url=https://git.alpinelinux.org/apk-tools/|title=apk-tools - Alpine package manager|website=git.alpinelinux.org}}</ref> The aim of this package manager is to achieve a high install and update speed, which it does by writing new data directly in-place into the operating system's [[file system]], rather than employing [[Cache (computing)|caching]] or [[Data compression|compression]].<ref name=":0"/>
== References ==
{{Reflist}}
 
In 2014, Alpine Linux switched from [[uClibc]] to [[musl]] as its [[C standard library]].<ref>{{cite web |title=Release notes |url=https://alpinelinux.org/posts/Alpine-3.0.0-released.html |access-date=6 May 2018 |website=alpinelinux.org}}</ref>
== External links ==
 
* {{Official website|alpinelinux.org}}
A [[Executable-space protection#PaX|PaX]] hardened kernel was included in the default distribution to aid in reducing the impact of exploits and vulnerabilities,<ref>{{Cite web |title=Alpine 3.8.0 released {{!}} Alpine Linux |url=https://alpinelinux.org/posts/Alpine-3.8.0-released.html |access-date=27 April 2022 |website=alpinelinux.org}}</ref> but Alpine's maintainers chose to discontinue this support due to the PaX patch no longer being made publicly available.<ref>{{Cite web |title=How does Alpine Linux harden its kernel? — alpinelinux lists |url=https://lists.alpinelinux.org/~alpine/users/%3CCABbU2U-w34QfSGg4wZKxvCoYgtqLRj9Z0SKHipDPNaSdHdBeAQ@mail.gmail.com%3E |access-date=30 June 2023 |website=lists.alpinelinux.org}}</ref> Alpine still uses a [[Hardening (computing)|hardened]] toolchain and position-independent executables to minimize the potential for [[Buffer overflow|stack-based attacks]],<ref name=":0" /> but is now based on the standard long term stable distribution of the Linux kernel.
* [http://wiki.alpinelinux.org/wiki/Main_Page Official wiki]
 
* {{DistroWatch|alpine|NAME=Alpine Linux}}
==Features==
 
Alpine's primary feature is its small size, which enables it to start quickly and run in environments very low in memory and storage, such as [[OS-level virtualization|containers]] or [[Embedded system|embedded devices]].
 
Alpine Linux can optionally be installed as a [[RAM drive|run-from-RAM]] operating system. This allows Alpine to work reliably in demanding embedded environments or to (temporarily) survive partial disk failures as sometimes experienced in public cloud environments. By default, Alpine running in this mode will only load a few key packages, but a tool called ''LBU'' (Alpine Local Backup)<ref>{{Cite web |title=Alpine local backup - Alpine Linux |url=https://wiki.alpinelinux.org/wiki/Alpine_local_backup |website=wiki.alpinelinux.org}}</ref> is made available that allow changes in this boot configuration to be written to a special file called an APK overlay file (usually shortened to ''apkovl''), a [[tar.gz]] file that by default stores a copy of all files in /etc that have been changed from the default configuration, with the option to track more directories as needed.
 
Alpine offers a number of preinstalled configuration scripts which guide the user through initial configuration of the system for common computing tasks.<ref>{{Citation |title=alpine-conf |date=17 June 2023 |url=https://github.com/alpinelinux/alpine-conf |access-date=30 June 2023 |publisher=Alpine Linux}}</ref> In addition, Alpine also offers a [[Web server|webserver]]-based tool known as the Alpine Configuration Framework, which allows users less familiar with Alpine or the command line to configure the operating system in a way similar to that allowed by [[Debian|Debian's]] [[Debconf (software package)|debconf]] utility. Alpine's configuration scripts are written entirely as UNIX [[shell script]]s, which call a small [[Optical disc image|ISO image]] parsing utility written in C and distributed in Alpine. The Alpine Configuration Framework is scripted in [[Lua (programming language)|Lua]].<ref>{{Cite web|url=https://wiki.alpinelinux.org/wiki/Alpine_Configuration_Framework_Design|title=Alpine Configuration Framework Design - Alpine Linux|website=wiki.alpinelinux.org}}</ref>
 
=== Integration with popular developer and administrator environments ===
Due to its robustness and compactness, Alpine Linux is tightly integrated with popular developer and system administrator environments and toolsets.
 
* [[Microsoft Store]] offers a deployment-ready version of Alpine WSL<ref>{{Cite web |title=Get Alpine WSL from the Microsoft Store |url=https://apps.microsoft.com/store/detail/alpine-wsl/9P804CRF0395 |access-date=14 April 2023 |website=apps.microsoft.com |language=en}}</ref> for [[Windows Subsystem for Linux|WSL2]]
* [[Docker (software)|Docker]] offers official images of Alpine Linux<ref>{{Cite web |date=8 September 2022 |title=How to Use the Alpine Docker Official Image {{!}} Docker |url=https://www.docker.com/blog/how-to-use-the-alpine-docker-official-image/ |access-date=14 April 2023 |website=www.docker.com |language=en-US}}</ref>
* [[PowerShell|Microsoft PowerShell]] provides an Alpine Linux specific build<ref>{{Cite web |last=sdwheeler |title=Installing PowerShell on Alpine Linux - PowerShell |url=https://learn.microsoft.com/en-us/powershell/scripting/install/install-alpine |access-date=14 April 2023 |website=learn.microsoft.com |date=17 March 2023 |language=en-us}}</ref>
 
== Derivatives ==
[[postmarketOS]], a Linux distribution for [[Linux for mobile devices|mobile devices]], is based on Alpine Linux.<ref name="postmarketOS">{{Cite web |date=28 April 2022 |title=postmarketOS // real Linux distribution for phones |url=https://postmarketos.org |website=postmarketos.org}}</ref>
 
==References and notes==
{{Reflist|30em|refs=}}
{{Notelist}}
 
==External links==
* {{Official website|https://alpinelinux.org}}
 
{{Linux distributions}}
Line 99 ⟶ 78:
{{Linux package management systems}}
 
[[Category:Independent Linux distributions]]
 
[[Category:Light-weight Linux distributions]]
[[Category:X86-64 Linux distributions]]
[[Category:Linux distributions without systemd]]
[[Category:X86-64 Linux distributions]]