<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.alpinelinux.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Winny</id>
	<title>Alpine Linux - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.alpinelinux.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Winny"/>
	<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/wiki/Special:Contributions/Winny"/>
	<updated>2026-04-30T23:12:25Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Talk:Main_Page&amp;diff=24321</id>
		<title>Talk:Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Talk:Main_Page&amp;diff=24321"/>
		<updated>2023-08-15T06:10:19Z</updated>

		<summary type="html">&lt;p&gt;Winny: /* Give everyone write access */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Put important content at top? ==&lt;br /&gt;
Hey, looks like I can&#039;t edit this page.  I was wondering if it would be possible to move the navigation and welcome section to the top of the page.  The warning about the license change is important, however, I don&#039;t think that&#039;s what most users come to the wiki to read. &amp;amp;mdash; [[User:Winny|Winny]] ([[User talk:Winny|talk]]) 17:53, 15 August 2022 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Give everyone write access ==&lt;br /&gt;
&lt;br /&gt;
I think you&#039;d find the quality of this page will increase significantly, if you all permit contributions. [[User:Winny|Winny]] ([[User talk:Winny|talk]]) 06:57, 11 April 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
:Looks like contributions are allowed now. How can this page be improved? [[User:Bbbhltz|bbbhltz]] ([[User talk:Bbbhltz|talk]]) 11:00, 20 April 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
::Any thoughts on this [[Sandbox#Main_Page_Proposal|Proposal]]? Keep in mind I only learned how to make tables today. Those icons from 2010 are perfectly fine, but we could use something like https://tabler-icons.io/ for simpler look. [[User:Bbbhltz|bbbhltz]] ([[User talk:Bbbhltz|talk]]) 12:23, 22 April 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
:::Thanks for giving write access.  I made an edit designed to de-emphasize the greeting (which is not what people are looking for when navigating this page).  I created one header to separate the &amp;quot;project summary&amp;quot;+greeting from the navigation links and miscellaneous (clutter drawer) links.  Hope you like it.  If not, please do not simply revert, put in some effort too, this homepage could be AMAZING :D.  PS 8bbhltz I didn&#039;t see icons on that proposed page - so it&#039;s all just words on my screen, so I&#039;m not sure if that&#039;d be an improvement for funneling users quickly through this page. &amp;amp;mdash; [[User:Winny|Winny]] ([[User talk:Winny|talk]]) 06:08, 15 August 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
::::PS the home page is a WIP.  Check out https://wiki.archlinux.org/ and other mediawiki-based project websites.  We can learn a lot from other projects and take the shortest path to a great homepage. &amp;amp;mdash; [[User:Winny|Winny]] ([[User talk:Winny|talk]]) 06:10, 15 August 2023 (UTC)&lt;/div&gt;</summary>
		<author><name>Winny</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Talk:Main_Page&amp;diff=24320</id>
		<title>Talk:Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Talk:Main_Page&amp;diff=24320"/>
		<updated>2023-08-15T06:08:12Z</updated>

		<summary type="html">&lt;p&gt;Winny: /* Give everyone write access */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Put important content at top? ==&lt;br /&gt;
Hey, looks like I can&#039;t edit this page.  I was wondering if it would be possible to move the navigation and welcome section to the top of the page.  The warning about the license change is important, however, I don&#039;t think that&#039;s what most users come to the wiki to read. &amp;amp;mdash; [[User:Winny|Winny]] ([[User talk:Winny|talk]]) 17:53, 15 August 2022 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Give everyone write access ==&lt;br /&gt;
&lt;br /&gt;
I think you&#039;d find the quality of this page will increase significantly, if you all permit contributions. [[User:Winny|Winny]] ([[User talk:Winny|talk]]) 06:57, 11 April 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
:Looks like contributions are allowed now. How can this page be improved? [[User:Bbbhltz|bbbhltz]] ([[User talk:Bbbhltz|talk]]) 11:00, 20 April 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
::Any thoughts on this [[Sandbox#Main_Page_Proposal|Proposal]]? Keep in mind I only learned how to make tables today. Those icons from 2010 are perfectly fine, but we could use something like https://tabler-icons.io/ for simpler look. [[User:Bbbhltz|bbbhltz]] ([[User talk:Bbbhltz|talk]]) 12:23, 22 April 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
:::Thanks for giving write access.  I made an edit designed to de-emphasize the greeting (which is not what people are looking for when navigating this page).  I created one header to separate the &amp;quot;project summary&amp;quot;+greeting from the navigation links and miscellaneous (clutter drawer) links.  Hope you like it.  If not, please do not simply revert, put in some effort too, this homepage could be AMAZING :D.  PS 8bbhltz I didn&#039;t see icons on that proposed page - so it&#039;s all just words on my screen, so I&#039;m not sure if that&#039;d be an improvement for funneling users quickly through this page. &amp;amp;mdash; [[User:Winny|Winny]] ([[User talk:Winny|talk]]) 06:08, 15 August 2023 (UTC)&lt;/div&gt;</summary>
		<author><name>Winny</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Main_Page&amp;diff=24319</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Main_Page&amp;diff=24319"/>
		<updated>2023-08-15T06:01:42Z</updated>

		<summary type="html">&lt;p&gt;Winny: use header to demarcate.  been referring to other wikis for landing page ideas&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOEDITSECTION__&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Welcome to Alpine Linux Wiki! &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[http://alpinelinux.org/about Alpine Linux]&#039;&#039;&#039; is a security-oriented, lightweight Linux distribution based on [https://musl.libc.org/ musl libc] and [https://busybox.net Busybox].&lt;br /&gt;
&lt;br /&gt;
Here is a [[Alpine Linux:Overview|more detailed overview]] of what makes our distribution distinctive; and a [[comparison with other distros]].&lt;br /&gt;
&lt;br /&gt;
== How can we help you? ==&lt;br /&gt;
&lt;br /&gt;
{|style=&amp;quot;margin: 1em auto 1em auto&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:64px;&amp;quot;|[[image:hdd_mount.svg|64px|link=Installation]] &lt;br /&gt;
|&#039;&#039;&#039;[[Installation]]&#039;&#039;&#039; &amp;lt;br/&amp;gt; Installing Alpine Linux&lt;br /&gt;
|[[image:filetypes.svg|64px|link=Alpine Linux:FAQ]]&lt;br /&gt;
|&#039;&#039;&#039;[[Alpine Linux:FAQ|FAQ]]&#039;&#039;&#039; &amp;lt;br/&amp;gt; Frequently Asked Questions&lt;br /&gt;
|[[image:bookcase.svg|64px|link=Alpine Linux:Glossary]]&lt;br /&gt;
|&#039;&#039;&#039;[[Alpine Linux:Glossary|Glossary]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|[[image:package_edutainment.svg|64px|link=Tutorials and Howtos]]&lt;br /&gt;
|&#039;&#039;&#039;[[Tutorials and Howtos]]&#039;&#039;&#039; &amp;lt;br/&amp;gt;Basic and advanced configuration tasks&lt;br /&gt;
|[[image:package_system.svg|64px|link=Category_talk:Developer_Documentation]]&lt;br /&gt;
|&#039;&#039;&#039;[[Category talk:Developer Documentation|Developer Documentation]]&#039;&#039;&#039; &amp;lt;br/&amp;gt; Alpine Linux Development &lt;br /&gt;
|[[image:kuser.svg|64px|link=Alpine Linux:Contribute]]&lt;br /&gt;
|&#039;&#039;&#039;[[Alpine Linux:Contribute|Contribute]]&#039;&#039;&#039; &amp;lt;br/&amp;gt; Contribute to Alpine Linux&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* [https://alpinelinux.org/releases Current releases] (latest is {{AlpineLatest}})&lt;br /&gt;
* [[Alpine Linux:Listings|Links to other sites with information about Alpine]]&lt;br /&gt;
&lt;br /&gt;
For licensing on any contributions, see the [[Alpine Linux:Privacy policy|Privacy Policy]].&lt;/div&gt;</summary>
		<author><name>Winny</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Main_Page&amp;diff=24318</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Main_Page&amp;diff=24318"/>
		<updated>2023-08-15T05:57:31Z</updated>

		<summary type="html">&lt;p&gt;Winny: The size of text impacts the importance.  I don&amp;#039;t think the greeting is any more important than the links below.  This is a landing page after all - it&amp;#039;s not really an &amp;quot;article&amp;quot; per se.  wiki.archlinux.org also does not have a header at the start of theil landing page, so others have done this too.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOEDITSECTION__&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Welcome to Alpine Linux Wiki! &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[http://alpinelinux.org/about Alpine Linux]&#039;&#039;&#039; is a security-oriented, lightweight Linux distribution based on [https://musl.libc.org/ musl libc] and [https://busybox.net Busybox].&lt;br /&gt;
&lt;br /&gt;
Here is a [[Alpine Linux:Overview|more detailed overview]] of what makes our distribution distinctive; and a [[comparison with other distros]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
{|style=&amp;quot;margin: 1em auto 1em auto&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:64px;&amp;quot;|[[image:hdd_mount.svg|64px|link=Installation]] &lt;br /&gt;
|&#039;&#039;&#039;[[Installation]]&#039;&#039;&#039; &amp;lt;br/&amp;gt; Installing Alpine Linux&lt;br /&gt;
|[[image:filetypes.svg|64px|link=Alpine Linux:FAQ]]&lt;br /&gt;
|&#039;&#039;&#039;[[Alpine Linux:FAQ|FAQ]]&#039;&#039;&#039; &amp;lt;br/&amp;gt; Frequently Asked Questions&lt;br /&gt;
|[[image:bookcase.svg|64px|link=Alpine Linux:Glossary]]&lt;br /&gt;
|&#039;&#039;&#039;[[Alpine Linux:Glossary|Glossary]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|[[image:package_edutainment.svg|64px|link=Tutorials and Howtos]]&lt;br /&gt;
|&#039;&#039;&#039;[[Tutorials and Howtos]]&#039;&#039;&#039; &amp;lt;br/&amp;gt;Basic and advanced configuration tasks&lt;br /&gt;
|[[image:package_system.svg|64px|link=Category_talk:Developer_Documentation]]&lt;br /&gt;
|&#039;&#039;&#039;[[Category talk:Developer Documentation|Developer Documentation]]&#039;&#039;&#039; &amp;lt;br/&amp;gt; Alpine Linux Development &lt;br /&gt;
|[[image:kuser.svg|64px|link=Alpine Linux:Contribute]]&lt;br /&gt;
|&#039;&#039;&#039;[[Alpine Linux:Contribute|Contribute]]&#039;&#039;&#039; &amp;lt;br/&amp;gt; Contribute to Alpine Linux&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* [https://alpinelinux.org/releases Current releases] (latest is {{AlpineLatest}})&lt;br /&gt;
* [[Alpine Linux:Listings|Links to other sites with information about Alpine]]&lt;br /&gt;
&lt;br /&gt;
For licensing on any contributions, see the [[Alpine Linux:Privacy policy|Privacy Policy]].&lt;/div&gt;</summary>
		<author><name>Winny</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Talk:Main_Page&amp;diff=23133</id>
		<title>Talk:Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Talk:Main_Page&amp;diff=23133"/>
		<updated>2023-04-11T06:57:50Z</updated>

		<summary type="html">&lt;p&gt;Winny: /* Give everyone write access */ add sig&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Put important content at top? ==&lt;br /&gt;
Hey, looks like I can&#039;t edit this page.  I was wondering if it would be possible to move the navigation and welcome section to the top of the page.  The warning about the license change is important, however, I don&#039;t think that&#039;s what most users come to the wiki to read. &amp;amp;mdash; [[User:Winny|Winny]] ([[User talk:Winny|talk]]) 17:53, 15 August 2022 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Give everyone write access ==&lt;br /&gt;
&lt;br /&gt;
I think you&#039;d find the quality of this page will increase significantly, if you all permit contributions. [[User:Winny|Winny]] ([[User talk:Winny|talk]]) 06:57, 11 April 2023 (UTC)&lt;/div&gt;</summary>
		<author><name>Winny</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Talk:Main_Page&amp;diff=23132</id>
		<title>Talk:Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Talk:Main_Page&amp;diff=23132"/>
		<updated>2023-04-11T06:57:02Z</updated>

		<summary type="html">&lt;p&gt;Winny: /* Give everyone write access */ new section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Put important content at top? ==&lt;br /&gt;
Hey, looks like I can&#039;t edit this page.  I was wondering if it would be possible to move the navigation and welcome section to the top of the page.  The warning about the license change is important, however, I don&#039;t think that&#039;s what most users come to the wiki to read. &amp;amp;mdash; [[User:Winny|Winny]] ([[User talk:Winny|talk]]) 17:53, 15 August 2022 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Give everyone write access ==&lt;br /&gt;
&lt;br /&gt;
I think you&#039;d find the quality of this page will increase significantly, if you all permit contributions.&lt;/div&gt;</summary>
		<author><name>Winny</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Talk:Main_Page&amp;diff=23131</id>
		<title>Talk:Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Talk:Main_Page&amp;diff=23131"/>
		<updated>2023-04-11T06:54:09Z</updated>

		<summary type="html">&lt;p&gt;Winny: Hmm, I think the problem was addressed, but the sentiment still exists ;).  Undo revision 23130 by Winny (talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Put important content at top? ==&lt;br /&gt;
Hey, looks like I can&#039;t edit this page.  I was wondering if it would be possible to move the navigation and welcome section to the top of the page.  The warning about the license change is important, however, I don&#039;t think that&#039;s what most users come to the wiki to read. &amp;amp;mdash; [[User:Winny|Winny]] ([[User talk:Winny|talk]]) 17:53, 15 August 2022 (UTC)&lt;/div&gt;</summary>
		<author><name>Winny</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Talk:Main_Page&amp;diff=23130</id>
		<title>Talk:Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Talk:Main_Page&amp;diff=23130"/>
		<updated>2023-04-11T06:52:21Z</updated>

		<summary type="html">&lt;p&gt;Winny: good job&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Put important content at top? ==&lt;br /&gt;
Hey, looks like I can&#039;t edit this page.  I was wondering if it would be possible to move the navigation and welcome section to the top of the page.  The warning about the license change is important, however, I don&#039;t think that&#039;s what most users come to the wiki to read. &amp;amp;mdash; [[User:Winny|Winny]] ([[User talk:Winny|talk]]) 17:53, 15 August 2022 (UTC)&lt;br /&gt;
:Great community involvement people.  [[User:Winny|Winny]] ([[User talk:Winny|talk]]) 06:52, 11 April 2023 (UTC)&lt;/div&gt;</summary>
		<author><name>Winny</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Comparison_with_other_distros&amp;diff=22244</id>
		<title>Comparison with other distros</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Comparison_with_other_distros&amp;diff=22244"/>
		<updated>2022-08-15T18:28:52Z</updated>

		<summary type="html">&lt;p&gt;Winny: /* Comparison chart/Rosetta Stone */ mention additional resource&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;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.&lt;br /&gt;
&lt;br /&gt;
{{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]}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Package management =&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Updating package database ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
 apk update&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
 apt update&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
 emerge --sync&lt;br /&gt;
&lt;br /&gt;
== Showing available updates ==&lt;br /&gt;
Show which packages have an update available:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
 apk version -v&lt;br /&gt;
or:&lt;br /&gt;
 apk version -v -l &#039;&amp;lt;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
 emerge --deep --update --pretend @world&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
 apt upgrade --simulate&lt;br /&gt;
&lt;br /&gt;
== Updating a particular package ==&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
 apk add -u package1 package2&lt;br /&gt;
or&lt;br /&gt;
 apk upgrade package1 package2&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
 apt install package1 package2&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
 emerge --update package1 package2&lt;br /&gt;
&lt;br /&gt;
== Installing packages ==&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
 apk add package1 package2&lt;br /&gt;
&lt;br /&gt;
For source compile, see the [[Aports tree]] and the [[abuild]] tool.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
 emerge package1 package2&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
 apt-get install package1 package2&lt;br /&gt;
Debian source compile:&lt;br /&gt;
 apt-get build-dep package1&lt;br /&gt;
 apt-get source package1&lt;br /&gt;
(optional: customize the build by modifying the debian/rules makefile)&lt;br /&gt;
(or set environmental variables like DEB_BUILD_OPTIONS)&lt;br /&gt;
(note that this will make your bug reports invalid to the maintainer)&lt;br /&gt;
 dpkg-buildpackage -rfakeroot -uc -b&lt;br /&gt;
 dpkg -i generatedpackagename&lt;br /&gt;
Simplified source compile:&lt;br /&gt;
 apt-get build-dep package1&lt;br /&gt;
 apt-get -b source package1&lt;br /&gt;
(the packages are automatically generated using the -b switch above)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; 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 &amp;quot;Architectures and repositories&amp;quot; section below.&lt;br /&gt;
&lt;br /&gt;
== Reinstalling particular packages ==&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
 apk del package1 package2 &amp;amp;&amp;amp; apk add package1 package2&lt;br /&gt;
or:&lt;br /&gt;
 apk fix package1 package2&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
 emerge --oneshot package1 package2&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
 apt-get install --reinstall package1 package2&lt;br /&gt;
&lt;br /&gt;
Note: You &#039;&#039;rarely&#039;&#039; need to reinstall a package on Debian&lt;br /&gt;
&lt;br /&gt;
== Searching the package database ==&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Alpine will only search package names.&lt;br /&gt;
 apk search searchword&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
To search the package names and descriptions:&lt;br /&gt;
 emerge --searchdesc searchword&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; On Gentoo, it&#039;s actually much better to install and use the eix package to do a search. You use them like this:&lt;br /&gt;
 eix searchword&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 apt-cache search searchword&lt;br /&gt;
Both emerge and apt-cache search support regular expressions.&lt;br /&gt;
&lt;br /&gt;
To get the long package information on Debian (searching only in package names):&lt;br /&gt;
 apt-cache search --full --names-only searchword&lt;br /&gt;
&lt;br /&gt;
== Removing packages ==&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 apk del package1 package2&lt;br /&gt;
&#039;&#039;apk del&#039;&#039; will remove configuration files when the &#039;&#039;--purge&#039;&#039; flag is used. Make sure you have backups of your configuration files.&lt;br /&gt;
&lt;br /&gt;
You will mostly like to take a quick look at the dependencies before you remove packages recursively.&lt;br /&gt;
&lt;br /&gt;
To see dependencies for a package, use:&lt;br /&gt;
 apk info -R package1 package2&lt;br /&gt;
&lt;br /&gt;
To see if package is required by other packages (is a dependency for another packages), use:&lt;br /&gt;
 apk info -r package1 package2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The correct way to remove packages on gentoo.&lt;br /&gt;
 emerge --depclean package1 package2&lt;br /&gt;
&lt;br /&gt;
In case you know what you&#039;re doing, you may skip dependency checks and potentiality leave your system in broken state.&lt;br /&gt;
 emerge --unmerge package1 package2&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
 apt-get remove package1 package2&lt;br /&gt;
or to remove along with all configuration files&lt;br /&gt;
 apt-get remove --purge package1 package2&lt;br /&gt;
&lt;br /&gt;
== Only downloading packages ==&lt;br /&gt;
This can be useful e.g. if you&#039;re on a dial-up connection and want to download everything first and install later.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
 apk fetch package1 package2&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
 emerge --fetchonly package1 package2&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
 apt-get install --download-only package1 package2&lt;br /&gt;
&lt;br /&gt;
== Cleaning up downloaded packages ==&lt;br /&gt;
Compressed packages that were downloaded for installation can easily consume gigabytes of storage space.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Alpine will clean up packages automatically.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The following command will leave &#039;&#039;/var/cache/distfiles/&#039;&#039; folder intact, while deleting all children.&lt;br /&gt;
&lt;br /&gt;
 find /var/cache/distfiles/ -mindepth 1 -delete&lt;br /&gt;
&lt;br /&gt;
To only remove outdated packages you will need to install the gentoolkit package and use eclean:&lt;br /&gt;
 eclean distfiles&lt;br /&gt;
&lt;br /&gt;
Cleaning temporary files from emerging packages:&lt;br /&gt;
 rm -rf /var/tmp/portage/*&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
 apt-get clean&lt;br /&gt;
Only remove outdated packages:&lt;br /&gt;
 apt-get autoclean&lt;br /&gt;
&lt;br /&gt;
==Reverse dependencies==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
apk-tools will take care of reverse dependencies.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Reverse dependencies are taken care of by dpkg.&lt;br /&gt;
&lt;br /&gt;
= Runlevel &amp;amp; Initscripts =&lt;br /&gt;
Runlevels work pretty conventionally on Debian (see details: [http://archive.fo/ZdZIz systemd]{{dead link}}). On Alpine and Gentoo, they are a bit different.&lt;br /&gt;
&lt;br /&gt;
== Directories and files ==&lt;br /&gt;
{{Obsolete|Debian now uses systemd.}}&lt;br /&gt;
&lt;br /&gt;
In &#039;&#039;&#039;Debian&#039;&#039;&#039;, 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).&lt;br /&gt;
&lt;br /&gt;
* /etc/rc0.d&lt;br /&gt;
* /etc/rc1.d&lt;br /&gt;
* /etc/rcS.d&lt;br /&gt;
* /etc/rc2.d&lt;br /&gt;
* /etc/rc3.d&lt;br /&gt;
* /etc/rc4.d&lt;br /&gt;
* /etc/rc5.d&lt;br /&gt;
* /etc/rc6.d&lt;br /&gt;
&lt;br /&gt;
In &#039;&#039;&#039;Gentoo&#039;&#039;&#039;, runlevels have the same names, but these are mapped to more self explanatory ones (in /etc/inittab): &amp;quot;boot&amp;quot;, &amp;quot;default&amp;quot;, &amp;quot;nonetwork&amp;quot;, with the option to add more. The directories that represent them are in &lt;br /&gt;
/etc/runlevels/:&lt;br /&gt;
* /etc/runlevels/boot&lt;br /&gt;
* /etc/runlevels/default&lt;br /&gt;
* /etc/runlevels/nonetwork&lt;br /&gt;
&lt;br /&gt;
In &#039;&#039;&#039;Gentoo&#039;&#039;&#039;, 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).&lt;br /&gt;
&lt;br /&gt;
In &#039;&#039;&#039;both Debian and Gentoo&#039;&#039;&#039;, 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.:&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
 $ ls -l /etc/runlevels/boot/hostname&lt;br /&gt;
 lrwxrwxrwx  1 root root 20 Mar 25  2004 /etc/runlevels/boot/hostname -&amp;gt; /etc/init.d/hostname&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
 $ ls -l rcS.d/S40hostname.sh&lt;br /&gt;
 lrwxrwxrwx  1 root root 21 2004-11-07 00:19 rcS.d/S40hostname.sh -&amp;gt; ../init.d/hostname.sh&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In Alpine, runlevels work like they do in Gentoo:&lt;br /&gt;
&lt;br /&gt;
* /etc/runlevels/boot&lt;br /&gt;
* /etc/runlevels/default&lt;br /&gt;
* /etc/runlevels/sysinit&lt;br /&gt;
* /etc/runlevels/nonetwork&lt;br /&gt;
* /etc/runlevels/shutdown&lt;br /&gt;
&lt;br /&gt;
== Runlevel management ==&lt;br /&gt;
To manage which things to start in which runlevels, use the following commands:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
To see current status of services in runlevels, do:&lt;br /&gt;
 rc-status&lt;br /&gt;
To add sshd to default runlevel, do:&lt;br /&gt;
 rc-update add sshd default&lt;br /&gt;
To remove sshd from all runlevels do:&lt;br /&gt;
 rc-update del sshd&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 rc-update&lt;br /&gt;
To add the cupsd to the default runlevel, do:&lt;br /&gt;
 rc-update add cupsd default&lt;br /&gt;
To remove alsasound from the boot runlevel, do:&lt;br /&gt;
 rc-update del alsasound boot&lt;br /&gt;
Also see this wiki page about [http://gentoo-wiki.com/Rc-update gentoo runlevel management with rc-update]&lt;br /&gt;
&lt;br /&gt;
{{Obsolete|Debian now uses systemd.}}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 update-rc.d&lt;br /&gt;
Configure cupsd to be started in runlevels 2, 3, 4, 5, and stopped in 0, 1, 6, with sequence code 20:&lt;br /&gt;
 update-rc.d cupsd start 20 2 3 4 5 . stop 20 0 1 6 . &lt;br /&gt;
or simply:&lt;br /&gt;
 update-rc.d cupsd defaults &lt;br /&gt;
Remove cupsd from all runlevels:&lt;br /&gt;
 update-rc.d -f cupsd remove&lt;br /&gt;
&lt;br /&gt;
= Config Files =&lt;br /&gt;
&lt;br /&gt;
== /etc/portage/make.conf and use flags ==&lt;br /&gt;
While in Gentoo there&#039;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 &#039;&#039;USE&#039;&#039; 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 &#039;gtk gnome&#039; for Gnome users (and a corresponding -qt -kde -arts) and &#039;qt kde arts&#039; for KDE users. A Gentoo user&#039;s complete set of use flags may look something like this:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;USE=&amp;quot;-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&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Architectures and repositories ==&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Also in /etc/portage/make.conf is the &#039;&#039;&#039;ACCEPT_KEYWORDS&#039;&#039;&#039; setting, with (for an X86-based processor) two settings, &#039;&#039;&#039;x86&#039;&#039;&#039; for stabler packages, and &#039;&#039;&#039;~x86&#039;&#039;&#039; 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&#039;s enough to put a line into that file naming the package (for example &#039;app-foo/bar&#039;). That file might look like this:&lt;br /&gt;
&lt;br /&gt;
 app-crypt/gpg-agent&lt;br /&gt;
 app-text/docbook-xsl-stylesheets&lt;br /&gt;
 =app-text/docbook-xml-dtd-4.3-r1&lt;br /&gt;
&lt;br /&gt;
The last line says, that &#039;&#039;only&#039;&#039; version 4.3-r1 should be unmasked. Older and newer versions will still be ignored.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note for non-x86 users:&#039;&#039;&#039;&lt;br /&gt;
The keywords &#039;&#039;&#039;x86&#039;&#039;&#039; and &#039;&#039;&#039;~x86&#039;&#039;&#039; can of course be replaced by &#039;&#039;&#039;sparc&#039;&#039;&#039; and &#039;&#039;&#039;~sparc&#039;&#039;&#039; for example.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Setting this in Debian is slightly more complicated, and is accomplished by setting different &#039;repositories&#039; in &#039;&#039;/etc/apt/sources.list&#039;&#039; - along with which &#039;tree&#039; to use for packages; in Debian, these are &#039;&#039;&#039;stable&#039;&#039;&#039;, &#039;&#039;&#039;testing&#039;&#039;&#039;, and &#039;&#039;&#039;unstable&#039;&#039;&#039;. An &#039;&#039;/etc/apt/sources.list&#039;&#039; file for a debian testing user may look something like this:&lt;br /&gt;
&lt;br /&gt;
 deb http://mirrors.kernel.org/debian testing main non-free contrib&lt;br /&gt;
 deb ftp://ftp.nerim.net/debian-marillat testing main&lt;br /&gt;
 deb http://security.debian.org testing/updates main contrib non-free&lt;br /&gt;
&lt;br /&gt;
Alternatively, &#039;&#039;/etc/apt/sources.list&#039;&#039; 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 &#039;&#039;/etc/apt/apt.conf&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
   APT::Default-Release &amp;quot;testing&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
Per-package settings go in &#039;&#039;/etc/apt/preferences&#039;&#039;, somewhat like Gentoo&#039;s &#039;&#039;/etc/portage/package.keywords&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== Network ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Alpine uses /etc/network/interfaces, similar to Debian.  Alpine uses busybox&#039;s implementation by default.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;/etc/network/interfaces&#039;&#039;:&lt;br /&gt;
 auto eth0&lt;br /&gt;
 iface eth0 inet static&lt;br /&gt;
  address 192.168.0.1&lt;br /&gt;
  netmask 255.255.255.0&lt;br /&gt;
  broadcast 192.168.0.255&lt;br /&gt;
  &lt;br /&gt;
 auto eth0:0&lt;br /&gt;
 iface eth0:0 inet static&lt;br /&gt;
  address 192.168.1.1&lt;br /&gt;
  netmask 255.255.255.0&lt;br /&gt;
  broadcast 192.168.1.255&lt;br /&gt;
 # etc.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Gentoo uses &#039;&#039;netifrc&#039;&#039;.  This packages is also available in the edge community repository.  (Use on Alpine at your own risk.)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;/etc/conf.d/net&#039;&#039;:&lt;br /&gt;
 config_eth0=&amp;quot;192.168.1.100 netmask 255.255.255.0&lt;br /&gt;
              192.168.2.100 netmask 255.255.255.0&amp;quot;&lt;br /&gt;
 routes_eth0=&amp;quot;default via 192.168.1.1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Note that this has changed recently. For more information please refer to http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=4&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;/etc/network/interfaces&#039;&#039;:&lt;br /&gt;
 auto eth0&lt;br /&gt;
 iface eth0 inet static&lt;br /&gt;
  address 192.168.0.1&lt;br /&gt;
  netmask 255.255.255.0&lt;br /&gt;
  broadcast 192.168.0.255&lt;br /&gt;
  &lt;br /&gt;
 auto eth0:0&lt;br /&gt;
 iface eth0:0 inet static&lt;br /&gt;
  address 192.168.1.1&lt;br /&gt;
  netmask 255.255.255.0&lt;br /&gt;
  broadcast 192.168.1.255&lt;br /&gt;
 # etc.&lt;br /&gt;
&lt;br /&gt;
= Comparison chart/Rosetta Stone =&lt;br /&gt;
&lt;br /&gt;
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].&lt;br /&gt;
&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Action &lt;br /&gt;
! Alpine ([https://wiki.alpinelinux.org/wiki/Alpine_Linux_package_management apk])&lt;br /&gt;
! Arch Linux ([https://wiki.archlinux.org/index.php/Pacman pacman])&lt;br /&gt;
! Gentoo ([https://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&amp;amp;chap=1 emerge])&lt;br /&gt;
! Debian/Ubuntu ([https://wiki.debian.org/AptCLI apt])&lt;br /&gt;
! Fedora/RHEL/SL/CentOS ([http://yum.baseurl.org/wiki/YumCommands yum])&lt;br /&gt;
! VoidLinux ([https://docs.voidlinux.org/xbps/index.html?highlight=xb#xbps-package-manager XBPS])&lt;br /&gt;
|-&lt;br /&gt;
| Update package database&lt;br /&gt;
| {{Cmd| apk update}}&lt;br /&gt;
| {{Cmd| pacman -Sy}}&lt;br /&gt;
| {{Cmd| emerge --sync}}&lt;br /&gt;
| {{Cmd| apt update}}&lt;br /&gt;
| {{Cmd| yum update}}&lt;br /&gt;
| {{Cmd| xbps-install -S}}&lt;br /&gt;
|-&lt;br /&gt;
| Showing available updates&lt;br /&gt;
| {{Cmd| apk version -l &#039;&amp;lt;&#039;}}&lt;br /&gt;
| {{Cmd| pacman -Qu}}&lt;br /&gt;
| {{Cmd| emerge --deep --update --pretend @world}}&lt;br /&gt;
| {{Cmd| apt upgrade --simulate}}&lt;br /&gt;
| {{Cmd| yum list updates}}&lt;br /&gt;
| {{Cmd| xbps-install -n -u}}&lt;br /&gt;
|-&lt;br /&gt;
| Installing packages&lt;br /&gt;
| {{Cmd| apk add [package name]}}&lt;br /&gt;
| {{Cmd| pacman -S [package name]}}&lt;br /&gt;
| {{Cmd| emerge [package name]}}&lt;br /&gt;
| {{Cmd| apt install [package name]}}&lt;br /&gt;
| {{Cmd| yum install [package name]}}&lt;br /&gt;
| {{Cmd| xbps-install [package name]}}&lt;br /&gt;
|-&lt;br /&gt;
| Update all installed packages&lt;br /&gt;
| {{Cmd| apk upgrade -U -a}}&lt;br /&gt;
| {{Cmd| pacman -Su}}&lt;br /&gt;
| {{Cmd| emerge --update --deep @world}}&lt;br /&gt;
| {{Cmd| apt upgrade}}&lt;br /&gt;
| {{Cmd| yum update}}&lt;br /&gt;
| {{Cmd| xbps-install -u}}&lt;br /&gt;
|- &lt;br /&gt;
| Searching package database&lt;br /&gt;
| {{Cmd| apk search -v &#039;[string]*&#039;}}&lt;br /&gt;
| {{Cmd| pacman -Ss [string]}}&lt;br /&gt;
| {{Cmd| emerge --search [string]}}&lt;br /&gt;
| {{Cmd| apt search [string]}}&lt;br /&gt;
| {{Cmd| yum search [string]}}&lt;br /&gt;
| {{Cmd| xbps-query -Rs [string]}}&lt;br /&gt;
|-&lt;br /&gt;
| Removing packages&lt;br /&gt;
| {{Cmd| apk del [package name]}}&lt;br /&gt;
| {{Cmd| pacman -R [package name]}}&lt;br /&gt;
| {{Cmd| emerge --depclean [package name]}}&lt;br /&gt;
| {{Cmd| apt remove [package name]}}&lt;br /&gt;
| {{Cmd| yum remove [package name]}}&lt;br /&gt;
| {{Cmd| xbps-remove [package name]}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Package Manager]]&lt;/div&gt;</summary>
		<author><name>Winny</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Comparison_with_other_distros&amp;diff=22243</id>
		<title>Comparison with other distros</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Comparison_with_other_distros&amp;diff=22243"/>
		<updated>2022-08-15T18:27:47Z</updated>

		<summary type="html">&lt;p&gt;Winny: /* Network */ cleanup&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;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.&lt;br /&gt;
&lt;br /&gt;
{{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]}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Package management =&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Updating package database ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
 apk update&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
 apt update&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
 emerge --sync&lt;br /&gt;
&lt;br /&gt;
== Showing available updates ==&lt;br /&gt;
Show which packages have an update available:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
 apk version -v&lt;br /&gt;
or:&lt;br /&gt;
 apk version -v -l &#039;&amp;lt;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
 emerge --deep --update --pretend @world&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
 apt upgrade --simulate&lt;br /&gt;
&lt;br /&gt;
== Updating a particular package ==&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
 apk add -u package1 package2&lt;br /&gt;
or&lt;br /&gt;
 apk upgrade package1 package2&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
 apt install package1 package2&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
 emerge --update package1 package2&lt;br /&gt;
&lt;br /&gt;
== Installing packages ==&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
 apk add package1 package2&lt;br /&gt;
&lt;br /&gt;
For source compile, see the [[Aports tree]] and the [[abuild]] tool.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
 emerge package1 package2&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
 apt-get install package1 package2&lt;br /&gt;
Debian source compile:&lt;br /&gt;
 apt-get build-dep package1&lt;br /&gt;
 apt-get source package1&lt;br /&gt;
(optional: customize the build by modifying the debian/rules makefile)&lt;br /&gt;
(or set environmental variables like DEB_BUILD_OPTIONS)&lt;br /&gt;
(note that this will make your bug reports invalid to the maintainer)&lt;br /&gt;
 dpkg-buildpackage -rfakeroot -uc -b&lt;br /&gt;
 dpkg -i generatedpackagename&lt;br /&gt;
Simplified source compile:&lt;br /&gt;
 apt-get build-dep package1&lt;br /&gt;
 apt-get -b source package1&lt;br /&gt;
(the packages are automatically generated using the -b switch above)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; 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 &amp;quot;Architectures and repositories&amp;quot; section below.&lt;br /&gt;
&lt;br /&gt;
== Reinstalling particular packages ==&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
 apk del package1 package2 &amp;amp;&amp;amp; apk add package1 package2&lt;br /&gt;
or:&lt;br /&gt;
 apk fix package1 package2&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
 emerge --oneshot package1 package2&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
 apt-get install --reinstall package1 package2&lt;br /&gt;
&lt;br /&gt;
Note: You &#039;&#039;rarely&#039;&#039; need to reinstall a package on Debian&lt;br /&gt;
&lt;br /&gt;
== Searching the package database ==&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Alpine will only search package names.&lt;br /&gt;
 apk search searchword&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
To search the package names and descriptions:&lt;br /&gt;
 emerge --searchdesc searchword&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; On Gentoo, it&#039;s actually much better to install and use the eix package to do a search. You use them like this:&lt;br /&gt;
 eix searchword&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 apt-cache search searchword&lt;br /&gt;
Both emerge and apt-cache search support regular expressions.&lt;br /&gt;
&lt;br /&gt;
To get the long package information on Debian (searching only in package names):&lt;br /&gt;
 apt-cache search --full --names-only searchword&lt;br /&gt;
&lt;br /&gt;
== Removing packages ==&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 apk del package1 package2&lt;br /&gt;
&#039;&#039;apk del&#039;&#039; will remove configuration files when the &#039;&#039;--purge&#039;&#039; flag is used. Make sure you have backups of your configuration files.&lt;br /&gt;
&lt;br /&gt;
You will mostly like to take a quick look at the dependencies before you remove packages recursively.&lt;br /&gt;
&lt;br /&gt;
To see dependencies for a package, use:&lt;br /&gt;
 apk info -R package1 package2&lt;br /&gt;
&lt;br /&gt;
To see if package is required by other packages (is a dependency for another packages), use:&lt;br /&gt;
 apk info -r package1 package2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The correct way to remove packages on gentoo.&lt;br /&gt;
 emerge --depclean package1 package2&lt;br /&gt;
&lt;br /&gt;
In case you know what you&#039;re doing, you may skip dependency checks and potentiality leave your system in broken state.&lt;br /&gt;
 emerge --unmerge package1 package2&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
 apt-get remove package1 package2&lt;br /&gt;
or to remove along with all configuration files&lt;br /&gt;
 apt-get remove --purge package1 package2&lt;br /&gt;
&lt;br /&gt;
== Only downloading packages ==&lt;br /&gt;
This can be useful e.g. if you&#039;re on a dial-up connection and want to download everything first and install later.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
 apk fetch package1 package2&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
 emerge --fetchonly package1 package2&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
 apt-get install --download-only package1 package2&lt;br /&gt;
&lt;br /&gt;
== Cleaning up downloaded packages ==&lt;br /&gt;
Compressed packages that were downloaded for installation can easily consume gigabytes of storage space.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Alpine will clean up packages automatically.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The following command will leave &#039;&#039;/var/cache/distfiles/&#039;&#039; folder intact, while deleting all children.&lt;br /&gt;
&lt;br /&gt;
 find /var/cache/distfiles/ -mindepth 1 -delete&lt;br /&gt;
&lt;br /&gt;
To only remove outdated packages you will need to install the gentoolkit package and use eclean:&lt;br /&gt;
 eclean distfiles&lt;br /&gt;
&lt;br /&gt;
Cleaning temporary files from emerging packages:&lt;br /&gt;
 rm -rf /var/tmp/portage/*&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
 apt-get clean&lt;br /&gt;
Only remove outdated packages:&lt;br /&gt;
 apt-get autoclean&lt;br /&gt;
&lt;br /&gt;
==Reverse dependencies==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
apk-tools will take care of reverse dependencies.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Reverse dependencies are taken care of by dpkg.&lt;br /&gt;
&lt;br /&gt;
= Runlevel &amp;amp; Initscripts =&lt;br /&gt;
Runlevels work pretty conventionally on Debian (see details: [http://archive.fo/ZdZIz systemd]{{dead link}}). On Alpine and Gentoo, they are a bit different.&lt;br /&gt;
&lt;br /&gt;
== Directories and files ==&lt;br /&gt;
{{Obsolete|Debian now uses systemd.}}&lt;br /&gt;
&lt;br /&gt;
In &#039;&#039;&#039;Debian&#039;&#039;&#039;, 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).&lt;br /&gt;
&lt;br /&gt;
* /etc/rc0.d&lt;br /&gt;
* /etc/rc1.d&lt;br /&gt;
* /etc/rcS.d&lt;br /&gt;
* /etc/rc2.d&lt;br /&gt;
* /etc/rc3.d&lt;br /&gt;
* /etc/rc4.d&lt;br /&gt;
* /etc/rc5.d&lt;br /&gt;
* /etc/rc6.d&lt;br /&gt;
&lt;br /&gt;
In &#039;&#039;&#039;Gentoo&#039;&#039;&#039;, runlevels have the same names, but these are mapped to more self explanatory ones (in /etc/inittab): &amp;quot;boot&amp;quot;, &amp;quot;default&amp;quot;, &amp;quot;nonetwork&amp;quot;, with the option to add more. The directories that represent them are in &lt;br /&gt;
/etc/runlevels/:&lt;br /&gt;
* /etc/runlevels/boot&lt;br /&gt;
* /etc/runlevels/default&lt;br /&gt;
* /etc/runlevels/nonetwork&lt;br /&gt;
&lt;br /&gt;
In &#039;&#039;&#039;Gentoo&#039;&#039;&#039;, 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).&lt;br /&gt;
&lt;br /&gt;
In &#039;&#039;&#039;both Debian and Gentoo&#039;&#039;&#039;, 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.:&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
 $ ls -l /etc/runlevels/boot/hostname&lt;br /&gt;
 lrwxrwxrwx  1 root root 20 Mar 25  2004 /etc/runlevels/boot/hostname -&amp;gt; /etc/init.d/hostname&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
 $ ls -l rcS.d/S40hostname.sh&lt;br /&gt;
 lrwxrwxrwx  1 root root 21 2004-11-07 00:19 rcS.d/S40hostname.sh -&amp;gt; ../init.d/hostname.sh&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In Alpine, runlevels work like they do in Gentoo:&lt;br /&gt;
&lt;br /&gt;
* /etc/runlevels/boot&lt;br /&gt;
* /etc/runlevels/default&lt;br /&gt;
* /etc/runlevels/sysinit&lt;br /&gt;
* /etc/runlevels/nonetwork&lt;br /&gt;
* /etc/runlevels/shutdown&lt;br /&gt;
&lt;br /&gt;
== Runlevel management ==&lt;br /&gt;
To manage which things to start in which runlevels, use the following commands:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
To see current status of services in runlevels, do:&lt;br /&gt;
 rc-status&lt;br /&gt;
To add sshd to default runlevel, do:&lt;br /&gt;
 rc-update add sshd default&lt;br /&gt;
To remove sshd from all runlevels do:&lt;br /&gt;
 rc-update del sshd&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 rc-update&lt;br /&gt;
To add the cupsd to the default runlevel, do:&lt;br /&gt;
 rc-update add cupsd default&lt;br /&gt;
To remove alsasound from the boot runlevel, do:&lt;br /&gt;
 rc-update del alsasound boot&lt;br /&gt;
Also see this wiki page about [http://gentoo-wiki.com/Rc-update gentoo runlevel management with rc-update]&lt;br /&gt;
&lt;br /&gt;
{{Obsolete|Debian now uses systemd.}}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 update-rc.d&lt;br /&gt;
Configure cupsd to be started in runlevels 2, 3, 4, 5, and stopped in 0, 1, 6, with sequence code 20:&lt;br /&gt;
 update-rc.d cupsd start 20 2 3 4 5 . stop 20 0 1 6 . &lt;br /&gt;
or simply:&lt;br /&gt;
 update-rc.d cupsd defaults &lt;br /&gt;
Remove cupsd from all runlevels:&lt;br /&gt;
 update-rc.d -f cupsd remove&lt;br /&gt;
&lt;br /&gt;
= Config Files =&lt;br /&gt;
&lt;br /&gt;
== /etc/portage/make.conf and use flags ==&lt;br /&gt;
While in Gentoo there&#039;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 &#039;&#039;USE&#039;&#039; 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 &#039;gtk gnome&#039; for Gnome users (and a corresponding -qt -kde -arts) and &#039;qt kde arts&#039; for KDE users. A Gentoo user&#039;s complete set of use flags may look something like this:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;USE=&amp;quot;-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&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Architectures and repositories ==&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Also in /etc/portage/make.conf is the &#039;&#039;&#039;ACCEPT_KEYWORDS&#039;&#039;&#039; setting, with (for an X86-based processor) two settings, &#039;&#039;&#039;x86&#039;&#039;&#039; for stabler packages, and &#039;&#039;&#039;~x86&#039;&#039;&#039; 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&#039;s enough to put a line into that file naming the package (for example &#039;app-foo/bar&#039;). That file might look like this:&lt;br /&gt;
&lt;br /&gt;
 app-crypt/gpg-agent&lt;br /&gt;
 app-text/docbook-xsl-stylesheets&lt;br /&gt;
 =app-text/docbook-xml-dtd-4.3-r1&lt;br /&gt;
&lt;br /&gt;
The last line says, that &#039;&#039;only&#039;&#039; version 4.3-r1 should be unmasked. Older and newer versions will still be ignored.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note for non-x86 users:&#039;&#039;&#039;&lt;br /&gt;
The keywords &#039;&#039;&#039;x86&#039;&#039;&#039; and &#039;&#039;&#039;~x86&#039;&#039;&#039; can of course be replaced by &#039;&#039;&#039;sparc&#039;&#039;&#039; and &#039;&#039;&#039;~sparc&#039;&#039;&#039; for example.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Setting this in Debian is slightly more complicated, and is accomplished by setting different &#039;repositories&#039; in &#039;&#039;/etc/apt/sources.list&#039;&#039; - along with which &#039;tree&#039; to use for packages; in Debian, these are &#039;&#039;&#039;stable&#039;&#039;&#039;, &#039;&#039;&#039;testing&#039;&#039;&#039;, and &#039;&#039;&#039;unstable&#039;&#039;&#039;. An &#039;&#039;/etc/apt/sources.list&#039;&#039; file for a debian testing user may look something like this:&lt;br /&gt;
&lt;br /&gt;
 deb http://mirrors.kernel.org/debian testing main non-free contrib&lt;br /&gt;
 deb ftp://ftp.nerim.net/debian-marillat testing main&lt;br /&gt;
 deb http://security.debian.org testing/updates main contrib non-free&lt;br /&gt;
&lt;br /&gt;
Alternatively, &#039;&#039;/etc/apt/sources.list&#039;&#039; 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 &#039;&#039;/etc/apt/apt.conf&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
   APT::Default-Release &amp;quot;testing&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
Per-package settings go in &#039;&#039;/etc/apt/preferences&#039;&#039;, somewhat like Gentoo&#039;s &#039;&#039;/etc/portage/package.keywords&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== Network ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Alpine uses /etc/network/interfaces, similar to Debian.  Alpine uses busybox&#039;s implementation by default.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;/etc/network/interfaces&#039;&#039;:&lt;br /&gt;
 auto eth0&lt;br /&gt;
 iface eth0 inet static&lt;br /&gt;
  address 192.168.0.1&lt;br /&gt;
  netmask 255.255.255.0&lt;br /&gt;
  broadcast 192.168.0.255&lt;br /&gt;
  &lt;br /&gt;
 auto eth0:0&lt;br /&gt;
 iface eth0:0 inet static&lt;br /&gt;
  address 192.168.1.1&lt;br /&gt;
  netmask 255.255.255.0&lt;br /&gt;
  broadcast 192.168.1.255&lt;br /&gt;
 # etc.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Gentoo uses &#039;&#039;netifrc&#039;&#039;.  This packages is also available in the edge community repository.  (Use on Alpine at your own risk.)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;/etc/conf.d/net&#039;&#039;:&lt;br /&gt;
 config_eth0=&amp;quot;192.168.1.100 netmask 255.255.255.0&lt;br /&gt;
              192.168.2.100 netmask 255.255.255.0&amp;quot;&lt;br /&gt;
 routes_eth0=&amp;quot;default via 192.168.1.1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Note that this has changed recently. For more information please refer to http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=4&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;/etc/network/interfaces&#039;&#039;:&lt;br /&gt;
 auto eth0&lt;br /&gt;
 iface eth0 inet static&lt;br /&gt;
  address 192.168.0.1&lt;br /&gt;
  netmask 255.255.255.0&lt;br /&gt;
  broadcast 192.168.0.255&lt;br /&gt;
  &lt;br /&gt;
 auto eth0:0&lt;br /&gt;
 iface eth0:0 inet static&lt;br /&gt;
  address 192.168.1.1&lt;br /&gt;
  netmask 255.255.255.0&lt;br /&gt;
  broadcast 192.168.1.255&lt;br /&gt;
 # etc.&lt;br /&gt;
&lt;br /&gt;
= Comparison chart/Rosetta Stone =&lt;br /&gt;
&lt;br /&gt;
This chart shows how some standard things are done in Alpine compared to other distributions.&lt;br /&gt;
&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Action &lt;br /&gt;
! Alpine ([https://wiki.alpinelinux.org/wiki/Alpine_Linux_package_management apk])&lt;br /&gt;
! Arch Linux ([https://wiki.archlinux.org/index.php/Pacman pacman])&lt;br /&gt;
! Gentoo ([https://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&amp;amp;chap=1 emerge])&lt;br /&gt;
! Debian/Ubuntu ([https://wiki.debian.org/AptCLI apt])&lt;br /&gt;
! Fedora/RHEL/SL/CentOS ([http://yum.baseurl.org/wiki/YumCommands yum])&lt;br /&gt;
! VoidLinux ([https://docs.voidlinux.org/xbps/index.html?highlight=xb#xbps-package-manager XBPS])&lt;br /&gt;
|-&lt;br /&gt;
| Update package database&lt;br /&gt;
| {{Cmd| apk update}}&lt;br /&gt;
| {{Cmd| pacman -Sy}}&lt;br /&gt;
| {{Cmd| emerge --sync}}&lt;br /&gt;
| {{Cmd| apt update}}&lt;br /&gt;
| {{Cmd| yum update}}&lt;br /&gt;
| {{Cmd| xbps-install -S}}&lt;br /&gt;
|-&lt;br /&gt;
| Showing available updates&lt;br /&gt;
| {{Cmd| apk version -l &#039;&amp;lt;&#039;}}&lt;br /&gt;
| {{Cmd| pacman -Qu}}&lt;br /&gt;
| {{Cmd| emerge --deep --update --pretend @world}}&lt;br /&gt;
| {{Cmd| apt upgrade --simulate}}&lt;br /&gt;
| {{Cmd| yum list updates}}&lt;br /&gt;
| {{Cmd| xbps-install -n -u}}&lt;br /&gt;
|-&lt;br /&gt;
| Installing packages&lt;br /&gt;
| {{Cmd| apk add [package name]}}&lt;br /&gt;
| {{Cmd| pacman -S [package name]}}&lt;br /&gt;
| {{Cmd| emerge [package name]}}&lt;br /&gt;
| {{Cmd| apt install [package name]}}&lt;br /&gt;
| {{Cmd| yum install [package name]}}&lt;br /&gt;
| {{Cmd| xbps-install [package name]}}&lt;br /&gt;
|-&lt;br /&gt;
| Update all installed packages&lt;br /&gt;
| {{Cmd| apk upgrade -U -a}}&lt;br /&gt;
| {{Cmd| pacman -Su}}&lt;br /&gt;
| {{Cmd| emerge --update --deep @world}}&lt;br /&gt;
| {{Cmd| apt upgrade}}&lt;br /&gt;
| {{Cmd| yum update}}&lt;br /&gt;
| {{Cmd| xbps-install -u}}&lt;br /&gt;
|- &lt;br /&gt;
| Searching package database&lt;br /&gt;
| {{Cmd| apk search -v &#039;[string]*&#039;}}&lt;br /&gt;
| {{Cmd| pacman -Ss [string]}}&lt;br /&gt;
| {{Cmd| emerge --search [string]}}&lt;br /&gt;
| {{Cmd| apt search [string]}}&lt;br /&gt;
| {{Cmd| yum search [string]}}&lt;br /&gt;
| {{Cmd| xbps-query -Rs [string]}}&lt;br /&gt;
|-&lt;br /&gt;
| Removing packages&lt;br /&gt;
| {{Cmd| apk del [package name]}}&lt;br /&gt;
| {{Cmd| pacman -R [package name]}}&lt;br /&gt;
| {{Cmd| emerge --depclean [package name]}}&lt;br /&gt;
| {{Cmd| apt remove [package name]}}&lt;br /&gt;
| {{Cmd| yum remove [package name]}}&lt;br /&gt;
| {{Cmd| xbps-remove [package name]}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Package Manager]]&lt;/div&gt;</summary>
		<author><name>Winny</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Comparison_with_other_distros&amp;diff=22242</id>
		<title>Comparison with other distros</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Comparison_with_other_distros&amp;diff=22242"/>
		<updated>2022-08-15T18:24:43Z</updated>

		<summary type="html">&lt;p&gt;Winny: /* Runlevel management */ systemd&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;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.&lt;br /&gt;
&lt;br /&gt;
{{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]}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Package management =&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Updating package database ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
 apk update&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
 apt update&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
 emerge --sync&lt;br /&gt;
&lt;br /&gt;
== Showing available updates ==&lt;br /&gt;
Show which packages have an update available:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
 apk version -v&lt;br /&gt;
or:&lt;br /&gt;
 apk version -v -l &#039;&amp;lt;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
 emerge --deep --update --pretend @world&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
 apt upgrade --simulate&lt;br /&gt;
&lt;br /&gt;
== Updating a particular package ==&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
 apk add -u package1 package2&lt;br /&gt;
or&lt;br /&gt;
 apk upgrade package1 package2&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
 apt install package1 package2&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
 emerge --update package1 package2&lt;br /&gt;
&lt;br /&gt;
== Installing packages ==&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
 apk add package1 package2&lt;br /&gt;
&lt;br /&gt;
For source compile, see the [[Aports tree]] and the [[abuild]] tool.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
 emerge package1 package2&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
 apt-get install package1 package2&lt;br /&gt;
Debian source compile:&lt;br /&gt;
 apt-get build-dep package1&lt;br /&gt;
 apt-get source package1&lt;br /&gt;
(optional: customize the build by modifying the debian/rules makefile)&lt;br /&gt;
(or set environmental variables like DEB_BUILD_OPTIONS)&lt;br /&gt;
(note that this will make your bug reports invalid to the maintainer)&lt;br /&gt;
 dpkg-buildpackage -rfakeroot -uc -b&lt;br /&gt;
 dpkg -i generatedpackagename&lt;br /&gt;
Simplified source compile:&lt;br /&gt;
 apt-get build-dep package1&lt;br /&gt;
 apt-get -b source package1&lt;br /&gt;
(the packages are automatically generated using the -b switch above)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; 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 &amp;quot;Architectures and repositories&amp;quot; section below.&lt;br /&gt;
&lt;br /&gt;
== Reinstalling particular packages ==&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
 apk del package1 package2 &amp;amp;&amp;amp; apk add package1 package2&lt;br /&gt;
or:&lt;br /&gt;
 apk fix package1 package2&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
 emerge --oneshot package1 package2&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
 apt-get install --reinstall package1 package2&lt;br /&gt;
&lt;br /&gt;
Note: You &#039;&#039;rarely&#039;&#039; need to reinstall a package on Debian&lt;br /&gt;
&lt;br /&gt;
== Searching the package database ==&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Alpine will only search package names.&lt;br /&gt;
 apk search searchword&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
To search the package names and descriptions:&lt;br /&gt;
 emerge --searchdesc searchword&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; On Gentoo, it&#039;s actually much better to install and use the eix package to do a search. You use them like this:&lt;br /&gt;
 eix searchword&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 apt-cache search searchword&lt;br /&gt;
Both emerge and apt-cache search support regular expressions.&lt;br /&gt;
&lt;br /&gt;
To get the long package information on Debian (searching only in package names):&lt;br /&gt;
 apt-cache search --full --names-only searchword&lt;br /&gt;
&lt;br /&gt;
== Removing packages ==&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 apk del package1 package2&lt;br /&gt;
&#039;&#039;apk del&#039;&#039; will remove configuration files when the &#039;&#039;--purge&#039;&#039; flag is used. Make sure you have backups of your configuration files.&lt;br /&gt;
&lt;br /&gt;
You will mostly like to take a quick look at the dependencies before you remove packages recursively.&lt;br /&gt;
&lt;br /&gt;
To see dependencies for a package, use:&lt;br /&gt;
 apk info -R package1 package2&lt;br /&gt;
&lt;br /&gt;
To see if package is required by other packages (is a dependency for another packages), use:&lt;br /&gt;
 apk info -r package1 package2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The correct way to remove packages on gentoo.&lt;br /&gt;
 emerge --depclean package1 package2&lt;br /&gt;
&lt;br /&gt;
In case you know what you&#039;re doing, you may skip dependency checks and potentiality leave your system in broken state.&lt;br /&gt;
 emerge --unmerge package1 package2&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
 apt-get remove package1 package2&lt;br /&gt;
or to remove along with all configuration files&lt;br /&gt;
 apt-get remove --purge package1 package2&lt;br /&gt;
&lt;br /&gt;
== Only downloading packages ==&lt;br /&gt;
This can be useful e.g. if you&#039;re on a dial-up connection and want to download everything first and install later.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
 apk fetch package1 package2&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
 emerge --fetchonly package1 package2&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
 apt-get install --download-only package1 package2&lt;br /&gt;
&lt;br /&gt;
== Cleaning up downloaded packages ==&lt;br /&gt;
Compressed packages that were downloaded for installation can easily consume gigabytes of storage space.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Alpine will clean up packages automatically.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The following command will leave &#039;&#039;/var/cache/distfiles/&#039;&#039; folder intact, while deleting all children.&lt;br /&gt;
&lt;br /&gt;
 find /var/cache/distfiles/ -mindepth 1 -delete&lt;br /&gt;
&lt;br /&gt;
To only remove outdated packages you will need to install the gentoolkit package and use eclean:&lt;br /&gt;
 eclean distfiles&lt;br /&gt;
&lt;br /&gt;
Cleaning temporary files from emerging packages:&lt;br /&gt;
 rm -rf /var/tmp/portage/*&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
 apt-get clean&lt;br /&gt;
Only remove outdated packages:&lt;br /&gt;
 apt-get autoclean&lt;br /&gt;
&lt;br /&gt;
==Reverse dependencies==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
apk-tools will take care of reverse dependencies.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Reverse dependencies are taken care of by dpkg.&lt;br /&gt;
&lt;br /&gt;
= Runlevel &amp;amp; Initscripts =&lt;br /&gt;
Runlevels work pretty conventionally on Debian (see details: [http://archive.fo/ZdZIz systemd]{{dead link}}). On Alpine and Gentoo, they are a bit different.&lt;br /&gt;
&lt;br /&gt;
== Directories and files ==&lt;br /&gt;
{{Obsolete|Debian now uses systemd.}}&lt;br /&gt;
&lt;br /&gt;
In &#039;&#039;&#039;Debian&#039;&#039;&#039;, 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).&lt;br /&gt;
&lt;br /&gt;
* /etc/rc0.d&lt;br /&gt;
* /etc/rc1.d&lt;br /&gt;
* /etc/rcS.d&lt;br /&gt;
* /etc/rc2.d&lt;br /&gt;
* /etc/rc3.d&lt;br /&gt;
* /etc/rc4.d&lt;br /&gt;
* /etc/rc5.d&lt;br /&gt;
* /etc/rc6.d&lt;br /&gt;
&lt;br /&gt;
In &#039;&#039;&#039;Gentoo&#039;&#039;&#039;, runlevels have the same names, but these are mapped to more self explanatory ones (in /etc/inittab): &amp;quot;boot&amp;quot;, &amp;quot;default&amp;quot;, &amp;quot;nonetwork&amp;quot;, with the option to add more. The directories that represent them are in &lt;br /&gt;
/etc/runlevels/:&lt;br /&gt;
* /etc/runlevels/boot&lt;br /&gt;
* /etc/runlevels/default&lt;br /&gt;
* /etc/runlevels/nonetwork&lt;br /&gt;
&lt;br /&gt;
In &#039;&#039;&#039;Gentoo&#039;&#039;&#039;, 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).&lt;br /&gt;
&lt;br /&gt;
In &#039;&#039;&#039;both Debian and Gentoo&#039;&#039;&#039;, 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.:&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
 $ ls -l /etc/runlevels/boot/hostname&lt;br /&gt;
 lrwxrwxrwx  1 root root 20 Mar 25  2004 /etc/runlevels/boot/hostname -&amp;gt; /etc/init.d/hostname&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
 $ ls -l rcS.d/S40hostname.sh&lt;br /&gt;
 lrwxrwxrwx  1 root root 21 2004-11-07 00:19 rcS.d/S40hostname.sh -&amp;gt; ../init.d/hostname.sh&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In Alpine, runlevels work like they do in Gentoo:&lt;br /&gt;
&lt;br /&gt;
* /etc/runlevels/boot&lt;br /&gt;
* /etc/runlevels/default&lt;br /&gt;
* /etc/runlevels/sysinit&lt;br /&gt;
* /etc/runlevels/nonetwork&lt;br /&gt;
* /etc/runlevels/shutdown&lt;br /&gt;
&lt;br /&gt;
== Runlevel management ==&lt;br /&gt;
To manage which things to start in which runlevels, use the following commands:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
To see current status of services in runlevels, do:&lt;br /&gt;
 rc-status&lt;br /&gt;
To add sshd to default runlevel, do:&lt;br /&gt;
 rc-update add sshd default&lt;br /&gt;
To remove sshd from all runlevels do:&lt;br /&gt;
 rc-update del sshd&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 rc-update&lt;br /&gt;
To add the cupsd to the default runlevel, do:&lt;br /&gt;
 rc-update add cupsd default&lt;br /&gt;
To remove alsasound from the boot runlevel, do:&lt;br /&gt;
 rc-update del alsasound boot&lt;br /&gt;
Also see this wiki page about [http://gentoo-wiki.com/Rc-update gentoo runlevel management with rc-update]&lt;br /&gt;
&lt;br /&gt;
{{Obsolete|Debian now uses systemd.}}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 update-rc.d&lt;br /&gt;
Configure cupsd to be started in runlevels 2, 3, 4, 5, and stopped in 0, 1, 6, with sequence code 20:&lt;br /&gt;
 update-rc.d cupsd start 20 2 3 4 5 . stop 20 0 1 6 . &lt;br /&gt;
or simply:&lt;br /&gt;
 update-rc.d cupsd defaults &lt;br /&gt;
Remove cupsd from all runlevels:&lt;br /&gt;
 update-rc.d -f cupsd remove&lt;br /&gt;
&lt;br /&gt;
= Config Files =&lt;br /&gt;
&lt;br /&gt;
== /etc/portage/make.conf and use flags ==&lt;br /&gt;
While in Gentoo there&#039;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 &#039;&#039;USE&#039;&#039; 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 &#039;gtk gnome&#039; for Gnome users (and a corresponding -qt -kde -arts) and &#039;qt kde arts&#039; for KDE users. A Gentoo user&#039;s complete set of use flags may look something like this:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;USE=&amp;quot;-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&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Architectures and repositories ==&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Also in /etc/portage/make.conf is the &#039;&#039;&#039;ACCEPT_KEYWORDS&#039;&#039;&#039; setting, with (for an X86-based processor) two settings, &#039;&#039;&#039;x86&#039;&#039;&#039; for stabler packages, and &#039;&#039;&#039;~x86&#039;&#039;&#039; 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&#039;s enough to put a line into that file naming the package (for example &#039;app-foo/bar&#039;). That file might look like this:&lt;br /&gt;
&lt;br /&gt;
 app-crypt/gpg-agent&lt;br /&gt;
 app-text/docbook-xsl-stylesheets&lt;br /&gt;
 =app-text/docbook-xml-dtd-4.3-r1&lt;br /&gt;
&lt;br /&gt;
The last line says, that &#039;&#039;only&#039;&#039; version 4.3-r1 should be unmasked. Older and newer versions will still be ignored.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note for non-x86 users:&#039;&#039;&#039;&lt;br /&gt;
The keywords &#039;&#039;&#039;x86&#039;&#039;&#039; and &#039;&#039;&#039;~x86&#039;&#039;&#039; can of course be replaced by &#039;&#039;&#039;sparc&#039;&#039;&#039; and &#039;&#039;&#039;~sparc&#039;&#039;&#039; for example.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Setting this in Debian is slightly more complicated, and is accomplished by setting different &#039;repositories&#039; in &#039;&#039;/etc/apt/sources.list&#039;&#039; - along with which &#039;tree&#039; to use for packages; in Debian, these are &#039;&#039;&#039;stable&#039;&#039;&#039;, &#039;&#039;&#039;testing&#039;&#039;&#039;, and &#039;&#039;&#039;unstable&#039;&#039;&#039;. An &#039;&#039;/etc/apt/sources.list&#039;&#039; file for a debian testing user may look something like this:&lt;br /&gt;
&lt;br /&gt;
 deb http://mirrors.kernel.org/debian testing main non-free contrib&lt;br /&gt;
 deb ftp://ftp.nerim.net/debian-marillat testing main&lt;br /&gt;
 deb http://security.debian.org testing/updates main contrib non-free&lt;br /&gt;
&lt;br /&gt;
Alternatively, &#039;&#039;/etc/apt/sources.list&#039;&#039; 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 &#039;&#039;/etc/apt/apt.conf&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
   APT::Default-Release &amp;quot;testing&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
Per-package settings go in &#039;&#039;/etc/apt/preferences&#039;&#039;, somewhat like Gentoo&#039;s &#039;&#039;/etc/portage/package.keywords&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== Network ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Alpine uses /etc/network/interfaces, just like Debian. The main reason is because this is the way busybox does it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;/etc/network/interfaces&#039;&#039;:&lt;br /&gt;
 auto eth0&lt;br /&gt;
 iface eth0 inet static&lt;br /&gt;
  address 192.168.0.1&lt;br /&gt;
  netmask 255.255.255.0&lt;br /&gt;
  broadcast 192.168.0.255&lt;br /&gt;
  &lt;br /&gt;
 auto eth0:0&lt;br /&gt;
 iface eth0:0 inet static&lt;br /&gt;
  address 192.168.1.1&lt;br /&gt;
  netmask 255.255.255.0&lt;br /&gt;
  broadcast 192.168.1.255&lt;br /&gt;
 # etc.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;/etc/conf.d/net&#039;&#039;:&lt;br /&gt;
 config_eth0=&amp;quot;192.168.1.100 netmask 255.255.255.0&lt;br /&gt;
              192.168.2.100 netmask 255.255.255.0&amp;quot;&lt;br /&gt;
 routes_eth0=&amp;quot;default via 192.168.1.1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Note that this has changed recently. For more information please refer to http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=4&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;/etc/network/interfaces&#039;&#039;:&lt;br /&gt;
 auto eth0&lt;br /&gt;
 iface eth0 inet static&lt;br /&gt;
  address 192.168.0.1&lt;br /&gt;
  netmask 255.255.255.0&lt;br /&gt;
  broadcast 192.168.0.255&lt;br /&gt;
  &lt;br /&gt;
 auto eth0:0&lt;br /&gt;
 iface eth0:0 inet static&lt;br /&gt;
  address 192.168.1.1&lt;br /&gt;
  netmask 255.255.255.0&lt;br /&gt;
  broadcast 192.168.1.255&lt;br /&gt;
 # etc.&lt;br /&gt;
&lt;br /&gt;
= Comparison chart/Rosetta Stone =&lt;br /&gt;
&lt;br /&gt;
This chart shows how some standard things are done in Alpine compared to other distributions.&lt;br /&gt;
&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Action &lt;br /&gt;
! Alpine ([https://wiki.alpinelinux.org/wiki/Alpine_Linux_package_management apk])&lt;br /&gt;
! Arch Linux ([https://wiki.archlinux.org/index.php/Pacman pacman])&lt;br /&gt;
! Gentoo ([https://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&amp;amp;chap=1 emerge])&lt;br /&gt;
! Debian/Ubuntu ([https://wiki.debian.org/AptCLI apt])&lt;br /&gt;
! Fedora/RHEL/SL/CentOS ([http://yum.baseurl.org/wiki/YumCommands yum])&lt;br /&gt;
! VoidLinux ([https://docs.voidlinux.org/xbps/index.html?highlight=xb#xbps-package-manager XBPS])&lt;br /&gt;
|-&lt;br /&gt;
| Update package database&lt;br /&gt;
| {{Cmd| apk update}}&lt;br /&gt;
| {{Cmd| pacman -Sy}}&lt;br /&gt;
| {{Cmd| emerge --sync}}&lt;br /&gt;
| {{Cmd| apt update}}&lt;br /&gt;
| {{Cmd| yum update}}&lt;br /&gt;
| {{Cmd| xbps-install -S}}&lt;br /&gt;
|-&lt;br /&gt;
| Showing available updates&lt;br /&gt;
| {{Cmd| apk version -l &#039;&amp;lt;&#039;}}&lt;br /&gt;
| {{Cmd| pacman -Qu}}&lt;br /&gt;
| {{Cmd| emerge --deep --update --pretend @world}}&lt;br /&gt;
| {{Cmd| apt upgrade --simulate}}&lt;br /&gt;
| {{Cmd| yum list updates}}&lt;br /&gt;
| {{Cmd| xbps-install -n -u}}&lt;br /&gt;
|-&lt;br /&gt;
| Installing packages&lt;br /&gt;
| {{Cmd| apk add [package name]}}&lt;br /&gt;
| {{Cmd| pacman -S [package name]}}&lt;br /&gt;
| {{Cmd| emerge [package name]}}&lt;br /&gt;
| {{Cmd| apt install [package name]}}&lt;br /&gt;
| {{Cmd| yum install [package name]}}&lt;br /&gt;
| {{Cmd| xbps-install [package name]}}&lt;br /&gt;
|-&lt;br /&gt;
| Update all installed packages&lt;br /&gt;
| {{Cmd| apk upgrade -U -a}}&lt;br /&gt;
| {{Cmd| pacman -Su}}&lt;br /&gt;
| {{Cmd| emerge --update --deep @world}}&lt;br /&gt;
| {{Cmd| apt upgrade}}&lt;br /&gt;
| {{Cmd| yum update}}&lt;br /&gt;
| {{Cmd| xbps-install -u}}&lt;br /&gt;
|- &lt;br /&gt;
| Searching package database&lt;br /&gt;
| {{Cmd| apk search -v &#039;[string]*&#039;}}&lt;br /&gt;
| {{Cmd| pacman -Ss [string]}}&lt;br /&gt;
| {{Cmd| emerge --search [string]}}&lt;br /&gt;
| {{Cmd| apt search [string]}}&lt;br /&gt;
| {{Cmd| yum search [string]}}&lt;br /&gt;
| {{Cmd| xbps-query -Rs [string]}}&lt;br /&gt;
|-&lt;br /&gt;
| Removing packages&lt;br /&gt;
| {{Cmd| apk del [package name]}}&lt;br /&gt;
| {{Cmd| pacman -R [package name]}}&lt;br /&gt;
| {{Cmd| emerge --depclean [package name]}}&lt;br /&gt;
| {{Cmd| apt remove [package name]}}&lt;br /&gt;
| {{Cmd| yum remove [package name]}}&lt;br /&gt;
| {{Cmd| xbps-remove [package name]}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Package Manager]]&lt;/div&gt;</summary>
		<author><name>Winny</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Comparison_with_other_distros&amp;diff=22241</id>
		<title>Comparison with other distros</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Comparison_with_other_distros&amp;diff=22241"/>
		<updated>2022-08-15T18:24:08Z</updated>

		<summary type="html">&lt;p&gt;Winny: /* Directories and files */ systemd&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;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.&lt;br /&gt;
&lt;br /&gt;
{{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]}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Package management =&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Updating package database ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
 apk update&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
 apt update&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
 emerge --sync&lt;br /&gt;
&lt;br /&gt;
== Showing available updates ==&lt;br /&gt;
Show which packages have an update available:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
 apk version -v&lt;br /&gt;
or:&lt;br /&gt;
 apk version -v -l &#039;&amp;lt;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
 emerge --deep --update --pretend @world&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
 apt upgrade --simulate&lt;br /&gt;
&lt;br /&gt;
== Updating a particular package ==&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
 apk add -u package1 package2&lt;br /&gt;
or&lt;br /&gt;
 apk upgrade package1 package2&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
 apt install package1 package2&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
 emerge --update package1 package2&lt;br /&gt;
&lt;br /&gt;
== Installing packages ==&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
 apk add package1 package2&lt;br /&gt;
&lt;br /&gt;
For source compile, see the [[Aports tree]] and the [[abuild]] tool.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
 emerge package1 package2&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
 apt-get install package1 package2&lt;br /&gt;
Debian source compile:&lt;br /&gt;
 apt-get build-dep package1&lt;br /&gt;
 apt-get source package1&lt;br /&gt;
(optional: customize the build by modifying the debian/rules makefile)&lt;br /&gt;
(or set environmental variables like DEB_BUILD_OPTIONS)&lt;br /&gt;
(note that this will make your bug reports invalid to the maintainer)&lt;br /&gt;
 dpkg-buildpackage -rfakeroot -uc -b&lt;br /&gt;
 dpkg -i generatedpackagename&lt;br /&gt;
Simplified source compile:&lt;br /&gt;
 apt-get build-dep package1&lt;br /&gt;
 apt-get -b source package1&lt;br /&gt;
(the packages are automatically generated using the -b switch above)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; 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 &amp;quot;Architectures and repositories&amp;quot; section below.&lt;br /&gt;
&lt;br /&gt;
== Reinstalling particular packages ==&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
 apk del package1 package2 &amp;amp;&amp;amp; apk add package1 package2&lt;br /&gt;
or:&lt;br /&gt;
 apk fix package1 package2&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
 emerge --oneshot package1 package2&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
 apt-get install --reinstall package1 package2&lt;br /&gt;
&lt;br /&gt;
Note: You &#039;&#039;rarely&#039;&#039; need to reinstall a package on Debian&lt;br /&gt;
&lt;br /&gt;
== Searching the package database ==&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Alpine will only search package names.&lt;br /&gt;
 apk search searchword&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
To search the package names and descriptions:&lt;br /&gt;
 emerge --searchdesc searchword&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; On Gentoo, it&#039;s actually much better to install and use the eix package to do a search. You use them like this:&lt;br /&gt;
 eix searchword&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 apt-cache search searchword&lt;br /&gt;
Both emerge and apt-cache search support regular expressions.&lt;br /&gt;
&lt;br /&gt;
To get the long package information on Debian (searching only in package names):&lt;br /&gt;
 apt-cache search --full --names-only searchword&lt;br /&gt;
&lt;br /&gt;
== Removing packages ==&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 apk del package1 package2&lt;br /&gt;
&#039;&#039;apk del&#039;&#039; will remove configuration files when the &#039;&#039;--purge&#039;&#039; flag is used. Make sure you have backups of your configuration files.&lt;br /&gt;
&lt;br /&gt;
You will mostly like to take a quick look at the dependencies before you remove packages recursively.&lt;br /&gt;
&lt;br /&gt;
To see dependencies for a package, use:&lt;br /&gt;
 apk info -R package1 package2&lt;br /&gt;
&lt;br /&gt;
To see if package is required by other packages (is a dependency for another packages), use:&lt;br /&gt;
 apk info -r package1 package2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The correct way to remove packages on gentoo.&lt;br /&gt;
 emerge --depclean package1 package2&lt;br /&gt;
&lt;br /&gt;
In case you know what you&#039;re doing, you may skip dependency checks and potentiality leave your system in broken state.&lt;br /&gt;
 emerge --unmerge package1 package2&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
 apt-get remove package1 package2&lt;br /&gt;
or to remove along with all configuration files&lt;br /&gt;
 apt-get remove --purge package1 package2&lt;br /&gt;
&lt;br /&gt;
== Only downloading packages ==&lt;br /&gt;
This can be useful e.g. if you&#039;re on a dial-up connection and want to download everything first and install later.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
 apk fetch package1 package2&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
 emerge --fetchonly package1 package2&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
 apt-get install --download-only package1 package2&lt;br /&gt;
&lt;br /&gt;
== Cleaning up downloaded packages ==&lt;br /&gt;
Compressed packages that were downloaded for installation can easily consume gigabytes of storage space.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Alpine will clean up packages automatically.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The following command will leave &#039;&#039;/var/cache/distfiles/&#039;&#039; folder intact, while deleting all children.&lt;br /&gt;
&lt;br /&gt;
 find /var/cache/distfiles/ -mindepth 1 -delete&lt;br /&gt;
&lt;br /&gt;
To only remove outdated packages you will need to install the gentoolkit package and use eclean:&lt;br /&gt;
 eclean distfiles&lt;br /&gt;
&lt;br /&gt;
Cleaning temporary files from emerging packages:&lt;br /&gt;
 rm -rf /var/tmp/portage/*&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
 apt-get clean&lt;br /&gt;
Only remove outdated packages:&lt;br /&gt;
 apt-get autoclean&lt;br /&gt;
&lt;br /&gt;
==Reverse dependencies==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
apk-tools will take care of reverse dependencies.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Reverse dependencies are taken care of by dpkg.&lt;br /&gt;
&lt;br /&gt;
= Runlevel &amp;amp; Initscripts =&lt;br /&gt;
Runlevels work pretty conventionally on Debian (see details: [http://archive.fo/ZdZIz systemd]{{dead link}}). On Alpine and Gentoo, they are a bit different.&lt;br /&gt;
&lt;br /&gt;
== Directories and files ==&lt;br /&gt;
{{Obsolete|Debian now uses systemd.}}&lt;br /&gt;
&lt;br /&gt;
In &#039;&#039;&#039;Debian&#039;&#039;&#039;, 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).&lt;br /&gt;
&lt;br /&gt;
* /etc/rc0.d&lt;br /&gt;
* /etc/rc1.d&lt;br /&gt;
* /etc/rcS.d&lt;br /&gt;
* /etc/rc2.d&lt;br /&gt;
* /etc/rc3.d&lt;br /&gt;
* /etc/rc4.d&lt;br /&gt;
* /etc/rc5.d&lt;br /&gt;
* /etc/rc6.d&lt;br /&gt;
&lt;br /&gt;
In &#039;&#039;&#039;Gentoo&#039;&#039;&#039;, runlevels have the same names, but these are mapped to more self explanatory ones (in /etc/inittab): &amp;quot;boot&amp;quot;, &amp;quot;default&amp;quot;, &amp;quot;nonetwork&amp;quot;, with the option to add more. The directories that represent them are in &lt;br /&gt;
/etc/runlevels/:&lt;br /&gt;
* /etc/runlevels/boot&lt;br /&gt;
* /etc/runlevels/default&lt;br /&gt;
* /etc/runlevels/nonetwork&lt;br /&gt;
&lt;br /&gt;
In &#039;&#039;&#039;Gentoo&#039;&#039;&#039;, 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).&lt;br /&gt;
&lt;br /&gt;
In &#039;&#039;&#039;both Debian and Gentoo&#039;&#039;&#039;, 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.:&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
 $ ls -l /etc/runlevels/boot/hostname&lt;br /&gt;
 lrwxrwxrwx  1 root root 20 Mar 25  2004 /etc/runlevels/boot/hostname -&amp;gt; /etc/init.d/hostname&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
 $ ls -l rcS.d/S40hostname.sh&lt;br /&gt;
 lrwxrwxrwx  1 root root 21 2004-11-07 00:19 rcS.d/S40hostname.sh -&amp;gt; ../init.d/hostname.sh&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In Alpine, runlevels work like they do in Gentoo:&lt;br /&gt;
&lt;br /&gt;
* /etc/runlevels/boot&lt;br /&gt;
* /etc/runlevels/default&lt;br /&gt;
* /etc/runlevels/sysinit&lt;br /&gt;
* /etc/runlevels/nonetwork&lt;br /&gt;
* /etc/runlevels/shutdown&lt;br /&gt;
&lt;br /&gt;
== Runlevel management ==&lt;br /&gt;
To manage which things to start in which runlevels, use the following commands:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
To see current status of services in runlevels, do:&lt;br /&gt;
 rc-status&lt;br /&gt;
To add sshd to default runlevel, do:&lt;br /&gt;
 rc-update add sshd default&lt;br /&gt;
To remove sshd from all runlevels do:&lt;br /&gt;
 rc-update del sshd&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 rc-update&lt;br /&gt;
To add the cupsd to the default runlevel, do:&lt;br /&gt;
 rc-update add cupsd default&lt;br /&gt;
To remove alsasound from the boot runlevel, do:&lt;br /&gt;
 rc-update del alsasound boot&lt;br /&gt;
Also see this wiki page about [http://gentoo-wiki.com/Rc-update gentoo runlevel management with rc-update]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 update-rc.d&lt;br /&gt;
Configure cupsd to be started in runlevels 2, 3, 4, 5, and stopped in 0, 1, 6, with sequence code 20:&lt;br /&gt;
 update-rc.d cupsd start 20 2 3 4 5 . stop 20 0 1 6 . &lt;br /&gt;
or simply:&lt;br /&gt;
 update-rc.d cupsd defaults &lt;br /&gt;
Remove cupsd from all runlevels:&lt;br /&gt;
 update-rc.d -f cupsd remove&lt;br /&gt;
&lt;br /&gt;
= Config Files =&lt;br /&gt;
&lt;br /&gt;
== /etc/portage/make.conf and use flags ==&lt;br /&gt;
While in Gentoo there&#039;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 &#039;&#039;USE&#039;&#039; 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 &#039;gtk gnome&#039; for Gnome users (and a corresponding -qt -kde -arts) and &#039;qt kde arts&#039; for KDE users. A Gentoo user&#039;s complete set of use flags may look something like this:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;USE=&amp;quot;-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&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Architectures and repositories ==&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Also in /etc/portage/make.conf is the &#039;&#039;&#039;ACCEPT_KEYWORDS&#039;&#039;&#039; setting, with (for an X86-based processor) two settings, &#039;&#039;&#039;x86&#039;&#039;&#039; for stabler packages, and &#039;&#039;&#039;~x86&#039;&#039;&#039; 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&#039;s enough to put a line into that file naming the package (for example &#039;app-foo/bar&#039;). That file might look like this:&lt;br /&gt;
&lt;br /&gt;
 app-crypt/gpg-agent&lt;br /&gt;
 app-text/docbook-xsl-stylesheets&lt;br /&gt;
 =app-text/docbook-xml-dtd-4.3-r1&lt;br /&gt;
&lt;br /&gt;
The last line says, that &#039;&#039;only&#039;&#039; version 4.3-r1 should be unmasked. Older and newer versions will still be ignored.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note for non-x86 users:&#039;&#039;&#039;&lt;br /&gt;
The keywords &#039;&#039;&#039;x86&#039;&#039;&#039; and &#039;&#039;&#039;~x86&#039;&#039;&#039; can of course be replaced by &#039;&#039;&#039;sparc&#039;&#039;&#039; and &#039;&#039;&#039;~sparc&#039;&#039;&#039; for example.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Setting this in Debian is slightly more complicated, and is accomplished by setting different &#039;repositories&#039; in &#039;&#039;/etc/apt/sources.list&#039;&#039; - along with which &#039;tree&#039; to use for packages; in Debian, these are &#039;&#039;&#039;stable&#039;&#039;&#039;, &#039;&#039;&#039;testing&#039;&#039;&#039;, and &#039;&#039;&#039;unstable&#039;&#039;&#039;. An &#039;&#039;/etc/apt/sources.list&#039;&#039; file for a debian testing user may look something like this:&lt;br /&gt;
&lt;br /&gt;
 deb http://mirrors.kernel.org/debian testing main non-free contrib&lt;br /&gt;
 deb ftp://ftp.nerim.net/debian-marillat testing main&lt;br /&gt;
 deb http://security.debian.org testing/updates main contrib non-free&lt;br /&gt;
&lt;br /&gt;
Alternatively, &#039;&#039;/etc/apt/sources.list&#039;&#039; 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 &#039;&#039;/etc/apt/apt.conf&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
   APT::Default-Release &amp;quot;testing&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
Per-package settings go in &#039;&#039;/etc/apt/preferences&#039;&#039;, somewhat like Gentoo&#039;s &#039;&#039;/etc/portage/package.keywords&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== Network ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Alpine uses /etc/network/interfaces, just like Debian. The main reason is because this is the way busybox does it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;/etc/network/interfaces&#039;&#039;:&lt;br /&gt;
 auto eth0&lt;br /&gt;
 iface eth0 inet static&lt;br /&gt;
  address 192.168.0.1&lt;br /&gt;
  netmask 255.255.255.0&lt;br /&gt;
  broadcast 192.168.0.255&lt;br /&gt;
  &lt;br /&gt;
 auto eth0:0&lt;br /&gt;
 iface eth0:0 inet static&lt;br /&gt;
  address 192.168.1.1&lt;br /&gt;
  netmask 255.255.255.0&lt;br /&gt;
  broadcast 192.168.1.255&lt;br /&gt;
 # etc.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;/etc/conf.d/net&#039;&#039;:&lt;br /&gt;
 config_eth0=&amp;quot;192.168.1.100 netmask 255.255.255.0&lt;br /&gt;
              192.168.2.100 netmask 255.255.255.0&amp;quot;&lt;br /&gt;
 routes_eth0=&amp;quot;default via 192.168.1.1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Note that this has changed recently. For more information please refer to http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=4&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;/etc/network/interfaces&#039;&#039;:&lt;br /&gt;
 auto eth0&lt;br /&gt;
 iface eth0 inet static&lt;br /&gt;
  address 192.168.0.1&lt;br /&gt;
  netmask 255.255.255.0&lt;br /&gt;
  broadcast 192.168.0.255&lt;br /&gt;
  &lt;br /&gt;
 auto eth0:0&lt;br /&gt;
 iface eth0:0 inet static&lt;br /&gt;
  address 192.168.1.1&lt;br /&gt;
  netmask 255.255.255.0&lt;br /&gt;
  broadcast 192.168.1.255&lt;br /&gt;
 # etc.&lt;br /&gt;
&lt;br /&gt;
= Comparison chart/Rosetta Stone =&lt;br /&gt;
&lt;br /&gt;
This chart shows how some standard things are done in Alpine compared to other distributions.&lt;br /&gt;
&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Action &lt;br /&gt;
! Alpine ([https://wiki.alpinelinux.org/wiki/Alpine_Linux_package_management apk])&lt;br /&gt;
! Arch Linux ([https://wiki.archlinux.org/index.php/Pacman pacman])&lt;br /&gt;
! Gentoo ([https://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&amp;amp;chap=1 emerge])&lt;br /&gt;
! Debian/Ubuntu ([https://wiki.debian.org/AptCLI apt])&lt;br /&gt;
! Fedora/RHEL/SL/CentOS ([http://yum.baseurl.org/wiki/YumCommands yum])&lt;br /&gt;
! VoidLinux ([https://docs.voidlinux.org/xbps/index.html?highlight=xb#xbps-package-manager XBPS])&lt;br /&gt;
|-&lt;br /&gt;
| Update package database&lt;br /&gt;
| {{Cmd| apk update}}&lt;br /&gt;
| {{Cmd| pacman -Sy}}&lt;br /&gt;
| {{Cmd| emerge --sync}}&lt;br /&gt;
| {{Cmd| apt update}}&lt;br /&gt;
| {{Cmd| yum update}}&lt;br /&gt;
| {{Cmd| xbps-install -S}}&lt;br /&gt;
|-&lt;br /&gt;
| Showing available updates&lt;br /&gt;
| {{Cmd| apk version -l &#039;&amp;lt;&#039;}}&lt;br /&gt;
| {{Cmd| pacman -Qu}}&lt;br /&gt;
| {{Cmd| emerge --deep --update --pretend @world}}&lt;br /&gt;
| {{Cmd| apt upgrade --simulate}}&lt;br /&gt;
| {{Cmd| yum list updates}}&lt;br /&gt;
| {{Cmd| xbps-install -n -u}}&lt;br /&gt;
|-&lt;br /&gt;
| Installing packages&lt;br /&gt;
| {{Cmd| apk add [package name]}}&lt;br /&gt;
| {{Cmd| pacman -S [package name]}}&lt;br /&gt;
| {{Cmd| emerge [package name]}}&lt;br /&gt;
| {{Cmd| apt install [package name]}}&lt;br /&gt;
| {{Cmd| yum install [package name]}}&lt;br /&gt;
| {{Cmd| xbps-install [package name]}}&lt;br /&gt;
|-&lt;br /&gt;
| Update all installed packages&lt;br /&gt;
| {{Cmd| apk upgrade -U -a}}&lt;br /&gt;
| {{Cmd| pacman -Su}}&lt;br /&gt;
| {{Cmd| emerge --update --deep @world}}&lt;br /&gt;
| {{Cmd| apt upgrade}}&lt;br /&gt;
| {{Cmd| yum update}}&lt;br /&gt;
| {{Cmd| xbps-install -u}}&lt;br /&gt;
|- &lt;br /&gt;
| Searching package database&lt;br /&gt;
| {{Cmd| apk search -v &#039;[string]*&#039;}}&lt;br /&gt;
| {{Cmd| pacman -Ss [string]}}&lt;br /&gt;
| {{Cmd| emerge --search [string]}}&lt;br /&gt;
| {{Cmd| apt search [string]}}&lt;br /&gt;
| {{Cmd| yum search [string]}}&lt;br /&gt;
| {{Cmd| xbps-query -Rs [string]}}&lt;br /&gt;
|-&lt;br /&gt;
| Removing packages&lt;br /&gt;
| {{Cmd| apk del [package name]}}&lt;br /&gt;
| {{Cmd| pacman -R [package name]}}&lt;br /&gt;
| {{Cmd| emerge --depclean [package name]}}&lt;br /&gt;
| {{Cmd| apt remove [package name]}}&lt;br /&gt;
| {{Cmd| yum remove [package name]}}&lt;br /&gt;
| {{Cmd| xbps-remove [package name]}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Package Manager]]&lt;/div&gt;</summary>
		<author><name>Winny</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Comparison_with_other_distros&amp;diff=22240</id>
		<title>Comparison with other distros</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Comparison_with_other_distros&amp;diff=22240"/>
		<updated>2022-08-15T18:23:36Z</updated>

		<summary type="html">&lt;p&gt;Winny: /* Reverse dependencies */ you never need revdep-rebuild anymore&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;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.&lt;br /&gt;
&lt;br /&gt;
{{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]}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Package management =&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Updating package database ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
 apk update&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
 apt update&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
 emerge --sync&lt;br /&gt;
&lt;br /&gt;
== Showing available updates ==&lt;br /&gt;
Show which packages have an update available:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
 apk version -v&lt;br /&gt;
or:&lt;br /&gt;
 apk version -v -l &#039;&amp;lt;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
 emerge --deep --update --pretend @world&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
 apt upgrade --simulate&lt;br /&gt;
&lt;br /&gt;
== Updating a particular package ==&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
 apk add -u package1 package2&lt;br /&gt;
or&lt;br /&gt;
 apk upgrade package1 package2&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
 apt install package1 package2&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
 emerge --update package1 package2&lt;br /&gt;
&lt;br /&gt;
== Installing packages ==&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
 apk add package1 package2&lt;br /&gt;
&lt;br /&gt;
For source compile, see the [[Aports tree]] and the [[abuild]] tool.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
 emerge package1 package2&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
 apt-get install package1 package2&lt;br /&gt;
Debian source compile:&lt;br /&gt;
 apt-get build-dep package1&lt;br /&gt;
 apt-get source package1&lt;br /&gt;
(optional: customize the build by modifying the debian/rules makefile)&lt;br /&gt;
(or set environmental variables like DEB_BUILD_OPTIONS)&lt;br /&gt;
(note that this will make your bug reports invalid to the maintainer)&lt;br /&gt;
 dpkg-buildpackage -rfakeroot -uc -b&lt;br /&gt;
 dpkg -i generatedpackagename&lt;br /&gt;
Simplified source compile:&lt;br /&gt;
 apt-get build-dep package1&lt;br /&gt;
 apt-get -b source package1&lt;br /&gt;
(the packages are automatically generated using the -b switch above)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; 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 &amp;quot;Architectures and repositories&amp;quot; section below.&lt;br /&gt;
&lt;br /&gt;
== Reinstalling particular packages ==&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
 apk del package1 package2 &amp;amp;&amp;amp; apk add package1 package2&lt;br /&gt;
or:&lt;br /&gt;
 apk fix package1 package2&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
 emerge --oneshot package1 package2&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
 apt-get install --reinstall package1 package2&lt;br /&gt;
&lt;br /&gt;
Note: You &#039;&#039;rarely&#039;&#039; need to reinstall a package on Debian&lt;br /&gt;
&lt;br /&gt;
== Searching the package database ==&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Alpine will only search package names.&lt;br /&gt;
 apk search searchword&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
To search the package names and descriptions:&lt;br /&gt;
 emerge --searchdesc searchword&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; On Gentoo, it&#039;s actually much better to install and use the eix package to do a search. You use them like this:&lt;br /&gt;
 eix searchword&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 apt-cache search searchword&lt;br /&gt;
Both emerge and apt-cache search support regular expressions.&lt;br /&gt;
&lt;br /&gt;
To get the long package information on Debian (searching only in package names):&lt;br /&gt;
 apt-cache search --full --names-only searchword&lt;br /&gt;
&lt;br /&gt;
== Removing packages ==&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 apk del package1 package2&lt;br /&gt;
&#039;&#039;apk del&#039;&#039; will remove configuration files when the &#039;&#039;--purge&#039;&#039; flag is used. Make sure you have backups of your configuration files.&lt;br /&gt;
&lt;br /&gt;
You will mostly like to take a quick look at the dependencies before you remove packages recursively.&lt;br /&gt;
&lt;br /&gt;
To see dependencies for a package, use:&lt;br /&gt;
 apk info -R package1 package2&lt;br /&gt;
&lt;br /&gt;
To see if package is required by other packages (is a dependency for another packages), use:&lt;br /&gt;
 apk info -r package1 package2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The correct way to remove packages on gentoo.&lt;br /&gt;
 emerge --depclean package1 package2&lt;br /&gt;
&lt;br /&gt;
In case you know what you&#039;re doing, you may skip dependency checks and potentiality leave your system in broken state.&lt;br /&gt;
 emerge --unmerge package1 package2&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
 apt-get remove package1 package2&lt;br /&gt;
or to remove along with all configuration files&lt;br /&gt;
 apt-get remove --purge package1 package2&lt;br /&gt;
&lt;br /&gt;
== Only downloading packages ==&lt;br /&gt;
This can be useful e.g. if you&#039;re on a dial-up connection and want to download everything first and install later.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
 apk fetch package1 package2&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
 emerge --fetchonly package1 package2&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
 apt-get install --download-only package1 package2&lt;br /&gt;
&lt;br /&gt;
== Cleaning up downloaded packages ==&lt;br /&gt;
Compressed packages that were downloaded for installation can easily consume gigabytes of storage space.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Alpine will clean up packages automatically.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The following command will leave &#039;&#039;/var/cache/distfiles/&#039;&#039; folder intact, while deleting all children.&lt;br /&gt;
&lt;br /&gt;
 find /var/cache/distfiles/ -mindepth 1 -delete&lt;br /&gt;
&lt;br /&gt;
To only remove outdated packages you will need to install the gentoolkit package and use eclean:&lt;br /&gt;
 eclean distfiles&lt;br /&gt;
&lt;br /&gt;
Cleaning temporary files from emerging packages:&lt;br /&gt;
 rm -rf /var/tmp/portage/*&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
 apt-get clean&lt;br /&gt;
Only remove outdated packages:&lt;br /&gt;
 apt-get autoclean&lt;br /&gt;
&lt;br /&gt;
==Reverse dependencies==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
apk-tools will take care of reverse dependencies.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Reverse dependencies are taken care of by dpkg.&lt;br /&gt;
&lt;br /&gt;
= Runlevel &amp;amp; Initscripts =&lt;br /&gt;
Runlevels work pretty conventionally on Debian (see details: [http://archive.fo/ZdZIz systemd]{{dead link}}). On Alpine and Gentoo, they are a bit different.&lt;br /&gt;
&lt;br /&gt;
== Directories and files ==&lt;br /&gt;
In &#039;&#039;&#039;Debian&#039;&#039;&#039;, 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).&lt;br /&gt;
&lt;br /&gt;
* /etc/rc0.d&lt;br /&gt;
* /etc/rc1.d&lt;br /&gt;
* /etc/rcS.d&lt;br /&gt;
* /etc/rc2.d&lt;br /&gt;
* /etc/rc3.d&lt;br /&gt;
* /etc/rc4.d&lt;br /&gt;
* /etc/rc5.d&lt;br /&gt;
* /etc/rc6.d&lt;br /&gt;
&lt;br /&gt;
In &#039;&#039;&#039;Gentoo&#039;&#039;&#039;, runlevels have the same names, but these are mapped to more self explanatory ones (in /etc/inittab): &amp;quot;boot&amp;quot;, &amp;quot;default&amp;quot;, &amp;quot;nonetwork&amp;quot;, with the option to add more. The directories that represent them are in &lt;br /&gt;
/etc/runlevels/:&lt;br /&gt;
* /etc/runlevels/boot&lt;br /&gt;
* /etc/runlevels/default&lt;br /&gt;
* /etc/runlevels/nonetwork&lt;br /&gt;
&lt;br /&gt;
In &#039;&#039;&#039;Gentoo&#039;&#039;&#039;, 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).&lt;br /&gt;
&lt;br /&gt;
In &#039;&#039;&#039;both Debian and Gentoo&#039;&#039;&#039;, 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.:&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
 $ ls -l /etc/runlevels/boot/hostname&lt;br /&gt;
 lrwxrwxrwx  1 root root 20 Mar 25  2004 /etc/runlevels/boot/hostname -&amp;gt; /etc/init.d/hostname&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
 $ ls -l rcS.d/S40hostname.sh&lt;br /&gt;
 lrwxrwxrwx  1 root root 21 2004-11-07 00:19 rcS.d/S40hostname.sh -&amp;gt; ../init.d/hostname.sh&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In Alpine, runlevels work like they do in Gentoo:&lt;br /&gt;
&lt;br /&gt;
* /etc/runlevels/boot&lt;br /&gt;
* /etc/runlevels/default&lt;br /&gt;
* /etc/runlevels/sysinit&lt;br /&gt;
* /etc/runlevels/nonetwork&lt;br /&gt;
* /etc/runlevels/shutdown&lt;br /&gt;
&lt;br /&gt;
== Runlevel management ==&lt;br /&gt;
To manage which things to start in which runlevels, use the following commands:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
To see current status of services in runlevels, do:&lt;br /&gt;
 rc-status&lt;br /&gt;
To add sshd to default runlevel, do:&lt;br /&gt;
 rc-update add sshd default&lt;br /&gt;
To remove sshd from all runlevels do:&lt;br /&gt;
 rc-update del sshd&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 rc-update&lt;br /&gt;
To add the cupsd to the default runlevel, do:&lt;br /&gt;
 rc-update add cupsd default&lt;br /&gt;
To remove alsasound from the boot runlevel, do:&lt;br /&gt;
 rc-update del alsasound boot&lt;br /&gt;
Also see this wiki page about [http://gentoo-wiki.com/Rc-update gentoo runlevel management with rc-update]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 update-rc.d&lt;br /&gt;
Configure cupsd to be started in runlevels 2, 3, 4, 5, and stopped in 0, 1, 6, with sequence code 20:&lt;br /&gt;
 update-rc.d cupsd start 20 2 3 4 5 . stop 20 0 1 6 . &lt;br /&gt;
or simply:&lt;br /&gt;
 update-rc.d cupsd defaults &lt;br /&gt;
Remove cupsd from all runlevels:&lt;br /&gt;
 update-rc.d -f cupsd remove&lt;br /&gt;
&lt;br /&gt;
= Config Files =&lt;br /&gt;
&lt;br /&gt;
== /etc/portage/make.conf and use flags ==&lt;br /&gt;
While in Gentoo there&#039;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 &#039;&#039;USE&#039;&#039; 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 &#039;gtk gnome&#039; for Gnome users (and a corresponding -qt -kde -arts) and &#039;qt kde arts&#039; for KDE users. A Gentoo user&#039;s complete set of use flags may look something like this:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;USE=&amp;quot;-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&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Architectures and repositories ==&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Also in /etc/portage/make.conf is the &#039;&#039;&#039;ACCEPT_KEYWORDS&#039;&#039;&#039; setting, with (for an X86-based processor) two settings, &#039;&#039;&#039;x86&#039;&#039;&#039; for stabler packages, and &#039;&#039;&#039;~x86&#039;&#039;&#039; 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&#039;s enough to put a line into that file naming the package (for example &#039;app-foo/bar&#039;). That file might look like this:&lt;br /&gt;
&lt;br /&gt;
 app-crypt/gpg-agent&lt;br /&gt;
 app-text/docbook-xsl-stylesheets&lt;br /&gt;
 =app-text/docbook-xml-dtd-4.3-r1&lt;br /&gt;
&lt;br /&gt;
The last line says, that &#039;&#039;only&#039;&#039; version 4.3-r1 should be unmasked. Older and newer versions will still be ignored.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note for non-x86 users:&#039;&#039;&#039;&lt;br /&gt;
The keywords &#039;&#039;&#039;x86&#039;&#039;&#039; and &#039;&#039;&#039;~x86&#039;&#039;&#039; can of course be replaced by &#039;&#039;&#039;sparc&#039;&#039;&#039; and &#039;&#039;&#039;~sparc&#039;&#039;&#039; for example.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Setting this in Debian is slightly more complicated, and is accomplished by setting different &#039;repositories&#039; in &#039;&#039;/etc/apt/sources.list&#039;&#039; - along with which &#039;tree&#039; to use for packages; in Debian, these are &#039;&#039;&#039;stable&#039;&#039;&#039;, &#039;&#039;&#039;testing&#039;&#039;&#039;, and &#039;&#039;&#039;unstable&#039;&#039;&#039;. An &#039;&#039;/etc/apt/sources.list&#039;&#039; file for a debian testing user may look something like this:&lt;br /&gt;
&lt;br /&gt;
 deb http://mirrors.kernel.org/debian testing main non-free contrib&lt;br /&gt;
 deb ftp://ftp.nerim.net/debian-marillat testing main&lt;br /&gt;
 deb http://security.debian.org testing/updates main contrib non-free&lt;br /&gt;
&lt;br /&gt;
Alternatively, &#039;&#039;/etc/apt/sources.list&#039;&#039; 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 &#039;&#039;/etc/apt/apt.conf&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
   APT::Default-Release &amp;quot;testing&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
Per-package settings go in &#039;&#039;/etc/apt/preferences&#039;&#039;, somewhat like Gentoo&#039;s &#039;&#039;/etc/portage/package.keywords&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== Network ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Alpine uses /etc/network/interfaces, just like Debian. The main reason is because this is the way busybox does it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;/etc/network/interfaces&#039;&#039;:&lt;br /&gt;
 auto eth0&lt;br /&gt;
 iface eth0 inet static&lt;br /&gt;
  address 192.168.0.1&lt;br /&gt;
  netmask 255.255.255.0&lt;br /&gt;
  broadcast 192.168.0.255&lt;br /&gt;
  &lt;br /&gt;
 auto eth0:0&lt;br /&gt;
 iface eth0:0 inet static&lt;br /&gt;
  address 192.168.1.1&lt;br /&gt;
  netmask 255.255.255.0&lt;br /&gt;
  broadcast 192.168.1.255&lt;br /&gt;
 # etc.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;/etc/conf.d/net&#039;&#039;:&lt;br /&gt;
 config_eth0=&amp;quot;192.168.1.100 netmask 255.255.255.0&lt;br /&gt;
              192.168.2.100 netmask 255.255.255.0&amp;quot;&lt;br /&gt;
 routes_eth0=&amp;quot;default via 192.168.1.1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Note that this has changed recently. For more information please refer to http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=4&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;/etc/network/interfaces&#039;&#039;:&lt;br /&gt;
 auto eth0&lt;br /&gt;
 iface eth0 inet static&lt;br /&gt;
  address 192.168.0.1&lt;br /&gt;
  netmask 255.255.255.0&lt;br /&gt;
  broadcast 192.168.0.255&lt;br /&gt;
  &lt;br /&gt;
 auto eth0:0&lt;br /&gt;
 iface eth0:0 inet static&lt;br /&gt;
  address 192.168.1.1&lt;br /&gt;
  netmask 255.255.255.0&lt;br /&gt;
  broadcast 192.168.1.255&lt;br /&gt;
 # etc.&lt;br /&gt;
&lt;br /&gt;
= Comparison chart/Rosetta Stone =&lt;br /&gt;
&lt;br /&gt;
This chart shows how some standard things are done in Alpine compared to other distributions.&lt;br /&gt;
&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Action &lt;br /&gt;
! Alpine ([https://wiki.alpinelinux.org/wiki/Alpine_Linux_package_management apk])&lt;br /&gt;
! Arch Linux ([https://wiki.archlinux.org/index.php/Pacman pacman])&lt;br /&gt;
! Gentoo ([https://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&amp;amp;chap=1 emerge])&lt;br /&gt;
! Debian/Ubuntu ([https://wiki.debian.org/AptCLI apt])&lt;br /&gt;
! Fedora/RHEL/SL/CentOS ([http://yum.baseurl.org/wiki/YumCommands yum])&lt;br /&gt;
! VoidLinux ([https://docs.voidlinux.org/xbps/index.html?highlight=xb#xbps-package-manager XBPS])&lt;br /&gt;
|-&lt;br /&gt;
| Update package database&lt;br /&gt;
| {{Cmd| apk update}}&lt;br /&gt;
| {{Cmd| pacman -Sy}}&lt;br /&gt;
| {{Cmd| emerge --sync}}&lt;br /&gt;
| {{Cmd| apt update}}&lt;br /&gt;
| {{Cmd| yum update}}&lt;br /&gt;
| {{Cmd| xbps-install -S}}&lt;br /&gt;
|-&lt;br /&gt;
| Showing available updates&lt;br /&gt;
| {{Cmd| apk version -l &#039;&amp;lt;&#039;}}&lt;br /&gt;
| {{Cmd| pacman -Qu}}&lt;br /&gt;
| {{Cmd| emerge --deep --update --pretend @world}}&lt;br /&gt;
| {{Cmd| apt upgrade --simulate}}&lt;br /&gt;
| {{Cmd| yum list updates}}&lt;br /&gt;
| {{Cmd| xbps-install -n -u}}&lt;br /&gt;
|-&lt;br /&gt;
| Installing packages&lt;br /&gt;
| {{Cmd| apk add [package name]}}&lt;br /&gt;
| {{Cmd| pacman -S [package name]}}&lt;br /&gt;
| {{Cmd| emerge [package name]}}&lt;br /&gt;
| {{Cmd| apt install [package name]}}&lt;br /&gt;
| {{Cmd| yum install [package name]}}&lt;br /&gt;
| {{Cmd| xbps-install [package name]}}&lt;br /&gt;
|-&lt;br /&gt;
| Update all installed packages&lt;br /&gt;
| {{Cmd| apk upgrade -U -a}}&lt;br /&gt;
| {{Cmd| pacman -Su}}&lt;br /&gt;
| {{Cmd| emerge --update --deep @world}}&lt;br /&gt;
| {{Cmd| apt upgrade}}&lt;br /&gt;
| {{Cmd| yum update}}&lt;br /&gt;
| {{Cmd| xbps-install -u}}&lt;br /&gt;
|- &lt;br /&gt;
| Searching package database&lt;br /&gt;
| {{Cmd| apk search -v &#039;[string]*&#039;}}&lt;br /&gt;
| {{Cmd| pacman -Ss [string]}}&lt;br /&gt;
| {{Cmd| emerge --search [string]}}&lt;br /&gt;
| {{Cmd| apt search [string]}}&lt;br /&gt;
| {{Cmd| yum search [string]}}&lt;br /&gt;
| {{Cmd| xbps-query -Rs [string]}}&lt;br /&gt;
|-&lt;br /&gt;
| Removing packages&lt;br /&gt;
| {{Cmd| apk del [package name]}}&lt;br /&gt;
| {{Cmd| pacman -R [package name]}}&lt;br /&gt;
| {{Cmd| emerge --depclean [package name]}}&lt;br /&gt;
| {{Cmd| apt remove [package name]}}&lt;br /&gt;
| {{Cmd| yum remove [package name]}}&lt;br /&gt;
| {{Cmd| xbps-remove [package name]}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Package Manager]]&lt;/div&gt;</summary>
		<author><name>Winny</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Comparison_with_other_distros&amp;diff=22239</id>
		<title>Comparison with other distros</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Comparison_with_other_distros&amp;diff=22239"/>
		<updated>2022-08-15T18:21:25Z</updated>

		<summary type="html">&lt;p&gt;Winny: /* Cleaning up downloaded packages */ less foot gun&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;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.&lt;br /&gt;
&lt;br /&gt;
{{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]}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Package management =&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Updating package database ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
 apk update&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
 apt update&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
 emerge --sync&lt;br /&gt;
&lt;br /&gt;
== Showing available updates ==&lt;br /&gt;
Show which packages have an update available:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
 apk version -v&lt;br /&gt;
or:&lt;br /&gt;
 apk version -v -l &#039;&amp;lt;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
 emerge --deep --update --pretend @world&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
 apt upgrade --simulate&lt;br /&gt;
&lt;br /&gt;
== Updating a particular package ==&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
 apk add -u package1 package2&lt;br /&gt;
or&lt;br /&gt;
 apk upgrade package1 package2&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
 apt install package1 package2&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
 emerge --update package1 package2&lt;br /&gt;
&lt;br /&gt;
== Installing packages ==&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
 apk add package1 package2&lt;br /&gt;
&lt;br /&gt;
For source compile, see the [[Aports tree]] and the [[abuild]] tool.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
 emerge package1 package2&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
 apt-get install package1 package2&lt;br /&gt;
Debian source compile:&lt;br /&gt;
 apt-get build-dep package1&lt;br /&gt;
 apt-get source package1&lt;br /&gt;
(optional: customize the build by modifying the debian/rules makefile)&lt;br /&gt;
(or set environmental variables like DEB_BUILD_OPTIONS)&lt;br /&gt;
(note that this will make your bug reports invalid to the maintainer)&lt;br /&gt;
 dpkg-buildpackage -rfakeroot -uc -b&lt;br /&gt;
 dpkg -i generatedpackagename&lt;br /&gt;
Simplified source compile:&lt;br /&gt;
 apt-get build-dep package1&lt;br /&gt;
 apt-get -b source package1&lt;br /&gt;
(the packages are automatically generated using the -b switch above)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; 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 &amp;quot;Architectures and repositories&amp;quot; section below.&lt;br /&gt;
&lt;br /&gt;
== Reinstalling particular packages ==&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
 apk del package1 package2 &amp;amp;&amp;amp; apk add package1 package2&lt;br /&gt;
or:&lt;br /&gt;
 apk fix package1 package2&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
 emerge --oneshot package1 package2&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
 apt-get install --reinstall package1 package2&lt;br /&gt;
&lt;br /&gt;
Note: You &#039;&#039;rarely&#039;&#039; need to reinstall a package on Debian&lt;br /&gt;
&lt;br /&gt;
== Searching the package database ==&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Alpine will only search package names.&lt;br /&gt;
 apk search searchword&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
To search the package names and descriptions:&lt;br /&gt;
 emerge --searchdesc searchword&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; On Gentoo, it&#039;s actually much better to install and use the eix package to do a search. You use them like this:&lt;br /&gt;
 eix searchword&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 apt-cache search searchword&lt;br /&gt;
Both emerge and apt-cache search support regular expressions.&lt;br /&gt;
&lt;br /&gt;
To get the long package information on Debian (searching only in package names):&lt;br /&gt;
 apt-cache search --full --names-only searchword&lt;br /&gt;
&lt;br /&gt;
== Removing packages ==&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 apk del package1 package2&lt;br /&gt;
&#039;&#039;apk del&#039;&#039; will remove configuration files when the &#039;&#039;--purge&#039;&#039; flag is used. Make sure you have backups of your configuration files.&lt;br /&gt;
&lt;br /&gt;
You will mostly like to take a quick look at the dependencies before you remove packages recursively.&lt;br /&gt;
&lt;br /&gt;
To see dependencies for a package, use:&lt;br /&gt;
 apk info -R package1 package2&lt;br /&gt;
&lt;br /&gt;
To see if package is required by other packages (is a dependency for another packages), use:&lt;br /&gt;
 apk info -r package1 package2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The correct way to remove packages on gentoo.&lt;br /&gt;
 emerge --depclean package1 package2&lt;br /&gt;
&lt;br /&gt;
In case you know what you&#039;re doing, you may skip dependency checks and potentiality leave your system in broken state.&lt;br /&gt;
 emerge --unmerge package1 package2&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
 apt-get remove package1 package2&lt;br /&gt;
or to remove along with all configuration files&lt;br /&gt;
 apt-get remove --purge package1 package2&lt;br /&gt;
&lt;br /&gt;
== Only downloading packages ==&lt;br /&gt;
This can be useful e.g. if you&#039;re on a dial-up connection and want to download everything first and install later.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
 apk fetch package1 package2&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
 emerge --fetchonly package1 package2&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
 apt-get install --download-only package1 package2&lt;br /&gt;
&lt;br /&gt;
== Cleaning up downloaded packages ==&lt;br /&gt;
Compressed packages that were downloaded for installation can easily consume gigabytes of storage space.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Alpine will clean up packages automatically.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The following command will leave &#039;&#039;/var/cache/distfiles/&#039;&#039; folder intact, while deleting all children.&lt;br /&gt;
&lt;br /&gt;
 find /var/cache/distfiles/ -mindepth 1 -delete&lt;br /&gt;
&lt;br /&gt;
To only remove outdated packages you will need to install the gentoolkit package and use eclean:&lt;br /&gt;
 eclean distfiles&lt;br /&gt;
&lt;br /&gt;
Cleaning temporary files from emerging packages:&lt;br /&gt;
 rm -rf /var/tmp/portage/*&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
 apt-get clean&lt;br /&gt;
Only remove outdated packages:&lt;br /&gt;
 apt-get autoclean&lt;br /&gt;
&lt;br /&gt;
==Reverse dependencies==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
apk-tools will take care of reverse dependencies.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Reverse dependencies are a major drawback of Gentoo&#039;s current portage implementation: It does not take care of them at all at the moment.&lt;br /&gt;
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).&lt;br /&gt;
&lt;br /&gt;
 revdep-rebuild&lt;br /&gt;
can fix broken dependencies broken by&lt;br /&gt;
emerge --depclean&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Reverse dependencies are taken care of by dpkg.&lt;br /&gt;
&lt;br /&gt;
= Runlevel &amp;amp; Initscripts =&lt;br /&gt;
Runlevels work pretty conventionally on Debian (see details: [http://archive.fo/ZdZIz systemd]{{dead link}}). On Alpine and Gentoo, they are a bit different.&lt;br /&gt;
&lt;br /&gt;
== Directories and files ==&lt;br /&gt;
In &#039;&#039;&#039;Debian&#039;&#039;&#039;, 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).&lt;br /&gt;
&lt;br /&gt;
* /etc/rc0.d&lt;br /&gt;
* /etc/rc1.d&lt;br /&gt;
* /etc/rcS.d&lt;br /&gt;
* /etc/rc2.d&lt;br /&gt;
* /etc/rc3.d&lt;br /&gt;
* /etc/rc4.d&lt;br /&gt;
* /etc/rc5.d&lt;br /&gt;
* /etc/rc6.d&lt;br /&gt;
&lt;br /&gt;
In &#039;&#039;&#039;Gentoo&#039;&#039;&#039;, runlevels have the same names, but these are mapped to more self explanatory ones (in /etc/inittab): &amp;quot;boot&amp;quot;, &amp;quot;default&amp;quot;, &amp;quot;nonetwork&amp;quot;, with the option to add more. The directories that represent them are in &lt;br /&gt;
/etc/runlevels/:&lt;br /&gt;
* /etc/runlevels/boot&lt;br /&gt;
* /etc/runlevels/default&lt;br /&gt;
* /etc/runlevels/nonetwork&lt;br /&gt;
&lt;br /&gt;
In &#039;&#039;&#039;Gentoo&#039;&#039;&#039;, 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).&lt;br /&gt;
&lt;br /&gt;
In &#039;&#039;&#039;both Debian and Gentoo&#039;&#039;&#039;, 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.:&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
 $ ls -l /etc/runlevels/boot/hostname&lt;br /&gt;
 lrwxrwxrwx  1 root root 20 Mar 25  2004 /etc/runlevels/boot/hostname -&amp;gt; /etc/init.d/hostname&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
 $ ls -l rcS.d/S40hostname.sh&lt;br /&gt;
 lrwxrwxrwx  1 root root 21 2004-11-07 00:19 rcS.d/S40hostname.sh -&amp;gt; ../init.d/hostname.sh&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In Alpine, runlevels work like they do in Gentoo:&lt;br /&gt;
&lt;br /&gt;
* /etc/runlevels/boot&lt;br /&gt;
* /etc/runlevels/default&lt;br /&gt;
* /etc/runlevels/sysinit&lt;br /&gt;
* /etc/runlevels/nonetwork&lt;br /&gt;
* /etc/runlevels/shutdown&lt;br /&gt;
&lt;br /&gt;
== Runlevel management ==&lt;br /&gt;
To manage which things to start in which runlevels, use the following commands:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
To see current status of services in runlevels, do:&lt;br /&gt;
 rc-status&lt;br /&gt;
To add sshd to default runlevel, do:&lt;br /&gt;
 rc-update add sshd default&lt;br /&gt;
To remove sshd from all runlevels do:&lt;br /&gt;
 rc-update del sshd&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 rc-update&lt;br /&gt;
To add the cupsd to the default runlevel, do:&lt;br /&gt;
 rc-update add cupsd default&lt;br /&gt;
To remove alsasound from the boot runlevel, do:&lt;br /&gt;
 rc-update del alsasound boot&lt;br /&gt;
Also see this wiki page about [http://gentoo-wiki.com/Rc-update gentoo runlevel management with rc-update]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 update-rc.d&lt;br /&gt;
Configure cupsd to be started in runlevels 2, 3, 4, 5, and stopped in 0, 1, 6, with sequence code 20:&lt;br /&gt;
 update-rc.d cupsd start 20 2 3 4 5 . stop 20 0 1 6 . &lt;br /&gt;
or simply:&lt;br /&gt;
 update-rc.d cupsd defaults &lt;br /&gt;
Remove cupsd from all runlevels:&lt;br /&gt;
 update-rc.d -f cupsd remove&lt;br /&gt;
&lt;br /&gt;
= Config Files =&lt;br /&gt;
&lt;br /&gt;
== /etc/portage/make.conf and use flags ==&lt;br /&gt;
While in Gentoo there&#039;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 &#039;&#039;USE&#039;&#039; 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 &#039;gtk gnome&#039; for Gnome users (and a corresponding -qt -kde -arts) and &#039;qt kde arts&#039; for KDE users. A Gentoo user&#039;s complete set of use flags may look something like this:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;USE=&amp;quot;-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&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Architectures and repositories ==&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Also in /etc/portage/make.conf is the &#039;&#039;&#039;ACCEPT_KEYWORDS&#039;&#039;&#039; setting, with (for an X86-based processor) two settings, &#039;&#039;&#039;x86&#039;&#039;&#039; for stabler packages, and &#039;&#039;&#039;~x86&#039;&#039;&#039; 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&#039;s enough to put a line into that file naming the package (for example &#039;app-foo/bar&#039;). That file might look like this:&lt;br /&gt;
&lt;br /&gt;
 app-crypt/gpg-agent&lt;br /&gt;
 app-text/docbook-xsl-stylesheets&lt;br /&gt;
 =app-text/docbook-xml-dtd-4.3-r1&lt;br /&gt;
&lt;br /&gt;
The last line says, that &#039;&#039;only&#039;&#039; version 4.3-r1 should be unmasked. Older and newer versions will still be ignored.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note for non-x86 users:&#039;&#039;&#039;&lt;br /&gt;
The keywords &#039;&#039;&#039;x86&#039;&#039;&#039; and &#039;&#039;&#039;~x86&#039;&#039;&#039; can of course be replaced by &#039;&#039;&#039;sparc&#039;&#039;&#039; and &#039;&#039;&#039;~sparc&#039;&#039;&#039; for example.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Setting this in Debian is slightly more complicated, and is accomplished by setting different &#039;repositories&#039; in &#039;&#039;/etc/apt/sources.list&#039;&#039; - along with which &#039;tree&#039; to use for packages; in Debian, these are &#039;&#039;&#039;stable&#039;&#039;&#039;, &#039;&#039;&#039;testing&#039;&#039;&#039;, and &#039;&#039;&#039;unstable&#039;&#039;&#039;. An &#039;&#039;/etc/apt/sources.list&#039;&#039; file for a debian testing user may look something like this:&lt;br /&gt;
&lt;br /&gt;
 deb http://mirrors.kernel.org/debian testing main non-free contrib&lt;br /&gt;
 deb ftp://ftp.nerim.net/debian-marillat testing main&lt;br /&gt;
 deb http://security.debian.org testing/updates main contrib non-free&lt;br /&gt;
&lt;br /&gt;
Alternatively, &#039;&#039;/etc/apt/sources.list&#039;&#039; 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 &#039;&#039;/etc/apt/apt.conf&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
   APT::Default-Release &amp;quot;testing&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
Per-package settings go in &#039;&#039;/etc/apt/preferences&#039;&#039;, somewhat like Gentoo&#039;s &#039;&#039;/etc/portage/package.keywords&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== Network ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Alpine uses /etc/network/interfaces, just like Debian. The main reason is because this is the way busybox does it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;/etc/network/interfaces&#039;&#039;:&lt;br /&gt;
 auto eth0&lt;br /&gt;
 iface eth0 inet static&lt;br /&gt;
  address 192.168.0.1&lt;br /&gt;
  netmask 255.255.255.0&lt;br /&gt;
  broadcast 192.168.0.255&lt;br /&gt;
  &lt;br /&gt;
 auto eth0:0&lt;br /&gt;
 iface eth0:0 inet static&lt;br /&gt;
  address 192.168.1.1&lt;br /&gt;
  netmask 255.255.255.0&lt;br /&gt;
  broadcast 192.168.1.255&lt;br /&gt;
 # etc.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;/etc/conf.d/net&#039;&#039;:&lt;br /&gt;
 config_eth0=&amp;quot;192.168.1.100 netmask 255.255.255.0&lt;br /&gt;
              192.168.2.100 netmask 255.255.255.0&amp;quot;&lt;br /&gt;
 routes_eth0=&amp;quot;default via 192.168.1.1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Note that this has changed recently. For more information please refer to http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=4&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;/etc/network/interfaces&#039;&#039;:&lt;br /&gt;
 auto eth0&lt;br /&gt;
 iface eth0 inet static&lt;br /&gt;
  address 192.168.0.1&lt;br /&gt;
  netmask 255.255.255.0&lt;br /&gt;
  broadcast 192.168.0.255&lt;br /&gt;
  &lt;br /&gt;
 auto eth0:0&lt;br /&gt;
 iface eth0:0 inet static&lt;br /&gt;
  address 192.168.1.1&lt;br /&gt;
  netmask 255.255.255.0&lt;br /&gt;
  broadcast 192.168.1.255&lt;br /&gt;
 # etc.&lt;br /&gt;
&lt;br /&gt;
= Comparison chart/Rosetta Stone =&lt;br /&gt;
&lt;br /&gt;
This chart shows how some standard things are done in Alpine compared to other distributions.&lt;br /&gt;
&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Action &lt;br /&gt;
! Alpine ([https://wiki.alpinelinux.org/wiki/Alpine_Linux_package_management apk])&lt;br /&gt;
! Arch Linux ([https://wiki.archlinux.org/index.php/Pacman pacman])&lt;br /&gt;
! Gentoo ([https://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&amp;amp;chap=1 emerge])&lt;br /&gt;
! Debian/Ubuntu ([https://wiki.debian.org/AptCLI apt])&lt;br /&gt;
! Fedora/RHEL/SL/CentOS ([http://yum.baseurl.org/wiki/YumCommands yum])&lt;br /&gt;
! VoidLinux ([https://docs.voidlinux.org/xbps/index.html?highlight=xb#xbps-package-manager XBPS])&lt;br /&gt;
|-&lt;br /&gt;
| Update package database&lt;br /&gt;
| {{Cmd| apk update}}&lt;br /&gt;
| {{Cmd| pacman -Sy}}&lt;br /&gt;
| {{Cmd| emerge --sync}}&lt;br /&gt;
| {{Cmd| apt update}}&lt;br /&gt;
| {{Cmd| yum update}}&lt;br /&gt;
| {{Cmd| xbps-install -S}}&lt;br /&gt;
|-&lt;br /&gt;
| Showing available updates&lt;br /&gt;
| {{Cmd| apk version -l &#039;&amp;lt;&#039;}}&lt;br /&gt;
| {{Cmd| pacman -Qu}}&lt;br /&gt;
| {{Cmd| emerge --deep --update --pretend @world}}&lt;br /&gt;
| {{Cmd| apt upgrade --simulate}}&lt;br /&gt;
| {{Cmd| yum list updates}}&lt;br /&gt;
| {{Cmd| xbps-install -n -u}}&lt;br /&gt;
|-&lt;br /&gt;
| Installing packages&lt;br /&gt;
| {{Cmd| apk add [package name]}}&lt;br /&gt;
| {{Cmd| pacman -S [package name]}}&lt;br /&gt;
| {{Cmd| emerge [package name]}}&lt;br /&gt;
| {{Cmd| apt install [package name]}}&lt;br /&gt;
| {{Cmd| yum install [package name]}}&lt;br /&gt;
| {{Cmd| xbps-install [package name]}}&lt;br /&gt;
|-&lt;br /&gt;
| Update all installed packages&lt;br /&gt;
| {{Cmd| apk upgrade -U -a}}&lt;br /&gt;
| {{Cmd| pacman -Su}}&lt;br /&gt;
| {{Cmd| emerge --update --deep @world}}&lt;br /&gt;
| {{Cmd| apt upgrade}}&lt;br /&gt;
| {{Cmd| yum update}}&lt;br /&gt;
| {{Cmd| xbps-install -u}}&lt;br /&gt;
|- &lt;br /&gt;
| Searching package database&lt;br /&gt;
| {{Cmd| apk search -v &#039;[string]*&#039;}}&lt;br /&gt;
| {{Cmd| pacman -Ss [string]}}&lt;br /&gt;
| {{Cmd| emerge --search [string]}}&lt;br /&gt;
| {{Cmd| apt search [string]}}&lt;br /&gt;
| {{Cmd| yum search [string]}}&lt;br /&gt;
| {{Cmd| xbps-query -Rs [string]}}&lt;br /&gt;
|-&lt;br /&gt;
| Removing packages&lt;br /&gt;
| {{Cmd| apk del [package name]}}&lt;br /&gt;
| {{Cmd| pacman -R [package name]}}&lt;br /&gt;
| {{Cmd| emerge --depclean [package name]}}&lt;br /&gt;
| {{Cmd| apt remove [package name]}}&lt;br /&gt;
| {{Cmd| yum remove [package name]}}&lt;br /&gt;
| {{Cmd| xbps-remove [package name]}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Package Manager]]&lt;/div&gt;</summary>
		<author><name>Winny</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Comparison_with_other_distros&amp;diff=22238</id>
		<title>Comparison with other distros</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Comparison_with_other_distros&amp;diff=22238"/>
		<updated>2022-08-15T18:16:49Z</updated>

		<summary type="html">&lt;p&gt;Winny: /* Removing packages */ clarify you almost always want --depclean&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;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.&lt;br /&gt;
&lt;br /&gt;
{{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]}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Package management =&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Updating package database ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
 apk update&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
 apt update&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
 emerge --sync&lt;br /&gt;
&lt;br /&gt;
== Showing available updates ==&lt;br /&gt;
Show which packages have an update available:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
 apk version -v&lt;br /&gt;
or:&lt;br /&gt;
 apk version -v -l &#039;&amp;lt;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
 emerge --deep --update --pretend @world&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
 apt upgrade --simulate&lt;br /&gt;
&lt;br /&gt;
== Updating a particular package ==&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
 apk add -u package1 package2&lt;br /&gt;
or&lt;br /&gt;
 apk upgrade package1 package2&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
 apt install package1 package2&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
 emerge --update package1 package2&lt;br /&gt;
&lt;br /&gt;
== Installing packages ==&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
 apk add package1 package2&lt;br /&gt;
&lt;br /&gt;
For source compile, see the [[Aports tree]] and the [[abuild]] tool.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
 emerge package1 package2&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
 apt-get install package1 package2&lt;br /&gt;
Debian source compile:&lt;br /&gt;
 apt-get build-dep package1&lt;br /&gt;
 apt-get source package1&lt;br /&gt;
(optional: customize the build by modifying the debian/rules makefile)&lt;br /&gt;
(or set environmental variables like DEB_BUILD_OPTIONS)&lt;br /&gt;
(note that this will make your bug reports invalid to the maintainer)&lt;br /&gt;
 dpkg-buildpackage -rfakeroot -uc -b&lt;br /&gt;
 dpkg -i generatedpackagename&lt;br /&gt;
Simplified source compile:&lt;br /&gt;
 apt-get build-dep package1&lt;br /&gt;
 apt-get -b source package1&lt;br /&gt;
(the packages are automatically generated using the -b switch above)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; 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 &amp;quot;Architectures and repositories&amp;quot; section below.&lt;br /&gt;
&lt;br /&gt;
== Reinstalling particular packages ==&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
 apk del package1 package2 &amp;amp;&amp;amp; apk add package1 package2&lt;br /&gt;
or:&lt;br /&gt;
 apk fix package1 package2&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
 emerge --oneshot package1 package2&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
 apt-get install --reinstall package1 package2&lt;br /&gt;
&lt;br /&gt;
Note: You &#039;&#039;rarely&#039;&#039; need to reinstall a package on Debian&lt;br /&gt;
&lt;br /&gt;
== Searching the package database ==&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Alpine will only search package names.&lt;br /&gt;
 apk search searchword&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
To search the package names and descriptions:&lt;br /&gt;
 emerge --searchdesc searchword&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; On Gentoo, it&#039;s actually much better to install and use the eix package to do a search. You use them like this:&lt;br /&gt;
 eix searchword&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 apt-cache search searchword&lt;br /&gt;
Both emerge and apt-cache search support regular expressions.&lt;br /&gt;
&lt;br /&gt;
To get the long package information on Debian (searching only in package names):&lt;br /&gt;
 apt-cache search --full --names-only searchword&lt;br /&gt;
&lt;br /&gt;
== Removing packages ==&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 apk del package1 package2&lt;br /&gt;
&#039;&#039;apk del&#039;&#039; will remove configuration files when the &#039;&#039;--purge&#039;&#039; flag is used. Make sure you have backups of your configuration files.&lt;br /&gt;
&lt;br /&gt;
You will mostly like to take a quick look at the dependencies before you remove packages recursively.&lt;br /&gt;
&lt;br /&gt;
To see dependencies for a package, use:&lt;br /&gt;
 apk info -R package1 package2&lt;br /&gt;
&lt;br /&gt;
To see if package is required by other packages (is a dependency for another packages), use:&lt;br /&gt;
 apk info -r package1 package2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The correct way to remove packages on gentoo.&lt;br /&gt;
 emerge --depclean package1 package2&lt;br /&gt;
&lt;br /&gt;
In case you know what you&#039;re doing, you may skip dependency checks and potentiality leave your system in broken state.&lt;br /&gt;
 emerge --unmerge package1 package2&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
 apt-get remove package1 package2&lt;br /&gt;
or to remove along with all configuration files&lt;br /&gt;
 apt-get remove --purge package1 package2&lt;br /&gt;
&lt;br /&gt;
== Only downloading packages ==&lt;br /&gt;
This can be useful e.g. if you&#039;re on a dial-up connection and want to download everything first and install later.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
 apk fetch package1 package2&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
 emerge --fetchonly package1 package2&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
 apt-get install --download-only package1 package2&lt;br /&gt;
&lt;br /&gt;
== Cleaning up downloaded packages ==&lt;br /&gt;
Compressed packages that were downloaded for installation can easily consume gigabytes of storage space.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Alpine will clean up packages automatically.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
 rm -rf /var/cache/distfiles/*&lt;br /&gt;
To only remove outdated packages you will need to install the gentoolkit package and use eclean:&lt;br /&gt;
 eclean distfiles&lt;br /&gt;
Cleaning temporary files from emerging packages:&lt;br /&gt;
 rm -rf /var/tmp/portage/*&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
 apt-get clean&lt;br /&gt;
Only remove outdated packages:&lt;br /&gt;
 apt-get autoclean&lt;br /&gt;
&lt;br /&gt;
==Reverse dependencies==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
apk-tools will take care of reverse dependencies.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Reverse dependencies are a major drawback of Gentoo&#039;s current portage implementation: It does not take care of them at all at the moment.&lt;br /&gt;
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).&lt;br /&gt;
&lt;br /&gt;
 revdep-rebuild&lt;br /&gt;
can fix broken dependencies broken by&lt;br /&gt;
emerge --depclean&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Reverse dependencies are taken care of by dpkg.&lt;br /&gt;
&lt;br /&gt;
= Runlevel &amp;amp; Initscripts =&lt;br /&gt;
Runlevels work pretty conventionally on Debian (see details: [http://archive.fo/ZdZIz systemd]{{dead link}}). On Alpine and Gentoo, they are a bit different.&lt;br /&gt;
&lt;br /&gt;
== Directories and files ==&lt;br /&gt;
In &#039;&#039;&#039;Debian&#039;&#039;&#039;, 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).&lt;br /&gt;
&lt;br /&gt;
* /etc/rc0.d&lt;br /&gt;
* /etc/rc1.d&lt;br /&gt;
* /etc/rcS.d&lt;br /&gt;
* /etc/rc2.d&lt;br /&gt;
* /etc/rc3.d&lt;br /&gt;
* /etc/rc4.d&lt;br /&gt;
* /etc/rc5.d&lt;br /&gt;
* /etc/rc6.d&lt;br /&gt;
&lt;br /&gt;
In &#039;&#039;&#039;Gentoo&#039;&#039;&#039;, runlevels have the same names, but these are mapped to more self explanatory ones (in /etc/inittab): &amp;quot;boot&amp;quot;, &amp;quot;default&amp;quot;, &amp;quot;nonetwork&amp;quot;, with the option to add more. The directories that represent them are in &lt;br /&gt;
/etc/runlevels/:&lt;br /&gt;
* /etc/runlevels/boot&lt;br /&gt;
* /etc/runlevels/default&lt;br /&gt;
* /etc/runlevels/nonetwork&lt;br /&gt;
&lt;br /&gt;
In &#039;&#039;&#039;Gentoo&#039;&#039;&#039;, 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).&lt;br /&gt;
&lt;br /&gt;
In &#039;&#039;&#039;both Debian and Gentoo&#039;&#039;&#039;, 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.:&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
 $ ls -l /etc/runlevels/boot/hostname&lt;br /&gt;
 lrwxrwxrwx  1 root root 20 Mar 25  2004 /etc/runlevels/boot/hostname -&amp;gt; /etc/init.d/hostname&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
 $ ls -l rcS.d/S40hostname.sh&lt;br /&gt;
 lrwxrwxrwx  1 root root 21 2004-11-07 00:19 rcS.d/S40hostname.sh -&amp;gt; ../init.d/hostname.sh&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In Alpine, runlevels work like they do in Gentoo:&lt;br /&gt;
&lt;br /&gt;
* /etc/runlevels/boot&lt;br /&gt;
* /etc/runlevels/default&lt;br /&gt;
* /etc/runlevels/sysinit&lt;br /&gt;
* /etc/runlevels/nonetwork&lt;br /&gt;
* /etc/runlevels/shutdown&lt;br /&gt;
&lt;br /&gt;
== Runlevel management ==&lt;br /&gt;
To manage which things to start in which runlevels, use the following commands:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
To see current status of services in runlevels, do:&lt;br /&gt;
 rc-status&lt;br /&gt;
To add sshd to default runlevel, do:&lt;br /&gt;
 rc-update add sshd default&lt;br /&gt;
To remove sshd from all runlevels do:&lt;br /&gt;
 rc-update del sshd&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 rc-update&lt;br /&gt;
To add the cupsd to the default runlevel, do:&lt;br /&gt;
 rc-update add cupsd default&lt;br /&gt;
To remove alsasound from the boot runlevel, do:&lt;br /&gt;
 rc-update del alsasound boot&lt;br /&gt;
Also see this wiki page about [http://gentoo-wiki.com/Rc-update gentoo runlevel management with rc-update]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 update-rc.d&lt;br /&gt;
Configure cupsd to be started in runlevels 2, 3, 4, 5, and stopped in 0, 1, 6, with sequence code 20:&lt;br /&gt;
 update-rc.d cupsd start 20 2 3 4 5 . stop 20 0 1 6 . &lt;br /&gt;
or simply:&lt;br /&gt;
 update-rc.d cupsd defaults &lt;br /&gt;
Remove cupsd from all runlevels:&lt;br /&gt;
 update-rc.d -f cupsd remove&lt;br /&gt;
&lt;br /&gt;
= Config Files =&lt;br /&gt;
&lt;br /&gt;
== /etc/portage/make.conf and use flags ==&lt;br /&gt;
While in Gentoo there&#039;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 &#039;&#039;USE&#039;&#039; 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 &#039;gtk gnome&#039; for Gnome users (and a corresponding -qt -kde -arts) and &#039;qt kde arts&#039; for KDE users. A Gentoo user&#039;s complete set of use flags may look something like this:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;USE=&amp;quot;-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&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Architectures and repositories ==&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Also in /etc/portage/make.conf is the &#039;&#039;&#039;ACCEPT_KEYWORDS&#039;&#039;&#039; setting, with (for an X86-based processor) two settings, &#039;&#039;&#039;x86&#039;&#039;&#039; for stabler packages, and &#039;&#039;&#039;~x86&#039;&#039;&#039; 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&#039;s enough to put a line into that file naming the package (for example &#039;app-foo/bar&#039;). That file might look like this:&lt;br /&gt;
&lt;br /&gt;
 app-crypt/gpg-agent&lt;br /&gt;
 app-text/docbook-xsl-stylesheets&lt;br /&gt;
 =app-text/docbook-xml-dtd-4.3-r1&lt;br /&gt;
&lt;br /&gt;
The last line says, that &#039;&#039;only&#039;&#039; version 4.3-r1 should be unmasked. Older and newer versions will still be ignored.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note for non-x86 users:&#039;&#039;&#039;&lt;br /&gt;
The keywords &#039;&#039;&#039;x86&#039;&#039;&#039; and &#039;&#039;&#039;~x86&#039;&#039;&#039; can of course be replaced by &#039;&#039;&#039;sparc&#039;&#039;&#039; and &#039;&#039;&#039;~sparc&#039;&#039;&#039; for example.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Setting this in Debian is slightly more complicated, and is accomplished by setting different &#039;repositories&#039; in &#039;&#039;/etc/apt/sources.list&#039;&#039; - along with which &#039;tree&#039; to use for packages; in Debian, these are &#039;&#039;&#039;stable&#039;&#039;&#039;, &#039;&#039;&#039;testing&#039;&#039;&#039;, and &#039;&#039;&#039;unstable&#039;&#039;&#039;. An &#039;&#039;/etc/apt/sources.list&#039;&#039; file for a debian testing user may look something like this:&lt;br /&gt;
&lt;br /&gt;
 deb http://mirrors.kernel.org/debian testing main non-free contrib&lt;br /&gt;
 deb ftp://ftp.nerim.net/debian-marillat testing main&lt;br /&gt;
 deb http://security.debian.org testing/updates main contrib non-free&lt;br /&gt;
&lt;br /&gt;
Alternatively, &#039;&#039;/etc/apt/sources.list&#039;&#039; 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 &#039;&#039;/etc/apt/apt.conf&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
   APT::Default-Release &amp;quot;testing&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
Per-package settings go in &#039;&#039;/etc/apt/preferences&#039;&#039;, somewhat like Gentoo&#039;s &#039;&#039;/etc/portage/package.keywords&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== Network ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Alpine uses /etc/network/interfaces, just like Debian. The main reason is because this is the way busybox does it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;/etc/network/interfaces&#039;&#039;:&lt;br /&gt;
 auto eth0&lt;br /&gt;
 iface eth0 inet static&lt;br /&gt;
  address 192.168.0.1&lt;br /&gt;
  netmask 255.255.255.0&lt;br /&gt;
  broadcast 192.168.0.255&lt;br /&gt;
  &lt;br /&gt;
 auto eth0:0&lt;br /&gt;
 iface eth0:0 inet static&lt;br /&gt;
  address 192.168.1.1&lt;br /&gt;
  netmask 255.255.255.0&lt;br /&gt;
  broadcast 192.168.1.255&lt;br /&gt;
 # etc.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;/etc/conf.d/net&#039;&#039;:&lt;br /&gt;
 config_eth0=&amp;quot;192.168.1.100 netmask 255.255.255.0&lt;br /&gt;
              192.168.2.100 netmask 255.255.255.0&amp;quot;&lt;br /&gt;
 routes_eth0=&amp;quot;default via 192.168.1.1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Note that this has changed recently. For more information please refer to http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=4&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;/etc/network/interfaces&#039;&#039;:&lt;br /&gt;
 auto eth0&lt;br /&gt;
 iface eth0 inet static&lt;br /&gt;
  address 192.168.0.1&lt;br /&gt;
  netmask 255.255.255.0&lt;br /&gt;
  broadcast 192.168.0.255&lt;br /&gt;
  &lt;br /&gt;
 auto eth0:0&lt;br /&gt;
 iface eth0:0 inet static&lt;br /&gt;
  address 192.168.1.1&lt;br /&gt;
  netmask 255.255.255.0&lt;br /&gt;
  broadcast 192.168.1.255&lt;br /&gt;
 # etc.&lt;br /&gt;
&lt;br /&gt;
= Comparison chart/Rosetta Stone =&lt;br /&gt;
&lt;br /&gt;
This chart shows how some standard things are done in Alpine compared to other distributions.&lt;br /&gt;
&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Action &lt;br /&gt;
! Alpine ([https://wiki.alpinelinux.org/wiki/Alpine_Linux_package_management apk])&lt;br /&gt;
! Arch Linux ([https://wiki.archlinux.org/index.php/Pacman pacman])&lt;br /&gt;
! Gentoo ([https://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&amp;amp;chap=1 emerge])&lt;br /&gt;
! Debian/Ubuntu ([https://wiki.debian.org/AptCLI apt])&lt;br /&gt;
! Fedora/RHEL/SL/CentOS ([http://yum.baseurl.org/wiki/YumCommands yum])&lt;br /&gt;
! VoidLinux ([https://docs.voidlinux.org/xbps/index.html?highlight=xb#xbps-package-manager XBPS])&lt;br /&gt;
|-&lt;br /&gt;
| Update package database&lt;br /&gt;
| {{Cmd| apk update}}&lt;br /&gt;
| {{Cmd| pacman -Sy}}&lt;br /&gt;
| {{Cmd| emerge --sync}}&lt;br /&gt;
| {{Cmd| apt update}}&lt;br /&gt;
| {{Cmd| yum update}}&lt;br /&gt;
| {{Cmd| xbps-install -S}}&lt;br /&gt;
|-&lt;br /&gt;
| Showing available updates&lt;br /&gt;
| {{Cmd| apk version -l &#039;&amp;lt;&#039;}}&lt;br /&gt;
| {{Cmd| pacman -Qu}}&lt;br /&gt;
| {{Cmd| emerge --deep --update --pretend @world}}&lt;br /&gt;
| {{Cmd| apt upgrade --simulate}}&lt;br /&gt;
| {{Cmd| yum list updates}}&lt;br /&gt;
| {{Cmd| xbps-install -n -u}}&lt;br /&gt;
|-&lt;br /&gt;
| Installing packages&lt;br /&gt;
| {{Cmd| apk add [package name]}}&lt;br /&gt;
| {{Cmd| pacman -S [package name]}}&lt;br /&gt;
| {{Cmd| emerge [package name]}}&lt;br /&gt;
| {{Cmd| apt install [package name]}}&lt;br /&gt;
| {{Cmd| yum install [package name]}}&lt;br /&gt;
| {{Cmd| xbps-install [package name]}}&lt;br /&gt;
|-&lt;br /&gt;
| Update all installed packages&lt;br /&gt;
| {{Cmd| apk upgrade -U -a}}&lt;br /&gt;
| {{Cmd| pacman -Su}}&lt;br /&gt;
| {{Cmd| emerge --update --deep @world}}&lt;br /&gt;
| {{Cmd| apt upgrade}}&lt;br /&gt;
| {{Cmd| yum update}}&lt;br /&gt;
| {{Cmd| xbps-install -u}}&lt;br /&gt;
|- &lt;br /&gt;
| Searching package database&lt;br /&gt;
| {{Cmd| apk search -v &#039;[string]*&#039;}}&lt;br /&gt;
| {{Cmd| pacman -Ss [string]}}&lt;br /&gt;
| {{Cmd| emerge --search [string]}}&lt;br /&gt;
| {{Cmd| apt search [string]}}&lt;br /&gt;
| {{Cmd| yum search [string]}}&lt;br /&gt;
| {{Cmd| xbps-query -Rs [string]}}&lt;br /&gt;
|-&lt;br /&gt;
| Removing packages&lt;br /&gt;
| {{Cmd| apk del [package name]}}&lt;br /&gt;
| {{Cmd| pacman -R [package name]}}&lt;br /&gt;
| {{Cmd| emerge --depclean [package name]}}&lt;br /&gt;
| {{Cmd| apt remove [package name]}}&lt;br /&gt;
| {{Cmd| yum remove [package name]}}&lt;br /&gt;
| {{Cmd| xbps-remove [package name]}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Package Manager]]&lt;/div&gt;</summary>
		<author><name>Winny</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Comparison_with_other_distros&amp;diff=22237</id>
		<title>Comparison with other distros</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Comparison_with_other_distros&amp;diff=22237"/>
		<updated>2022-08-15T18:13:02Z</updated>

		<summary type="html">&lt;p&gt;Winny: /* Searching the package database */ esearch... nobody uses this&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;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.&lt;br /&gt;
&lt;br /&gt;
{{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]}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Package management =&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Updating package database ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
 apk update&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
 apt update&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
 emerge --sync&lt;br /&gt;
&lt;br /&gt;
== Showing available updates ==&lt;br /&gt;
Show which packages have an update available:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
 apk version -v&lt;br /&gt;
or:&lt;br /&gt;
 apk version -v -l &#039;&amp;lt;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
 emerge --deep --update --pretend @world&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
 apt upgrade --simulate&lt;br /&gt;
&lt;br /&gt;
== Updating a particular package ==&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
 apk add -u package1 package2&lt;br /&gt;
or&lt;br /&gt;
 apk upgrade package1 package2&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
 apt install package1 package2&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
 emerge --update package1 package2&lt;br /&gt;
&lt;br /&gt;
== Installing packages ==&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
 apk add package1 package2&lt;br /&gt;
&lt;br /&gt;
For source compile, see the [[Aports tree]] and the [[abuild]] tool.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
 emerge package1 package2&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
 apt-get install package1 package2&lt;br /&gt;
Debian source compile:&lt;br /&gt;
 apt-get build-dep package1&lt;br /&gt;
 apt-get source package1&lt;br /&gt;
(optional: customize the build by modifying the debian/rules makefile)&lt;br /&gt;
(or set environmental variables like DEB_BUILD_OPTIONS)&lt;br /&gt;
(note that this will make your bug reports invalid to the maintainer)&lt;br /&gt;
 dpkg-buildpackage -rfakeroot -uc -b&lt;br /&gt;
 dpkg -i generatedpackagename&lt;br /&gt;
Simplified source compile:&lt;br /&gt;
 apt-get build-dep package1&lt;br /&gt;
 apt-get -b source package1&lt;br /&gt;
(the packages are automatically generated using the -b switch above)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; 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 &amp;quot;Architectures and repositories&amp;quot; section below.&lt;br /&gt;
&lt;br /&gt;
== Reinstalling particular packages ==&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
 apk del package1 package2 &amp;amp;&amp;amp; apk add package1 package2&lt;br /&gt;
or:&lt;br /&gt;
 apk fix package1 package2&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
 emerge --oneshot package1 package2&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
 apt-get install --reinstall package1 package2&lt;br /&gt;
&lt;br /&gt;
Note: You &#039;&#039;rarely&#039;&#039; need to reinstall a package on Debian&lt;br /&gt;
&lt;br /&gt;
== Searching the package database ==&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Alpine will only search package names.&lt;br /&gt;
 apk search searchword&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
To search the package names and descriptions:&lt;br /&gt;
 emerge --searchdesc searchword&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; On Gentoo, it&#039;s actually much better to install and use the eix package to do a search. You use them like this:&lt;br /&gt;
 eix searchword&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 apt-cache search searchword&lt;br /&gt;
Both emerge and apt-cache search support regular expressions.&lt;br /&gt;
&lt;br /&gt;
To get the long package information on Debian (searching only in package names):&lt;br /&gt;
 apt-cache search --full --names-only searchword&lt;br /&gt;
&lt;br /&gt;
== Removing packages ==&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 apk del package1 package2&lt;br /&gt;
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)&lt;br /&gt;
&lt;br /&gt;
You will mostly like to take a quick look at the dependencies before you remove packages recursively.&lt;br /&gt;
&lt;br /&gt;
To see dependencies for a package, use:&lt;br /&gt;
 apk info -R package1 package2&lt;br /&gt;
&lt;br /&gt;
To see if package is required by other packages (is a dependency for another packages), use:&lt;br /&gt;
 apk info -r package1 package2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
 emerge --unmerge package1 package2 (Note: this is unsafe as it does not check dependencies)&lt;br /&gt;
 emerge --depclean package1 package2 (This will check dependencies)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
 apt-get remove package1 package2&lt;br /&gt;
or to remove along with all configuration files&lt;br /&gt;
 apt-get remove --purge package1 package2&lt;br /&gt;
&lt;br /&gt;
== Only downloading packages ==&lt;br /&gt;
This can be useful e.g. if you&#039;re on a dial-up connection and want to download everything first and install later.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
 apk fetch package1 package2&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
 emerge --fetchonly package1 package2&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
 apt-get install --download-only package1 package2&lt;br /&gt;
&lt;br /&gt;
== Cleaning up downloaded packages ==&lt;br /&gt;
Compressed packages that were downloaded for installation can easily consume gigabytes of storage space.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Alpine will clean up packages automatically.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
 rm -rf /var/cache/distfiles/*&lt;br /&gt;
To only remove outdated packages you will need to install the gentoolkit package and use eclean:&lt;br /&gt;
 eclean distfiles&lt;br /&gt;
Cleaning temporary files from emerging packages:&lt;br /&gt;
 rm -rf /var/tmp/portage/*&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
 apt-get clean&lt;br /&gt;
Only remove outdated packages:&lt;br /&gt;
 apt-get autoclean&lt;br /&gt;
&lt;br /&gt;
==Reverse dependencies==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
apk-tools will take care of reverse dependencies.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Reverse dependencies are a major drawback of Gentoo&#039;s current portage implementation: It does not take care of them at all at the moment.&lt;br /&gt;
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).&lt;br /&gt;
&lt;br /&gt;
 revdep-rebuild&lt;br /&gt;
can fix broken dependencies broken by&lt;br /&gt;
emerge --depclean&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Reverse dependencies are taken care of by dpkg.&lt;br /&gt;
&lt;br /&gt;
= Runlevel &amp;amp; Initscripts =&lt;br /&gt;
Runlevels work pretty conventionally on Debian (see details: [http://archive.fo/ZdZIz systemd]{{dead link}}). On Alpine and Gentoo, they are a bit different.&lt;br /&gt;
&lt;br /&gt;
== Directories and files ==&lt;br /&gt;
In &#039;&#039;&#039;Debian&#039;&#039;&#039;, 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).&lt;br /&gt;
&lt;br /&gt;
* /etc/rc0.d&lt;br /&gt;
* /etc/rc1.d&lt;br /&gt;
* /etc/rcS.d&lt;br /&gt;
* /etc/rc2.d&lt;br /&gt;
* /etc/rc3.d&lt;br /&gt;
* /etc/rc4.d&lt;br /&gt;
* /etc/rc5.d&lt;br /&gt;
* /etc/rc6.d&lt;br /&gt;
&lt;br /&gt;
In &#039;&#039;&#039;Gentoo&#039;&#039;&#039;, runlevels have the same names, but these are mapped to more self explanatory ones (in /etc/inittab): &amp;quot;boot&amp;quot;, &amp;quot;default&amp;quot;, &amp;quot;nonetwork&amp;quot;, with the option to add more. The directories that represent them are in &lt;br /&gt;
/etc/runlevels/:&lt;br /&gt;
* /etc/runlevels/boot&lt;br /&gt;
* /etc/runlevels/default&lt;br /&gt;
* /etc/runlevels/nonetwork&lt;br /&gt;
&lt;br /&gt;
In &#039;&#039;&#039;Gentoo&#039;&#039;&#039;, 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).&lt;br /&gt;
&lt;br /&gt;
In &#039;&#039;&#039;both Debian and Gentoo&#039;&#039;&#039;, 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.:&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
 $ ls -l /etc/runlevels/boot/hostname&lt;br /&gt;
 lrwxrwxrwx  1 root root 20 Mar 25  2004 /etc/runlevels/boot/hostname -&amp;gt; /etc/init.d/hostname&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
 $ ls -l rcS.d/S40hostname.sh&lt;br /&gt;
 lrwxrwxrwx  1 root root 21 2004-11-07 00:19 rcS.d/S40hostname.sh -&amp;gt; ../init.d/hostname.sh&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In Alpine, runlevels work like they do in Gentoo:&lt;br /&gt;
&lt;br /&gt;
* /etc/runlevels/boot&lt;br /&gt;
* /etc/runlevels/default&lt;br /&gt;
* /etc/runlevels/sysinit&lt;br /&gt;
* /etc/runlevels/nonetwork&lt;br /&gt;
* /etc/runlevels/shutdown&lt;br /&gt;
&lt;br /&gt;
== Runlevel management ==&lt;br /&gt;
To manage which things to start in which runlevels, use the following commands:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
To see current status of services in runlevels, do:&lt;br /&gt;
 rc-status&lt;br /&gt;
To add sshd to default runlevel, do:&lt;br /&gt;
 rc-update add sshd default&lt;br /&gt;
To remove sshd from all runlevels do:&lt;br /&gt;
 rc-update del sshd&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 rc-update&lt;br /&gt;
To add the cupsd to the default runlevel, do:&lt;br /&gt;
 rc-update add cupsd default&lt;br /&gt;
To remove alsasound from the boot runlevel, do:&lt;br /&gt;
 rc-update del alsasound boot&lt;br /&gt;
Also see this wiki page about [http://gentoo-wiki.com/Rc-update gentoo runlevel management with rc-update]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 update-rc.d&lt;br /&gt;
Configure cupsd to be started in runlevels 2, 3, 4, 5, and stopped in 0, 1, 6, with sequence code 20:&lt;br /&gt;
 update-rc.d cupsd start 20 2 3 4 5 . stop 20 0 1 6 . &lt;br /&gt;
or simply:&lt;br /&gt;
 update-rc.d cupsd defaults &lt;br /&gt;
Remove cupsd from all runlevels:&lt;br /&gt;
 update-rc.d -f cupsd remove&lt;br /&gt;
&lt;br /&gt;
= Config Files =&lt;br /&gt;
&lt;br /&gt;
== /etc/portage/make.conf and use flags ==&lt;br /&gt;
While in Gentoo there&#039;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 &#039;&#039;USE&#039;&#039; 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 &#039;gtk gnome&#039; for Gnome users (and a corresponding -qt -kde -arts) and &#039;qt kde arts&#039; for KDE users. A Gentoo user&#039;s complete set of use flags may look something like this:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;USE=&amp;quot;-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&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Architectures and repositories ==&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Also in /etc/portage/make.conf is the &#039;&#039;&#039;ACCEPT_KEYWORDS&#039;&#039;&#039; setting, with (for an X86-based processor) two settings, &#039;&#039;&#039;x86&#039;&#039;&#039; for stabler packages, and &#039;&#039;&#039;~x86&#039;&#039;&#039; 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&#039;s enough to put a line into that file naming the package (for example &#039;app-foo/bar&#039;). That file might look like this:&lt;br /&gt;
&lt;br /&gt;
 app-crypt/gpg-agent&lt;br /&gt;
 app-text/docbook-xsl-stylesheets&lt;br /&gt;
 =app-text/docbook-xml-dtd-4.3-r1&lt;br /&gt;
&lt;br /&gt;
The last line says, that &#039;&#039;only&#039;&#039; version 4.3-r1 should be unmasked. Older and newer versions will still be ignored.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note for non-x86 users:&#039;&#039;&#039;&lt;br /&gt;
The keywords &#039;&#039;&#039;x86&#039;&#039;&#039; and &#039;&#039;&#039;~x86&#039;&#039;&#039; can of course be replaced by &#039;&#039;&#039;sparc&#039;&#039;&#039; and &#039;&#039;&#039;~sparc&#039;&#039;&#039; for example.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Setting this in Debian is slightly more complicated, and is accomplished by setting different &#039;repositories&#039; in &#039;&#039;/etc/apt/sources.list&#039;&#039; - along with which &#039;tree&#039; to use for packages; in Debian, these are &#039;&#039;&#039;stable&#039;&#039;&#039;, &#039;&#039;&#039;testing&#039;&#039;&#039;, and &#039;&#039;&#039;unstable&#039;&#039;&#039;. An &#039;&#039;/etc/apt/sources.list&#039;&#039; file for a debian testing user may look something like this:&lt;br /&gt;
&lt;br /&gt;
 deb http://mirrors.kernel.org/debian testing main non-free contrib&lt;br /&gt;
 deb ftp://ftp.nerim.net/debian-marillat testing main&lt;br /&gt;
 deb http://security.debian.org testing/updates main contrib non-free&lt;br /&gt;
&lt;br /&gt;
Alternatively, &#039;&#039;/etc/apt/sources.list&#039;&#039; 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 &#039;&#039;/etc/apt/apt.conf&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
   APT::Default-Release &amp;quot;testing&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
Per-package settings go in &#039;&#039;/etc/apt/preferences&#039;&#039;, somewhat like Gentoo&#039;s &#039;&#039;/etc/portage/package.keywords&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== Network ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Alpine uses /etc/network/interfaces, just like Debian. The main reason is because this is the way busybox does it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;/etc/network/interfaces&#039;&#039;:&lt;br /&gt;
 auto eth0&lt;br /&gt;
 iface eth0 inet static&lt;br /&gt;
  address 192.168.0.1&lt;br /&gt;
  netmask 255.255.255.0&lt;br /&gt;
  broadcast 192.168.0.255&lt;br /&gt;
  &lt;br /&gt;
 auto eth0:0&lt;br /&gt;
 iface eth0:0 inet static&lt;br /&gt;
  address 192.168.1.1&lt;br /&gt;
  netmask 255.255.255.0&lt;br /&gt;
  broadcast 192.168.1.255&lt;br /&gt;
 # etc.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;/etc/conf.d/net&#039;&#039;:&lt;br /&gt;
 config_eth0=&amp;quot;192.168.1.100 netmask 255.255.255.0&lt;br /&gt;
              192.168.2.100 netmask 255.255.255.0&amp;quot;&lt;br /&gt;
 routes_eth0=&amp;quot;default via 192.168.1.1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Note that this has changed recently. For more information please refer to http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=4&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;/etc/network/interfaces&#039;&#039;:&lt;br /&gt;
 auto eth0&lt;br /&gt;
 iface eth0 inet static&lt;br /&gt;
  address 192.168.0.1&lt;br /&gt;
  netmask 255.255.255.0&lt;br /&gt;
  broadcast 192.168.0.255&lt;br /&gt;
  &lt;br /&gt;
 auto eth0:0&lt;br /&gt;
 iface eth0:0 inet static&lt;br /&gt;
  address 192.168.1.1&lt;br /&gt;
  netmask 255.255.255.0&lt;br /&gt;
  broadcast 192.168.1.255&lt;br /&gt;
 # etc.&lt;br /&gt;
&lt;br /&gt;
= Comparison chart/Rosetta Stone =&lt;br /&gt;
&lt;br /&gt;
This chart shows how some standard things are done in Alpine compared to other distributions.&lt;br /&gt;
&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Action &lt;br /&gt;
! Alpine ([https://wiki.alpinelinux.org/wiki/Alpine_Linux_package_management apk])&lt;br /&gt;
! Arch Linux ([https://wiki.archlinux.org/index.php/Pacman pacman])&lt;br /&gt;
! Gentoo ([https://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&amp;amp;chap=1 emerge])&lt;br /&gt;
! Debian/Ubuntu ([https://wiki.debian.org/AptCLI apt])&lt;br /&gt;
! Fedora/RHEL/SL/CentOS ([http://yum.baseurl.org/wiki/YumCommands yum])&lt;br /&gt;
! VoidLinux ([https://docs.voidlinux.org/xbps/index.html?highlight=xb#xbps-package-manager XBPS])&lt;br /&gt;
|-&lt;br /&gt;
| Update package database&lt;br /&gt;
| {{Cmd| apk update}}&lt;br /&gt;
| {{Cmd| pacman -Sy}}&lt;br /&gt;
| {{Cmd| emerge --sync}}&lt;br /&gt;
| {{Cmd| apt update}}&lt;br /&gt;
| {{Cmd| yum update}}&lt;br /&gt;
| {{Cmd| xbps-install -S}}&lt;br /&gt;
|-&lt;br /&gt;
| Showing available updates&lt;br /&gt;
| {{Cmd| apk version -l &#039;&amp;lt;&#039;}}&lt;br /&gt;
| {{Cmd| pacman -Qu}}&lt;br /&gt;
| {{Cmd| emerge --deep --update --pretend @world}}&lt;br /&gt;
| {{Cmd| apt upgrade --simulate}}&lt;br /&gt;
| {{Cmd| yum list updates}}&lt;br /&gt;
| {{Cmd| xbps-install -n -u}}&lt;br /&gt;
|-&lt;br /&gt;
| Installing packages&lt;br /&gt;
| {{Cmd| apk add [package name]}}&lt;br /&gt;
| {{Cmd| pacman -S [package name]}}&lt;br /&gt;
| {{Cmd| emerge [package name]}}&lt;br /&gt;
| {{Cmd| apt install [package name]}}&lt;br /&gt;
| {{Cmd| yum install [package name]}}&lt;br /&gt;
| {{Cmd| xbps-install [package name]}}&lt;br /&gt;
|-&lt;br /&gt;
| Update all installed packages&lt;br /&gt;
| {{Cmd| apk upgrade -U -a}}&lt;br /&gt;
| {{Cmd| pacman -Su}}&lt;br /&gt;
| {{Cmd| emerge --update --deep @world}}&lt;br /&gt;
| {{Cmd| apt upgrade}}&lt;br /&gt;
| {{Cmd| yum update}}&lt;br /&gt;
| {{Cmd| xbps-install -u}}&lt;br /&gt;
|- &lt;br /&gt;
| Searching package database&lt;br /&gt;
| {{Cmd| apk search -v &#039;[string]*&#039;}}&lt;br /&gt;
| {{Cmd| pacman -Ss [string]}}&lt;br /&gt;
| {{Cmd| emerge --search [string]}}&lt;br /&gt;
| {{Cmd| apt search [string]}}&lt;br /&gt;
| {{Cmd| yum search [string]}}&lt;br /&gt;
| {{Cmd| xbps-query -Rs [string]}}&lt;br /&gt;
|-&lt;br /&gt;
| Removing packages&lt;br /&gt;
| {{Cmd| apk del [package name]}}&lt;br /&gt;
| {{Cmd| pacman -R [package name]}}&lt;br /&gt;
| {{Cmd| emerge --depclean [package name]}}&lt;br /&gt;
| {{Cmd| apt remove [package name]}}&lt;br /&gt;
| {{Cmd| yum remove [package name]}}&lt;br /&gt;
| {{Cmd| xbps-remove [package name]}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Package Manager]]&lt;/div&gt;</summary>
		<author><name>Winny</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Comparison_with_other_distros&amp;diff=22236</id>
		<title>Comparison with other distros</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Comparison_with_other_distros&amp;diff=22236"/>
		<updated>2022-08-15T18:11:57Z</updated>

		<summary type="html">&lt;p&gt;Winny: /* Updating package database */ fix gentoo sync command&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;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.&lt;br /&gt;
&lt;br /&gt;
{{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]}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Package management =&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Updating package database ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
 apk update&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
 apt update&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
 emerge --sync&lt;br /&gt;
&lt;br /&gt;
== Showing available updates ==&lt;br /&gt;
Show which packages have an update available:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
 apk version -v&lt;br /&gt;
or:&lt;br /&gt;
 apk version -v -l &#039;&amp;lt;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
 emerge --deep --update --pretend @world&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
 apt upgrade --simulate&lt;br /&gt;
&lt;br /&gt;
== Updating a particular package ==&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
 apk add -u package1 package2&lt;br /&gt;
or&lt;br /&gt;
 apk upgrade package1 package2&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
 apt install package1 package2&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
 emerge --update package1 package2&lt;br /&gt;
&lt;br /&gt;
== Installing packages ==&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
 apk add package1 package2&lt;br /&gt;
&lt;br /&gt;
For source compile, see the [[Aports tree]] and the [[abuild]] tool.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
 emerge package1 package2&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
 apt-get install package1 package2&lt;br /&gt;
Debian source compile:&lt;br /&gt;
 apt-get build-dep package1&lt;br /&gt;
 apt-get source package1&lt;br /&gt;
(optional: customize the build by modifying the debian/rules makefile)&lt;br /&gt;
(or set environmental variables like DEB_BUILD_OPTIONS)&lt;br /&gt;
(note that this will make your bug reports invalid to the maintainer)&lt;br /&gt;
 dpkg-buildpackage -rfakeroot -uc -b&lt;br /&gt;
 dpkg -i generatedpackagename&lt;br /&gt;
Simplified source compile:&lt;br /&gt;
 apt-get build-dep package1&lt;br /&gt;
 apt-get -b source package1&lt;br /&gt;
(the packages are automatically generated using the -b switch above)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; 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 &amp;quot;Architectures and repositories&amp;quot; section below.&lt;br /&gt;
&lt;br /&gt;
== Reinstalling particular packages ==&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
 apk del package1 package2 &amp;amp;&amp;amp; apk add package1 package2&lt;br /&gt;
or:&lt;br /&gt;
 apk fix package1 package2&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
 emerge --oneshot package1 package2&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
 apt-get install --reinstall package1 package2&lt;br /&gt;
&lt;br /&gt;
Note: You &#039;&#039;rarely&#039;&#039; need to reinstall a package on Debian&lt;br /&gt;
&lt;br /&gt;
== Searching the package database ==&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Alpine will only search package names.&lt;br /&gt;
 apk search searchword&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
To search the package names and descriptions:&lt;br /&gt;
 emerge --searchdesc searchword&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; On Gentoo, it&#039;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:&lt;br /&gt;
 eix searchword&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
 esearch searchword&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 apt-cache search searchword&lt;br /&gt;
Both emerge and apt-cache search support regular expressions.&lt;br /&gt;
&lt;br /&gt;
To get the long package information on Debian (searching only in package names):&lt;br /&gt;
 apt-cache search --full --names-only searchword&lt;br /&gt;
&lt;br /&gt;
== Removing packages ==&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 apk del package1 package2&lt;br /&gt;
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)&lt;br /&gt;
&lt;br /&gt;
You will mostly like to take a quick look at the dependencies before you remove packages recursively.&lt;br /&gt;
&lt;br /&gt;
To see dependencies for a package, use:&lt;br /&gt;
 apk info -R package1 package2&lt;br /&gt;
&lt;br /&gt;
To see if package is required by other packages (is a dependency for another packages), use:&lt;br /&gt;
 apk info -r package1 package2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
 emerge --unmerge package1 package2 (Note: this is unsafe as it does not check dependencies)&lt;br /&gt;
 emerge --depclean package1 package2 (This will check dependencies)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
 apt-get remove package1 package2&lt;br /&gt;
or to remove along with all configuration files&lt;br /&gt;
 apt-get remove --purge package1 package2&lt;br /&gt;
&lt;br /&gt;
== Only downloading packages ==&lt;br /&gt;
This can be useful e.g. if you&#039;re on a dial-up connection and want to download everything first and install later.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
 apk fetch package1 package2&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
 emerge --fetchonly package1 package2&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
 apt-get install --download-only package1 package2&lt;br /&gt;
&lt;br /&gt;
== Cleaning up downloaded packages ==&lt;br /&gt;
Compressed packages that were downloaded for installation can easily consume gigabytes of storage space.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Alpine will clean up packages automatically.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
 rm -rf /var/cache/distfiles/*&lt;br /&gt;
To only remove outdated packages you will need to install the gentoolkit package and use eclean:&lt;br /&gt;
 eclean distfiles&lt;br /&gt;
Cleaning temporary files from emerging packages:&lt;br /&gt;
 rm -rf /var/tmp/portage/*&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
 apt-get clean&lt;br /&gt;
Only remove outdated packages:&lt;br /&gt;
 apt-get autoclean&lt;br /&gt;
&lt;br /&gt;
==Reverse dependencies==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
apk-tools will take care of reverse dependencies.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Reverse dependencies are a major drawback of Gentoo&#039;s current portage implementation: It does not take care of them at all at the moment.&lt;br /&gt;
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).&lt;br /&gt;
&lt;br /&gt;
 revdep-rebuild&lt;br /&gt;
can fix broken dependencies broken by&lt;br /&gt;
emerge --depclean&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Reverse dependencies are taken care of by dpkg.&lt;br /&gt;
&lt;br /&gt;
= Runlevel &amp;amp; Initscripts =&lt;br /&gt;
Runlevels work pretty conventionally on Debian (see details: [http://archive.fo/ZdZIz systemd]{{dead link}}). On Alpine and Gentoo, they are a bit different.&lt;br /&gt;
&lt;br /&gt;
== Directories and files ==&lt;br /&gt;
In &#039;&#039;&#039;Debian&#039;&#039;&#039;, 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).&lt;br /&gt;
&lt;br /&gt;
* /etc/rc0.d&lt;br /&gt;
* /etc/rc1.d&lt;br /&gt;
* /etc/rcS.d&lt;br /&gt;
* /etc/rc2.d&lt;br /&gt;
* /etc/rc3.d&lt;br /&gt;
* /etc/rc4.d&lt;br /&gt;
* /etc/rc5.d&lt;br /&gt;
* /etc/rc6.d&lt;br /&gt;
&lt;br /&gt;
In &#039;&#039;&#039;Gentoo&#039;&#039;&#039;, runlevels have the same names, but these are mapped to more self explanatory ones (in /etc/inittab): &amp;quot;boot&amp;quot;, &amp;quot;default&amp;quot;, &amp;quot;nonetwork&amp;quot;, with the option to add more. The directories that represent them are in &lt;br /&gt;
/etc/runlevels/:&lt;br /&gt;
* /etc/runlevels/boot&lt;br /&gt;
* /etc/runlevels/default&lt;br /&gt;
* /etc/runlevels/nonetwork&lt;br /&gt;
&lt;br /&gt;
In &#039;&#039;&#039;Gentoo&#039;&#039;&#039;, 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).&lt;br /&gt;
&lt;br /&gt;
In &#039;&#039;&#039;both Debian and Gentoo&#039;&#039;&#039;, 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.:&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
 $ ls -l /etc/runlevels/boot/hostname&lt;br /&gt;
 lrwxrwxrwx  1 root root 20 Mar 25  2004 /etc/runlevels/boot/hostname -&amp;gt; /etc/init.d/hostname&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
 $ ls -l rcS.d/S40hostname.sh&lt;br /&gt;
 lrwxrwxrwx  1 root root 21 2004-11-07 00:19 rcS.d/S40hostname.sh -&amp;gt; ../init.d/hostname.sh&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In Alpine, runlevels work like they do in Gentoo:&lt;br /&gt;
&lt;br /&gt;
* /etc/runlevels/boot&lt;br /&gt;
* /etc/runlevels/default&lt;br /&gt;
* /etc/runlevels/sysinit&lt;br /&gt;
* /etc/runlevels/nonetwork&lt;br /&gt;
* /etc/runlevels/shutdown&lt;br /&gt;
&lt;br /&gt;
== Runlevel management ==&lt;br /&gt;
To manage which things to start in which runlevels, use the following commands:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
To see current status of services in runlevels, do:&lt;br /&gt;
 rc-status&lt;br /&gt;
To add sshd to default runlevel, do:&lt;br /&gt;
 rc-update add sshd default&lt;br /&gt;
To remove sshd from all runlevels do:&lt;br /&gt;
 rc-update del sshd&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 rc-update&lt;br /&gt;
To add the cupsd to the default runlevel, do:&lt;br /&gt;
 rc-update add cupsd default&lt;br /&gt;
To remove alsasound from the boot runlevel, do:&lt;br /&gt;
 rc-update del alsasound boot&lt;br /&gt;
Also see this wiki page about [http://gentoo-wiki.com/Rc-update gentoo runlevel management with rc-update]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 update-rc.d&lt;br /&gt;
Configure cupsd to be started in runlevels 2, 3, 4, 5, and stopped in 0, 1, 6, with sequence code 20:&lt;br /&gt;
 update-rc.d cupsd start 20 2 3 4 5 . stop 20 0 1 6 . &lt;br /&gt;
or simply:&lt;br /&gt;
 update-rc.d cupsd defaults &lt;br /&gt;
Remove cupsd from all runlevels:&lt;br /&gt;
 update-rc.d -f cupsd remove&lt;br /&gt;
&lt;br /&gt;
= Config Files =&lt;br /&gt;
&lt;br /&gt;
== /etc/portage/make.conf and use flags ==&lt;br /&gt;
While in Gentoo there&#039;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 &#039;&#039;USE&#039;&#039; 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 &#039;gtk gnome&#039; for Gnome users (and a corresponding -qt -kde -arts) and &#039;qt kde arts&#039; for KDE users. A Gentoo user&#039;s complete set of use flags may look something like this:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;USE=&amp;quot;-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&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Architectures and repositories ==&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Also in /etc/portage/make.conf is the &#039;&#039;&#039;ACCEPT_KEYWORDS&#039;&#039;&#039; setting, with (for an X86-based processor) two settings, &#039;&#039;&#039;x86&#039;&#039;&#039; for stabler packages, and &#039;&#039;&#039;~x86&#039;&#039;&#039; 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&#039;s enough to put a line into that file naming the package (for example &#039;app-foo/bar&#039;). That file might look like this:&lt;br /&gt;
&lt;br /&gt;
 app-crypt/gpg-agent&lt;br /&gt;
 app-text/docbook-xsl-stylesheets&lt;br /&gt;
 =app-text/docbook-xml-dtd-4.3-r1&lt;br /&gt;
&lt;br /&gt;
The last line says, that &#039;&#039;only&#039;&#039; version 4.3-r1 should be unmasked. Older and newer versions will still be ignored.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note for non-x86 users:&#039;&#039;&#039;&lt;br /&gt;
The keywords &#039;&#039;&#039;x86&#039;&#039;&#039; and &#039;&#039;&#039;~x86&#039;&#039;&#039; can of course be replaced by &#039;&#039;&#039;sparc&#039;&#039;&#039; and &#039;&#039;&#039;~sparc&#039;&#039;&#039; for example.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Setting this in Debian is slightly more complicated, and is accomplished by setting different &#039;repositories&#039; in &#039;&#039;/etc/apt/sources.list&#039;&#039; - along with which &#039;tree&#039; to use for packages; in Debian, these are &#039;&#039;&#039;stable&#039;&#039;&#039;, &#039;&#039;&#039;testing&#039;&#039;&#039;, and &#039;&#039;&#039;unstable&#039;&#039;&#039;. An &#039;&#039;/etc/apt/sources.list&#039;&#039; file for a debian testing user may look something like this:&lt;br /&gt;
&lt;br /&gt;
 deb http://mirrors.kernel.org/debian testing main non-free contrib&lt;br /&gt;
 deb ftp://ftp.nerim.net/debian-marillat testing main&lt;br /&gt;
 deb http://security.debian.org testing/updates main contrib non-free&lt;br /&gt;
&lt;br /&gt;
Alternatively, &#039;&#039;/etc/apt/sources.list&#039;&#039; 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 &#039;&#039;/etc/apt/apt.conf&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
   APT::Default-Release &amp;quot;testing&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
Per-package settings go in &#039;&#039;/etc/apt/preferences&#039;&#039;, somewhat like Gentoo&#039;s &#039;&#039;/etc/portage/package.keywords&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== Network ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Alpine uses /etc/network/interfaces, just like Debian. The main reason is because this is the way busybox does it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;/etc/network/interfaces&#039;&#039;:&lt;br /&gt;
 auto eth0&lt;br /&gt;
 iface eth0 inet static&lt;br /&gt;
  address 192.168.0.1&lt;br /&gt;
  netmask 255.255.255.0&lt;br /&gt;
  broadcast 192.168.0.255&lt;br /&gt;
  &lt;br /&gt;
 auto eth0:0&lt;br /&gt;
 iface eth0:0 inet static&lt;br /&gt;
  address 192.168.1.1&lt;br /&gt;
  netmask 255.255.255.0&lt;br /&gt;
  broadcast 192.168.1.255&lt;br /&gt;
 # etc.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;/etc/conf.d/net&#039;&#039;:&lt;br /&gt;
 config_eth0=&amp;quot;192.168.1.100 netmask 255.255.255.0&lt;br /&gt;
              192.168.2.100 netmask 255.255.255.0&amp;quot;&lt;br /&gt;
 routes_eth0=&amp;quot;default via 192.168.1.1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Note that this has changed recently. For more information please refer to http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=4&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;/etc/network/interfaces&#039;&#039;:&lt;br /&gt;
 auto eth0&lt;br /&gt;
 iface eth0 inet static&lt;br /&gt;
  address 192.168.0.1&lt;br /&gt;
  netmask 255.255.255.0&lt;br /&gt;
  broadcast 192.168.0.255&lt;br /&gt;
  &lt;br /&gt;
 auto eth0:0&lt;br /&gt;
 iface eth0:0 inet static&lt;br /&gt;
  address 192.168.1.1&lt;br /&gt;
  netmask 255.255.255.0&lt;br /&gt;
  broadcast 192.168.1.255&lt;br /&gt;
 # etc.&lt;br /&gt;
&lt;br /&gt;
= Comparison chart/Rosetta Stone =&lt;br /&gt;
&lt;br /&gt;
This chart shows how some standard things are done in Alpine compared to other distributions.&lt;br /&gt;
&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Action &lt;br /&gt;
! Alpine ([https://wiki.alpinelinux.org/wiki/Alpine_Linux_package_management apk])&lt;br /&gt;
! Arch Linux ([https://wiki.archlinux.org/index.php/Pacman pacman])&lt;br /&gt;
! Gentoo ([https://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&amp;amp;chap=1 emerge])&lt;br /&gt;
! Debian/Ubuntu ([https://wiki.debian.org/AptCLI apt])&lt;br /&gt;
! Fedora/RHEL/SL/CentOS ([http://yum.baseurl.org/wiki/YumCommands yum])&lt;br /&gt;
! VoidLinux ([https://docs.voidlinux.org/xbps/index.html?highlight=xb#xbps-package-manager XBPS])&lt;br /&gt;
|-&lt;br /&gt;
| Update package database&lt;br /&gt;
| {{Cmd| apk update}}&lt;br /&gt;
| {{Cmd| pacman -Sy}}&lt;br /&gt;
| {{Cmd| emerge --sync}}&lt;br /&gt;
| {{Cmd| apt update}}&lt;br /&gt;
| {{Cmd| yum update}}&lt;br /&gt;
| {{Cmd| xbps-install -S}}&lt;br /&gt;
|-&lt;br /&gt;
| Showing available updates&lt;br /&gt;
| {{Cmd| apk version -l &#039;&amp;lt;&#039;}}&lt;br /&gt;
| {{Cmd| pacman -Qu}}&lt;br /&gt;
| {{Cmd| emerge --deep --update --pretend @world}}&lt;br /&gt;
| {{Cmd| apt upgrade --simulate}}&lt;br /&gt;
| {{Cmd| yum list updates}}&lt;br /&gt;
| {{Cmd| xbps-install -n -u}}&lt;br /&gt;
|-&lt;br /&gt;
| Installing packages&lt;br /&gt;
| {{Cmd| apk add [package name]}}&lt;br /&gt;
| {{Cmd| pacman -S [package name]}}&lt;br /&gt;
| {{Cmd| emerge [package name]}}&lt;br /&gt;
| {{Cmd| apt install [package name]}}&lt;br /&gt;
| {{Cmd| yum install [package name]}}&lt;br /&gt;
| {{Cmd| xbps-install [package name]}}&lt;br /&gt;
|-&lt;br /&gt;
| Update all installed packages&lt;br /&gt;
| {{Cmd| apk upgrade -U -a}}&lt;br /&gt;
| {{Cmd| pacman -Su}}&lt;br /&gt;
| {{Cmd| emerge --update --deep @world}}&lt;br /&gt;
| {{Cmd| apt upgrade}}&lt;br /&gt;
| {{Cmd| yum update}}&lt;br /&gt;
| {{Cmd| xbps-install -u}}&lt;br /&gt;
|- &lt;br /&gt;
| Searching package database&lt;br /&gt;
| {{Cmd| apk search -v &#039;[string]*&#039;}}&lt;br /&gt;
| {{Cmd| pacman -Ss [string]}}&lt;br /&gt;
| {{Cmd| emerge --search [string]}}&lt;br /&gt;
| {{Cmd| apt search [string]}}&lt;br /&gt;
| {{Cmd| yum search [string]}}&lt;br /&gt;
| {{Cmd| xbps-query -Rs [string]}}&lt;br /&gt;
|-&lt;br /&gt;
| Removing packages&lt;br /&gt;
| {{Cmd| apk del [package name]}}&lt;br /&gt;
| {{Cmd| pacman -R [package name]}}&lt;br /&gt;
| {{Cmd| emerge --depclean [package name]}}&lt;br /&gt;
| {{Cmd| apt remove [package name]}}&lt;br /&gt;
| {{Cmd| yum remove [package name]}}&lt;br /&gt;
| {{Cmd| xbps-remove [package name]}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Package Manager]]&lt;/div&gt;</summary>
		<author><name>Winny</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Comparison_with_other_distros&amp;diff=22235</id>
		<title>Comparison with other distros</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Comparison_with_other_distros&amp;diff=22235"/>
		<updated>2022-08-15T18:11:32Z</updated>

		<summary type="html">&lt;p&gt;Winny: /* Package management */  remove misleading note about binary/src distros.  Gentoo is both.  Alpine is both.  It&amp;#039;s just a matter how you install packages on a target machine.  Do you build on the same machine or distribute binpkgs to another machine?&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;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.&lt;br /&gt;
&lt;br /&gt;
{{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]}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Package management =&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Updating package database ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
 apk update&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
 apt update&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
 emaint sync -a&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Showing available updates ==&lt;br /&gt;
Show which packages have an update available:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
 apk version -v&lt;br /&gt;
or:&lt;br /&gt;
 apk version -v -l &#039;&amp;lt;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
 emerge --deep --update --pretend @world&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
 apt upgrade --simulate&lt;br /&gt;
&lt;br /&gt;
== Updating a particular package ==&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
 apk add -u package1 package2&lt;br /&gt;
or&lt;br /&gt;
 apk upgrade package1 package2&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
 apt install package1 package2&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
 emerge --update package1 package2&lt;br /&gt;
&lt;br /&gt;
== Installing packages ==&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
 apk add package1 package2&lt;br /&gt;
&lt;br /&gt;
For source compile, see the [[Aports tree]] and the [[abuild]] tool.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
 emerge package1 package2&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
 apt-get install package1 package2&lt;br /&gt;
Debian source compile:&lt;br /&gt;
 apt-get build-dep package1&lt;br /&gt;
 apt-get source package1&lt;br /&gt;
(optional: customize the build by modifying the debian/rules makefile)&lt;br /&gt;
(or set environmental variables like DEB_BUILD_OPTIONS)&lt;br /&gt;
(note that this will make your bug reports invalid to the maintainer)&lt;br /&gt;
 dpkg-buildpackage -rfakeroot -uc -b&lt;br /&gt;
 dpkg -i generatedpackagename&lt;br /&gt;
Simplified source compile:&lt;br /&gt;
 apt-get build-dep package1&lt;br /&gt;
 apt-get -b source package1&lt;br /&gt;
(the packages are automatically generated using the -b switch above)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; 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 &amp;quot;Architectures and repositories&amp;quot; section below.&lt;br /&gt;
&lt;br /&gt;
== Reinstalling particular packages ==&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
 apk del package1 package2 &amp;amp;&amp;amp; apk add package1 package2&lt;br /&gt;
or:&lt;br /&gt;
 apk fix package1 package2&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
 emerge --oneshot package1 package2&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
 apt-get install --reinstall package1 package2&lt;br /&gt;
&lt;br /&gt;
Note: You &#039;&#039;rarely&#039;&#039; need to reinstall a package on Debian&lt;br /&gt;
&lt;br /&gt;
== Searching the package database ==&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Alpine will only search package names.&lt;br /&gt;
 apk search searchword&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
To search the package names and descriptions:&lt;br /&gt;
 emerge --searchdesc searchword&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; On Gentoo, it&#039;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:&lt;br /&gt;
 eix searchword&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
 esearch searchword&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 apt-cache search searchword&lt;br /&gt;
Both emerge and apt-cache search support regular expressions.&lt;br /&gt;
&lt;br /&gt;
To get the long package information on Debian (searching only in package names):&lt;br /&gt;
 apt-cache search --full --names-only searchword&lt;br /&gt;
&lt;br /&gt;
== Removing packages ==&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 apk del package1 package2&lt;br /&gt;
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)&lt;br /&gt;
&lt;br /&gt;
You will mostly like to take a quick look at the dependencies before you remove packages recursively.&lt;br /&gt;
&lt;br /&gt;
To see dependencies for a package, use:&lt;br /&gt;
 apk info -R package1 package2&lt;br /&gt;
&lt;br /&gt;
To see if package is required by other packages (is a dependency for another packages), use:&lt;br /&gt;
 apk info -r package1 package2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
 emerge --unmerge package1 package2 (Note: this is unsafe as it does not check dependencies)&lt;br /&gt;
 emerge --depclean package1 package2 (This will check dependencies)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
 apt-get remove package1 package2&lt;br /&gt;
or to remove along with all configuration files&lt;br /&gt;
 apt-get remove --purge package1 package2&lt;br /&gt;
&lt;br /&gt;
== Only downloading packages ==&lt;br /&gt;
This can be useful e.g. if you&#039;re on a dial-up connection and want to download everything first and install later.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
 apk fetch package1 package2&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
 emerge --fetchonly package1 package2&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
 apt-get install --download-only package1 package2&lt;br /&gt;
&lt;br /&gt;
== Cleaning up downloaded packages ==&lt;br /&gt;
Compressed packages that were downloaded for installation can easily consume gigabytes of storage space.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Alpine will clean up packages automatically.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
 rm -rf /var/cache/distfiles/*&lt;br /&gt;
To only remove outdated packages you will need to install the gentoolkit package and use eclean:&lt;br /&gt;
 eclean distfiles&lt;br /&gt;
Cleaning temporary files from emerging packages:&lt;br /&gt;
 rm -rf /var/tmp/portage/*&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
 apt-get clean&lt;br /&gt;
Only remove outdated packages:&lt;br /&gt;
 apt-get autoclean&lt;br /&gt;
&lt;br /&gt;
==Reverse dependencies==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
apk-tools will take care of reverse dependencies.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Reverse dependencies are a major drawback of Gentoo&#039;s current portage implementation: It does not take care of them at all at the moment.&lt;br /&gt;
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).&lt;br /&gt;
&lt;br /&gt;
 revdep-rebuild&lt;br /&gt;
can fix broken dependencies broken by&lt;br /&gt;
emerge --depclean&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Reverse dependencies are taken care of by dpkg.&lt;br /&gt;
&lt;br /&gt;
= Runlevel &amp;amp; Initscripts =&lt;br /&gt;
Runlevels work pretty conventionally on Debian (see details: [http://archive.fo/ZdZIz systemd]{{dead link}}). On Alpine and Gentoo, they are a bit different.&lt;br /&gt;
&lt;br /&gt;
== Directories and files ==&lt;br /&gt;
In &#039;&#039;&#039;Debian&#039;&#039;&#039;, 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).&lt;br /&gt;
&lt;br /&gt;
* /etc/rc0.d&lt;br /&gt;
* /etc/rc1.d&lt;br /&gt;
* /etc/rcS.d&lt;br /&gt;
* /etc/rc2.d&lt;br /&gt;
* /etc/rc3.d&lt;br /&gt;
* /etc/rc4.d&lt;br /&gt;
* /etc/rc5.d&lt;br /&gt;
* /etc/rc6.d&lt;br /&gt;
&lt;br /&gt;
In &#039;&#039;&#039;Gentoo&#039;&#039;&#039;, runlevels have the same names, but these are mapped to more self explanatory ones (in /etc/inittab): &amp;quot;boot&amp;quot;, &amp;quot;default&amp;quot;, &amp;quot;nonetwork&amp;quot;, with the option to add more. The directories that represent them are in &lt;br /&gt;
/etc/runlevels/:&lt;br /&gt;
* /etc/runlevels/boot&lt;br /&gt;
* /etc/runlevels/default&lt;br /&gt;
* /etc/runlevels/nonetwork&lt;br /&gt;
&lt;br /&gt;
In &#039;&#039;&#039;Gentoo&#039;&#039;&#039;, 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).&lt;br /&gt;
&lt;br /&gt;
In &#039;&#039;&#039;both Debian and Gentoo&#039;&#039;&#039;, 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.:&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
 $ ls -l /etc/runlevels/boot/hostname&lt;br /&gt;
 lrwxrwxrwx  1 root root 20 Mar 25  2004 /etc/runlevels/boot/hostname -&amp;gt; /etc/init.d/hostname&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
 $ ls -l rcS.d/S40hostname.sh&lt;br /&gt;
 lrwxrwxrwx  1 root root 21 2004-11-07 00:19 rcS.d/S40hostname.sh -&amp;gt; ../init.d/hostname.sh&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In Alpine, runlevels work like they do in Gentoo:&lt;br /&gt;
&lt;br /&gt;
* /etc/runlevels/boot&lt;br /&gt;
* /etc/runlevels/default&lt;br /&gt;
* /etc/runlevels/sysinit&lt;br /&gt;
* /etc/runlevels/nonetwork&lt;br /&gt;
* /etc/runlevels/shutdown&lt;br /&gt;
&lt;br /&gt;
== Runlevel management ==&lt;br /&gt;
To manage which things to start in which runlevels, use the following commands:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
To see current status of services in runlevels, do:&lt;br /&gt;
 rc-status&lt;br /&gt;
To add sshd to default runlevel, do:&lt;br /&gt;
 rc-update add sshd default&lt;br /&gt;
To remove sshd from all runlevels do:&lt;br /&gt;
 rc-update del sshd&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 rc-update&lt;br /&gt;
To add the cupsd to the default runlevel, do:&lt;br /&gt;
 rc-update add cupsd default&lt;br /&gt;
To remove alsasound from the boot runlevel, do:&lt;br /&gt;
 rc-update del alsasound boot&lt;br /&gt;
Also see this wiki page about [http://gentoo-wiki.com/Rc-update gentoo runlevel management with rc-update]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 update-rc.d&lt;br /&gt;
Configure cupsd to be started in runlevels 2, 3, 4, 5, and stopped in 0, 1, 6, with sequence code 20:&lt;br /&gt;
 update-rc.d cupsd start 20 2 3 4 5 . stop 20 0 1 6 . &lt;br /&gt;
or simply:&lt;br /&gt;
 update-rc.d cupsd defaults &lt;br /&gt;
Remove cupsd from all runlevels:&lt;br /&gt;
 update-rc.d -f cupsd remove&lt;br /&gt;
&lt;br /&gt;
= Config Files =&lt;br /&gt;
&lt;br /&gt;
== /etc/portage/make.conf and use flags ==&lt;br /&gt;
While in Gentoo there&#039;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 &#039;&#039;USE&#039;&#039; 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 &#039;gtk gnome&#039; for Gnome users (and a corresponding -qt -kde -arts) and &#039;qt kde arts&#039; for KDE users. A Gentoo user&#039;s complete set of use flags may look something like this:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;USE=&amp;quot;-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&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Architectures and repositories ==&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Also in /etc/portage/make.conf is the &#039;&#039;&#039;ACCEPT_KEYWORDS&#039;&#039;&#039; setting, with (for an X86-based processor) two settings, &#039;&#039;&#039;x86&#039;&#039;&#039; for stabler packages, and &#039;&#039;&#039;~x86&#039;&#039;&#039; 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&#039;s enough to put a line into that file naming the package (for example &#039;app-foo/bar&#039;). That file might look like this:&lt;br /&gt;
&lt;br /&gt;
 app-crypt/gpg-agent&lt;br /&gt;
 app-text/docbook-xsl-stylesheets&lt;br /&gt;
 =app-text/docbook-xml-dtd-4.3-r1&lt;br /&gt;
&lt;br /&gt;
The last line says, that &#039;&#039;only&#039;&#039; version 4.3-r1 should be unmasked. Older and newer versions will still be ignored.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note for non-x86 users:&#039;&#039;&#039;&lt;br /&gt;
The keywords &#039;&#039;&#039;x86&#039;&#039;&#039; and &#039;&#039;&#039;~x86&#039;&#039;&#039; can of course be replaced by &#039;&#039;&#039;sparc&#039;&#039;&#039; and &#039;&#039;&#039;~sparc&#039;&#039;&#039; for example.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Setting this in Debian is slightly more complicated, and is accomplished by setting different &#039;repositories&#039; in &#039;&#039;/etc/apt/sources.list&#039;&#039; - along with which &#039;tree&#039; to use for packages; in Debian, these are &#039;&#039;&#039;stable&#039;&#039;&#039;, &#039;&#039;&#039;testing&#039;&#039;&#039;, and &#039;&#039;&#039;unstable&#039;&#039;&#039;. An &#039;&#039;/etc/apt/sources.list&#039;&#039; file for a debian testing user may look something like this:&lt;br /&gt;
&lt;br /&gt;
 deb http://mirrors.kernel.org/debian testing main non-free contrib&lt;br /&gt;
 deb ftp://ftp.nerim.net/debian-marillat testing main&lt;br /&gt;
 deb http://security.debian.org testing/updates main contrib non-free&lt;br /&gt;
&lt;br /&gt;
Alternatively, &#039;&#039;/etc/apt/sources.list&#039;&#039; 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 &#039;&#039;/etc/apt/apt.conf&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
   APT::Default-Release &amp;quot;testing&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
Per-package settings go in &#039;&#039;/etc/apt/preferences&#039;&#039;, somewhat like Gentoo&#039;s &#039;&#039;/etc/portage/package.keywords&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== Network ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alpine&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Alpine uses /etc/network/interfaces, just like Debian. The main reason is because this is the way busybox does it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;/etc/network/interfaces&#039;&#039;:&lt;br /&gt;
 auto eth0&lt;br /&gt;
 iface eth0 inet static&lt;br /&gt;
  address 192.168.0.1&lt;br /&gt;
  netmask 255.255.255.0&lt;br /&gt;
  broadcast 192.168.0.255&lt;br /&gt;
  &lt;br /&gt;
 auto eth0:0&lt;br /&gt;
 iface eth0:0 inet static&lt;br /&gt;
  address 192.168.1.1&lt;br /&gt;
  netmask 255.255.255.0&lt;br /&gt;
  broadcast 192.168.1.255&lt;br /&gt;
 # etc.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gentoo&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;/etc/conf.d/net&#039;&#039;:&lt;br /&gt;
 config_eth0=&amp;quot;192.168.1.100 netmask 255.255.255.0&lt;br /&gt;
              192.168.2.100 netmask 255.255.255.0&amp;quot;&lt;br /&gt;
 routes_eth0=&amp;quot;default via 192.168.1.1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Note that this has changed recently. For more information please refer to http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=4&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Debian&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;/etc/network/interfaces&#039;&#039;:&lt;br /&gt;
 auto eth0&lt;br /&gt;
 iface eth0 inet static&lt;br /&gt;
  address 192.168.0.1&lt;br /&gt;
  netmask 255.255.255.0&lt;br /&gt;
  broadcast 192.168.0.255&lt;br /&gt;
  &lt;br /&gt;
 auto eth0:0&lt;br /&gt;
 iface eth0:0 inet static&lt;br /&gt;
  address 192.168.1.1&lt;br /&gt;
  netmask 255.255.255.0&lt;br /&gt;
  broadcast 192.168.1.255&lt;br /&gt;
 # etc.&lt;br /&gt;
&lt;br /&gt;
= Comparison chart/Rosetta Stone =&lt;br /&gt;
&lt;br /&gt;
This chart shows how some standard things are done in Alpine compared to other distributions.&lt;br /&gt;
&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Action &lt;br /&gt;
! Alpine ([https://wiki.alpinelinux.org/wiki/Alpine_Linux_package_management apk])&lt;br /&gt;
! Arch Linux ([https://wiki.archlinux.org/index.php/Pacman pacman])&lt;br /&gt;
! Gentoo ([https://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&amp;amp;chap=1 emerge])&lt;br /&gt;
! Debian/Ubuntu ([https://wiki.debian.org/AptCLI apt])&lt;br /&gt;
! Fedora/RHEL/SL/CentOS ([http://yum.baseurl.org/wiki/YumCommands yum])&lt;br /&gt;
! VoidLinux ([https://docs.voidlinux.org/xbps/index.html?highlight=xb#xbps-package-manager XBPS])&lt;br /&gt;
|-&lt;br /&gt;
| Update package database&lt;br /&gt;
| {{Cmd| apk update}}&lt;br /&gt;
| {{Cmd| pacman -Sy}}&lt;br /&gt;
| {{Cmd| emerge --sync}}&lt;br /&gt;
| {{Cmd| apt update}}&lt;br /&gt;
| {{Cmd| yum update}}&lt;br /&gt;
| {{Cmd| xbps-install -S}}&lt;br /&gt;
|-&lt;br /&gt;
| Showing available updates&lt;br /&gt;
| {{Cmd| apk version -l &#039;&amp;lt;&#039;}}&lt;br /&gt;
| {{Cmd| pacman -Qu}}&lt;br /&gt;
| {{Cmd| emerge --deep --update --pretend @world}}&lt;br /&gt;
| {{Cmd| apt upgrade --simulate}}&lt;br /&gt;
| {{Cmd| yum list updates}}&lt;br /&gt;
| {{Cmd| xbps-install -n -u}}&lt;br /&gt;
|-&lt;br /&gt;
| Installing packages&lt;br /&gt;
| {{Cmd| apk add [package name]}}&lt;br /&gt;
| {{Cmd| pacman -S [package name]}}&lt;br /&gt;
| {{Cmd| emerge [package name]}}&lt;br /&gt;
| {{Cmd| apt install [package name]}}&lt;br /&gt;
| {{Cmd| yum install [package name]}}&lt;br /&gt;
| {{Cmd| xbps-install [package name]}}&lt;br /&gt;
|-&lt;br /&gt;
| Update all installed packages&lt;br /&gt;
| {{Cmd| apk upgrade -U -a}}&lt;br /&gt;
| {{Cmd| pacman -Su}}&lt;br /&gt;
| {{Cmd| emerge --update --deep @world}}&lt;br /&gt;
| {{Cmd| apt upgrade}}&lt;br /&gt;
| {{Cmd| yum update}}&lt;br /&gt;
| {{Cmd| xbps-install -u}}&lt;br /&gt;
|- &lt;br /&gt;
| Searching package database&lt;br /&gt;
| {{Cmd| apk search -v &#039;[string]*&#039;}}&lt;br /&gt;
| {{Cmd| pacman -Ss [string]}}&lt;br /&gt;
| {{Cmd| emerge --search [string]}}&lt;br /&gt;
| {{Cmd| apt search [string]}}&lt;br /&gt;
| {{Cmd| yum search [string]}}&lt;br /&gt;
| {{Cmd| xbps-query -Rs [string]}}&lt;br /&gt;
|-&lt;br /&gt;
| Removing packages&lt;br /&gt;
| {{Cmd| apk del [package name]}}&lt;br /&gt;
| {{Cmd| pacman -R [package name]}}&lt;br /&gt;
| {{Cmd| emerge --depclean [package name]}}&lt;br /&gt;
| {{Cmd| apt remove [package name]}}&lt;br /&gt;
| {{Cmd| yum remove [package name]}}&lt;br /&gt;
| {{Cmd| xbps-remove [package name]}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Package Manager]]&lt;/div&gt;</summary>
		<author><name>Winny</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Talk:Main_Page&amp;diff=22234</id>
		<title>Talk:Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Talk:Main_Page&amp;diff=22234"/>
		<updated>2022-08-15T17:53:54Z</updated>

		<summary type="html">&lt;p&gt;Winny: note about the warning distraction&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Put important content at top? ==&lt;br /&gt;
Hey, looks like I can&#039;t edit this page.  I was wondering if it would be possible to move the navigation and welcome section to the top of the page.  The warning about the license change is important, however, I don&#039;t think that&#039;s what most users come to the wiki to read. &amp;amp;mdash; [[User:Winny|Winny]] ([[User talk:Winny|talk]]) 17:53, 15 August 2022 (UTC)&lt;/div&gt;</summary>
		<author><name>Winny</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=User:Winny&amp;diff=22233</id>
		<title>User:Winny</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=User:Winny&amp;diff=22233"/>
		<updated>2022-08-15T17:50:51Z</updated>

		<summary type="html">&lt;p&gt;Winny: user page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== 👋 Hi Alpine users ==&lt;br /&gt;
&lt;br /&gt;
This is the homepage for Winny on the Alpinewiki.  Here is my homepage: [https://winny.tech/ https://winny.tech/]&lt;/div&gt;</summary>
		<author><name>Winny</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Bridge&amp;diff=22232</id>
		<title>Bridge</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Bridge&amp;diff=22232"/>
		<updated>2022-08-15T17:49:30Z</updated>

		<summary type="html">&lt;p&gt;Winny: /* Bridging for a Xen dom0 */ formatting&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Networking]]&lt;br /&gt;
This document describes how to configure a [http://en.wikipedia.org/wiki/Bridging_%28networking%29 network bridge] interface in Alpine Linux.&lt;br /&gt;
&lt;br /&gt;
== Using brctl ==&lt;br /&gt;
&lt;br /&gt;
{{Obsolete|According to [https://wiki.linuxfoundation.org/networking/bridge upstream], &#039;&#039;bridge-utils&#039;&#039; is deprecated.  Please use &#039;&#039;bridge&#039;&#039; instead.}}&lt;br /&gt;
&lt;br /&gt;
Bridges are managed manually with the &#039;&#039;&#039;brctl&#039;&#039;&#039; command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage: brctl COMMAND [BRIDGE [INTERFACE]]&lt;br /&gt;
&lt;br /&gt;
Manage ethernet bridges&lt;br /&gt;
&lt;br /&gt;
Commands:&lt;br /&gt;
	show			Show a list of bridges&lt;br /&gt;
	addbr BRIDGE		Create BRIDGE&lt;br /&gt;
	delbr BRIDGE		Delete BRIDGE&lt;br /&gt;
	addif BRIDGE IFACE	Add IFACE to BRIDGE&lt;br /&gt;
	delif BRIDGE IFACE	Delete IFACE from BRIDGE&lt;br /&gt;
	setageing BRIDGE TIME		Set ageing time&lt;br /&gt;
	setfd BRIDGE TIME		Set bridge forward delay&lt;br /&gt;
	sethello BRIDGE TIME		Set hello time&lt;br /&gt;
	setmaxage BRIDGE TIME		Set max message age&lt;br /&gt;
	setpathcost BRIDGE COST		Set path cost&lt;br /&gt;
	setportprio BRIDGE PRIO		Set port priority&lt;br /&gt;
	setbridgeprio BRIDGE PRIO	Set bridge priority&lt;br /&gt;
	stp BRIDGE [1|0]		STP on/off&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To manually create bridge interface br0:&lt;br /&gt;
{{Cmd|brctl addbr br0}}&lt;br /&gt;
&lt;br /&gt;
To add interface eth0 and eth1 to br0:&lt;br /&gt;
{{Cmd|brctl addif br0 eth0&lt;br /&gt;
brctl addif br0 eth1}}&lt;br /&gt;
&lt;br /&gt;
Note: You need to set the link status to &#039;&#039;up&#039;&#039; on the added interfaces.&lt;br /&gt;
{{Cmd|ip link set dev eth0 up&lt;br /&gt;
ip link set dev eth1 up}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Networking]]&lt;br /&gt;
&lt;br /&gt;
== Configuration file ==&lt;br /&gt;
Install the scripts that configure the bridge.&lt;br /&gt;
{{Cmd|apk add bridge}}&lt;br /&gt;
&lt;br /&gt;
Bridging is then configured in &#039;&#039;/etc/network/interfaces&#039;&#039; with the &#039;&#039;bridge-ports&#039;&#039; keyword.&lt;br /&gt;
{{Warning|You normally don&#039;t assign ip addresses to the bridged interfaces (eth0 and eth1 in our example) but to the bridge itself (br0).}}&lt;br /&gt;
&lt;br /&gt;
In this example the address 192.168.0.1/24 is used.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
auto br0&lt;br /&gt;
iface br0 inet static&lt;br /&gt;
	bridge-ports eth0 eth1&lt;br /&gt;
	bridge-stp 0&lt;br /&gt;
	address 192.168.0.1&lt;br /&gt;
	netmask 255.255.255.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can set the various options with these keywords:&lt;br /&gt;
; bridge-ports&lt;br /&gt;
: Set bridge ports (ethX) or none for no physical interfaces&lt;br /&gt;
; bridge-aging&lt;br /&gt;
: Set ageing time&lt;br /&gt;
; bridge-fd&lt;br /&gt;
: Set bridge forward delay&lt;br /&gt;
; bridge-hello&lt;br /&gt;
: Set hello time&lt;br /&gt;
; bridge-maxage&lt;br /&gt;
: Set bridge max message age&lt;br /&gt;
; bridge-pathcost&lt;br /&gt;
: Set path cost&lt;br /&gt;
; bridge-portprio&lt;br /&gt;
: Set port priority&lt;br /&gt;
; bridge-bridgeprio&lt;br /&gt;
: Set bridge priority&lt;br /&gt;
; bridge-stp&lt;br /&gt;
: STP on/off&lt;br /&gt;
&lt;br /&gt;
== Using pre-up/post-down ==&lt;br /&gt;
If you want be able to control the bridge interfaces individually, you need to use pre-up/post-down hooks.&lt;br /&gt;
&lt;br /&gt;
Example &#039;&#039;/etc/network/interfaces&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
auto br0&lt;br /&gt;
iface br0 inet static&lt;br /&gt;
	pre-up brctl addbr br0&lt;br /&gt;
	pre-up echo 0 &amp;gt; /proc/sys/net/bridge/bridge-nf-call-arptables&lt;br /&gt;
	pre-up echo 0 &amp;gt; /proc/sys/net/bridge/bridge-nf-call-iptables&lt;br /&gt;
	pre-up echo 0 &amp;gt; /proc/sys/net/bridge/bridge-nf-call-ip6tables&lt;br /&gt;
	address 192.168.0.253&lt;br /&gt;
	netmask 255.255.255.0&lt;br /&gt;
	gateway 192.168.0.254&lt;br /&gt;
	post-down brctl delbr br0&lt;br /&gt;
	&lt;br /&gt;
auto eth0&lt;br /&gt;
iface eth0 inet manual&lt;br /&gt;
	up ip link set $IFACE up&lt;br /&gt;
	up brctl addif br0 $IFACE&lt;br /&gt;
	down brctl delif br0 $IFACE || true&lt;br /&gt;
	down ip link set $IFACE down&lt;br /&gt;
	&lt;br /&gt;
auto eth1&lt;br /&gt;
iface eth1 inet manual&lt;br /&gt;
	up ip link set $IFACE up&lt;br /&gt;
	up brctl addif br0 $IFACE&lt;br /&gt;
	down brctl delif br0 $IFACE || true&lt;br /&gt;
	down ip link set $IFACE down&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That way, you create br0 with: ifup br0. You can add/remove&lt;br /&gt;
individual interfaces to the bridge with ifup eth0, ifdown eth0.&lt;br /&gt;
&lt;br /&gt;
== Bridging for a Xen dom0 ==&lt;br /&gt;
Bridging in a dom0 is a bit specific as it consists in bridging a real interface (i.e. ethX) with a virtual interface (i.e. vifX.Y).&lt;br /&gt;
At bridge creation time, the virtual interface does not exist and will be added by the Xen toolstack when a domU is booting (see Xen documentation on how to link the virtual interface to the correct bridge).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Particulars:&#039;&#039;&#039;&lt;br /&gt;
* the bridge consists of a single physical interface&lt;br /&gt;
* the physical interface does not have an IP and is configured manually &lt;br /&gt;
* the bridge will have the IP address and will be auto, resulting in bringing up the physical interface &lt;br /&gt;
&lt;br /&gt;
This translates to a sample config &#039;&#039;/etc/network/interfaces&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
auto eth0&lt;br /&gt;
iface eth0 inet manual&lt;br /&gt;
&lt;br /&gt;
auto br0&lt;br /&gt;
iface br0 inet static&lt;br /&gt;
	address 192.168.0.253&lt;br /&gt;
	netmask 255.255.255.0&lt;br /&gt;
	gateway 192.168.0.254&lt;br /&gt;
        bridge_ports eth0&lt;br /&gt;
        bridge_stp 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After the domU OS is started, the virtual interface wil be added and the working bridge can be checked with&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
brctl show&lt;br /&gt;
&lt;br /&gt;
ifconfig -a&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Bridging for KVM ==&lt;br /&gt;
&lt;br /&gt;
Example &#039;&#039;/etc/network/interfaces&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
{{Note|I personally remove the eth0 declaration without any issue.}}&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
auto br0&lt;br /&gt;
iface br0 inet dhcp&lt;br /&gt;
  bridge_ports eth0&lt;br /&gt;
  bridge_stp 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Little script to allow dhcp over iptables ===&lt;br /&gt;
{{Note|I tried the Using pre-up/post-down as mentionned in #3, but it didn&#039;t work well for me }}&lt;br /&gt;
{{Note|Usually it will be in /etc/rc.local as mentioned [https://wiki.libvirt.org/page/Networking#Debian.2FUbuntu_Bridging here] }}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Run local.d scripts on boot.&lt;br /&gt;
rc-update add local&lt;br /&gt;
&lt;br /&gt;
# Write the script.&lt;br /&gt;
cat &amp;gt;&amp;gt; /etc/local.d/iptables_dhcp_kvm.start &amp;lt;&amp;lt; EOM&lt;br /&gt;
echo 0 &amp;gt; /proc/sys/net/bridge/bridge-nf-call-arptables&lt;br /&gt;
echo 0 &amp;gt; /proc/sys/net/bridge/bridge-nf-call-iptables&lt;br /&gt;
echo 0 &amp;gt; /proc/sys/net/bridge/bridge-nf-call-ip6tables&lt;br /&gt;
iptables -A FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu&lt;br /&gt;
exit 0&lt;br /&gt;
EOM&lt;br /&gt;
&lt;br /&gt;
# local.d script must be executable.&lt;br /&gt;
chmod a+x /etc/local.d/iptables_dhcp_kvm.start&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Bridging for QEMU ==&lt;br /&gt;
&lt;br /&gt;
Replace &#039;&#039;/etc/network/interfaces&#039;&#039; with the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
auto lo&lt;br /&gt;
iface lo inet loopback&lt;br /&gt;
&lt;br /&gt;
auto br0&lt;br /&gt;
iface br0 inet dhcp&lt;br /&gt;
  bridge_ports eth0&lt;br /&gt;
  bridge_stp 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To enable DHCP and get QEMU to use the bridge we&#039;ve created above, run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Install the bridge tools&lt;br /&gt;
apk add bridge&lt;br /&gt;
&lt;br /&gt;
# Load kernel modules needed for KVM bridging.&lt;br /&gt;
printf &#039;tun\ntap\n&#039; &amp;gt;&amp;gt; /etc/modules&lt;br /&gt;
&lt;br /&gt;
# Allow Qemu to use our bridge.&lt;br /&gt;
echo &#039;allow br0&#039; &amp;gt; /etc/qemu/bridge.conf&lt;br /&gt;
&lt;br /&gt;
# Write some sysctl knobs to allow bridging to work.&lt;br /&gt;
printf &#039;# Enable bridge forwarding.&lt;br /&gt;
net.ipv4.conf.br0_bc_forwarding=1&lt;br /&gt;
# Ignore iptables on bridge interfaces.&lt;br /&gt;
net.bridge.bridge-nf-call-iptables=0&lt;br /&gt;
&#039; &amp;gt;&amp;gt; /etc/sysctl.d/bridging.conf&lt;br /&gt;
&lt;br /&gt;
# Apply sysctl config edits.&lt;br /&gt;
sysctl -p&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After a &#039;&#039;reboot&#039;&#039;, you can use the bridge like so (assuming you have a &#039;&#039;qcow2&#039;&#039; image named &#039;&#039;felix-pojtigners-theia.qcow2&#039;&#039;):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
qemu-system-x86_64 -m 4096 -accel kvm -net nic -net bridge,br=br0 -boot d -drive format=qcow2,file=felix-pojtingers-theia.qcow2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t get a DHCP response for the guest machine (assuming you have a DHCP server running on the physical network that &#039;&#039;eth0&#039;&#039; is connected to), you can debug with &#039;&#039;tshark&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tshark -i eth0  -Y &amp;quot;bootp.option.type == 53&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Winny</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Bridge&amp;diff=22231</id>
		<title>Bridge</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Bridge&amp;diff=22231"/>
		<updated>2022-08-15T17:47:19Z</updated>

		<summary type="html">&lt;p&gt;Winny: /* Using brctl */ mention that bridge-utils is deprecated&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Networking]]&lt;br /&gt;
This document describes how to configure a [http://en.wikipedia.org/wiki/Bridging_%28networking%29 network bridge] interface in Alpine Linux.&lt;br /&gt;
&lt;br /&gt;
== Using brctl ==&lt;br /&gt;
&lt;br /&gt;
{{Obsolete|According to [https://wiki.linuxfoundation.org/networking/bridge upstream], &#039;&#039;bridge-utils&#039;&#039; is deprecated.  Please use &#039;&#039;bridge&#039;&#039; instead.}}&lt;br /&gt;
&lt;br /&gt;
Bridges are managed manually with the &#039;&#039;&#039;brctl&#039;&#039;&#039; command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage: brctl COMMAND [BRIDGE [INTERFACE]]&lt;br /&gt;
&lt;br /&gt;
Manage ethernet bridges&lt;br /&gt;
&lt;br /&gt;
Commands:&lt;br /&gt;
	show			Show a list of bridges&lt;br /&gt;
	addbr BRIDGE		Create BRIDGE&lt;br /&gt;
	delbr BRIDGE		Delete BRIDGE&lt;br /&gt;
	addif BRIDGE IFACE	Add IFACE to BRIDGE&lt;br /&gt;
	delif BRIDGE IFACE	Delete IFACE from BRIDGE&lt;br /&gt;
	setageing BRIDGE TIME		Set ageing time&lt;br /&gt;
	setfd BRIDGE TIME		Set bridge forward delay&lt;br /&gt;
	sethello BRIDGE TIME		Set hello time&lt;br /&gt;
	setmaxage BRIDGE TIME		Set max message age&lt;br /&gt;
	setpathcost BRIDGE COST		Set path cost&lt;br /&gt;
	setportprio BRIDGE PRIO		Set port priority&lt;br /&gt;
	setbridgeprio BRIDGE PRIO	Set bridge priority&lt;br /&gt;
	stp BRIDGE [1|0]		STP on/off&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To manually create bridge interface br0:&lt;br /&gt;
{{Cmd|brctl addbr br0}}&lt;br /&gt;
&lt;br /&gt;
To add interface eth0 and eth1 to br0:&lt;br /&gt;
{{Cmd|brctl addif br0 eth0&lt;br /&gt;
brctl addif br0 eth1}}&lt;br /&gt;
&lt;br /&gt;
Note: You need to set the link status to &#039;&#039;up&#039;&#039; on the added interfaces.&lt;br /&gt;
{{Cmd|ip link set dev eth0 up&lt;br /&gt;
ip link set dev eth1 up}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Networking]]&lt;br /&gt;
&lt;br /&gt;
== Configuration file ==&lt;br /&gt;
Install the scripts that configure the bridge.&lt;br /&gt;
{{Cmd|apk add bridge}}&lt;br /&gt;
&lt;br /&gt;
Bridging is then configured in &#039;&#039;/etc/network/interfaces&#039;&#039; with the &#039;&#039;bridge-ports&#039;&#039; keyword.&lt;br /&gt;
{{Warning|You normally don&#039;t assign ip addresses to the bridged interfaces (eth0 and eth1 in our example) but to the bridge itself (br0).}}&lt;br /&gt;
&lt;br /&gt;
In this example the address 192.168.0.1/24 is used.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
auto br0&lt;br /&gt;
iface br0 inet static&lt;br /&gt;
	bridge-ports eth0 eth1&lt;br /&gt;
	bridge-stp 0&lt;br /&gt;
	address 192.168.0.1&lt;br /&gt;
	netmask 255.255.255.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can set the various options with these keywords:&lt;br /&gt;
; bridge-ports&lt;br /&gt;
: Set bridge ports (ethX) or none for no physical interfaces&lt;br /&gt;
; bridge-aging&lt;br /&gt;
: Set ageing time&lt;br /&gt;
; bridge-fd&lt;br /&gt;
: Set bridge forward delay&lt;br /&gt;
; bridge-hello&lt;br /&gt;
: Set hello time&lt;br /&gt;
; bridge-maxage&lt;br /&gt;
: Set bridge max message age&lt;br /&gt;
; bridge-pathcost&lt;br /&gt;
: Set path cost&lt;br /&gt;
; bridge-portprio&lt;br /&gt;
: Set port priority&lt;br /&gt;
; bridge-bridgeprio&lt;br /&gt;
: Set bridge priority&lt;br /&gt;
; bridge-stp&lt;br /&gt;
: STP on/off&lt;br /&gt;
&lt;br /&gt;
== Using pre-up/post-down ==&lt;br /&gt;
If you want be able to control the bridge interfaces individually, you need to use pre-up/post-down hooks.&lt;br /&gt;
&lt;br /&gt;
Example &#039;&#039;/etc/network/interfaces&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
auto br0&lt;br /&gt;
iface br0 inet static&lt;br /&gt;
	pre-up brctl addbr br0&lt;br /&gt;
	pre-up echo 0 &amp;gt; /proc/sys/net/bridge/bridge-nf-call-arptables&lt;br /&gt;
	pre-up echo 0 &amp;gt; /proc/sys/net/bridge/bridge-nf-call-iptables&lt;br /&gt;
	pre-up echo 0 &amp;gt; /proc/sys/net/bridge/bridge-nf-call-ip6tables&lt;br /&gt;
	address 192.168.0.253&lt;br /&gt;
	netmask 255.255.255.0&lt;br /&gt;
	gateway 192.168.0.254&lt;br /&gt;
	post-down brctl delbr br0&lt;br /&gt;
	&lt;br /&gt;
auto eth0&lt;br /&gt;
iface eth0 inet manual&lt;br /&gt;
	up ip link set $IFACE up&lt;br /&gt;
	up brctl addif br0 $IFACE&lt;br /&gt;
	down brctl delif br0 $IFACE || true&lt;br /&gt;
	down ip link set $IFACE down&lt;br /&gt;
	&lt;br /&gt;
auto eth1&lt;br /&gt;
iface eth1 inet manual&lt;br /&gt;
	up ip link set $IFACE up&lt;br /&gt;
	up brctl addif br0 $IFACE&lt;br /&gt;
	down brctl delif br0 $IFACE || true&lt;br /&gt;
	down ip link set $IFACE down&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That way, you create br0 with: ifup br0. You can add/remove&lt;br /&gt;
individual interfaces to the bridge with ifup eth0, ifdown eth0.&lt;br /&gt;
&lt;br /&gt;
== Bridging for a Xen dom0 ==&lt;br /&gt;
Bridging in a dom0 is a bit specific as it consists in bridging a real interface (i.e. ethX) with a virtual interface (i.e. vifX.Y).&lt;br /&gt;
At bridge creation time, the virtual interface does not exist and will be added by the Xen toolstack when a domU is booting (see Xen documentation on how to link the virtual interface to the correct bridge).&lt;br /&gt;
&lt;br /&gt;
;Particulars :&lt;br /&gt;
- the bridge consists of a single physical interface &amp;lt;br/&amp;gt;&lt;br /&gt;
- the physical interface does not have an IP and is configured manually &amp;lt;br/&amp;gt;&lt;br /&gt;
- the bridge will have the IP address and will be auto, resulting in bringing up the physical interface &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This translates to a sample config :&lt;br /&gt;
&lt;br /&gt;
Example &#039;&#039;/etc/network/interfaces&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
auto eth0&lt;br /&gt;
iface eth0 inet manual&lt;br /&gt;
&lt;br /&gt;
auto br0&lt;br /&gt;
iface br0 inet static&lt;br /&gt;
	address 192.168.0.253&lt;br /&gt;
	netmask 255.255.255.0&lt;br /&gt;
	gateway 192.168.0.254&lt;br /&gt;
        bridge_ports eth0&lt;br /&gt;
        bridge_stp 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After the domU OS is started, the virtual interface wil be added and the working bridge can be checked with&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
brctl show&lt;br /&gt;
&lt;br /&gt;
ifconfig -a&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Bridging for KVM ==&lt;br /&gt;
&lt;br /&gt;
Example &#039;&#039;/etc/network/interfaces&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
{{Note|I personally remove the eth0 declaration without any issue.}}&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
auto br0&lt;br /&gt;
iface br0 inet dhcp&lt;br /&gt;
  bridge_ports eth0&lt;br /&gt;
  bridge_stp 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Little script to allow dhcp over iptables ===&lt;br /&gt;
{{Note|I tried the Using pre-up/post-down as mentionned in #3, but it didn&#039;t work well for me }}&lt;br /&gt;
{{Note|Usually it will be in /etc/rc.local as mentioned [https://wiki.libvirt.org/page/Networking#Debian.2FUbuntu_Bridging here] }}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Run local.d scripts on boot.&lt;br /&gt;
rc-update add local&lt;br /&gt;
&lt;br /&gt;
# Write the script.&lt;br /&gt;
cat &amp;gt;&amp;gt; /etc/local.d/iptables_dhcp_kvm.start &amp;lt;&amp;lt; EOM&lt;br /&gt;
echo 0 &amp;gt; /proc/sys/net/bridge/bridge-nf-call-arptables&lt;br /&gt;
echo 0 &amp;gt; /proc/sys/net/bridge/bridge-nf-call-iptables&lt;br /&gt;
echo 0 &amp;gt; /proc/sys/net/bridge/bridge-nf-call-ip6tables&lt;br /&gt;
iptables -A FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu&lt;br /&gt;
exit 0&lt;br /&gt;
EOM&lt;br /&gt;
&lt;br /&gt;
# local.d script must be executable.&lt;br /&gt;
chmod a+x /etc/local.d/iptables_dhcp_kvm.start&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Bridging for QEMU ==&lt;br /&gt;
&lt;br /&gt;
Replace &#039;&#039;/etc/network/interfaces&#039;&#039; with the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
auto lo&lt;br /&gt;
iface lo inet loopback&lt;br /&gt;
&lt;br /&gt;
auto br0&lt;br /&gt;
iface br0 inet dhcp&lt;br /&gt;
  bridge_ports eth0&lt;br /&gt;
  bridge_stp 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To enable DHCP and get QEMU to use the bridge we&#039;ve created above, run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Install the bridge tools&lt;br /&gt;
apk add bridge&lt;br /&gt;
&lt;br /&gt;
# Load kernel modules needed for KVM bridging.&lt;br /&gt;
printf &#039;tun\ntap\n&#039; &amp;gt;&amp;gt; /etc/modules&lt;br /&gt;
&lt;br /&gt;
# Allow Qemu to use our bridge.&lt;br /&gt;
echo &#039;allow br0&#039; &amp;gt; /etc/qemu/bridge.conf&lt;br /&gt;
&lt;br /&gt;
# Write some sysctl knobs to allow bridging to work.&lt;br /&gt;
printf &#039;# Enable bridge forwarding.&lt;br /&gt;
net.ipv4.conf.br0_bc_forwarding=1&lt;br /&gt;
# Ignore iptables on bridge interfaces.&lt;br /&gt;
net.bridge.bridge-nf-call-iptables=0&lt;br /&gt;
&#039; &amp;gt;&amp;gt; /etc/sysctl.d/bridging.conf&lt;br /&gt;
&lt;br /&gt;
# Apply sysctl config edits.&lt;br /&gt;
sysctl -p&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After a &#039;&#039;reboot&#039;&#039;, you can use the bridge like so (assuming you have a &#039;&#039;qcow2&#039;&#039; image named &#039;&#039;felix-pojtigners-theia.qcow2&#039;&#039;):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
qemu-system-x86_64 -m 4096 -accel kvm -net nic -net bridge,br=br0 -boot d -drive format=qcow2,file=felix-pojtingers-theia.qcow2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t get a DHCP response for the guest machine (assuming you have a DHCP server running on the physical network that &#039;&#039;eth0&#039;&#039; is connected to), you can debug with &#039;&#039;tshark&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tshark -i eth0  -Y &amp;quot;bootp.option.type == 53&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Winny</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Talk:Bridge&amp;diff=22230</id>
		<title>Talk:Bridge</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Talk:Bridge&amp;diff=22230"/>
		<updated>2022-08-15T17:43:20Z</updated>

		<summary type="html">&lt;p&gt;Winny: Add topic about KVM vs QEMU overlap&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== KVM vs QEMU ==&lt;br /&gt;
&lt;br /&gt;
Wanted to make a note- it appears the QEMU instructions work fine for libvirt (KVM).  Is there any reason to include both set of instructions?  Merge? &amp;amp;mdash; [[User:Winny|Winny]] ([[User talk:Winny|talk]]) 17:43, 15 August 2022 (UTC)&lt;/div&gt;</summary>
		<author><name>Winny</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Bridge&amp;diff=22229</id>
		<title>Bridge</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Bridge&amp;diff=22229"/>
		<updated>2022-08-15T17:41:18Z</updated>

		<summary type="html">&lt;p&gt;Winny: /* Little script to allow dhcp over iptables */ remove no-operation script&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Networking]]&lt;br /&gt;
This document describes how to configure a [http://en.wikipedia.org/wiki/Bridging_%28networking%29 network bridge] interface in Alpine Linux.&lt;br /&gt;
&lt;br /&gt;
== Using brctl ==&lt;br /&gt;
Bridges are managed manually with the &#039;&#039;&#039;brctl&#039;&#039;&#039; command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage: brctl COMMAND [BRIDGE [INTERFACE]]&lt;br /&gt;
&lt;br /&gt;
Manage ethernet bridges&lt;br /&gt;
&lt;br /&gt;
Commands:&lt;br /&gt;
	show			Show a list of bridges&lt;br /&gt;
	addbr BRIDGE		Create BRIDGE&lt;br /&gt;
	delbr BRIDGE		Delete BRIDGE&lt;br /&gt;
	addif BRIDGE IFACE	Add IFACE to BRIDGE&lt;br /&gt;
	delif BRIDGE IFACE	Delete IFACE from BRIDGE&lt;br /&gt;
	setageing BRIDGE TIME		Set ageing time&lt;br /&gt;
	setfd BRIDGE TIME		Set bridge forward delay&lt;br /&gt;
	sethello BRIDGE TIME		Set hello time&lt;br /&gt;
	setmaxage BRIDGE TIME		Set max message age&lt;br /&gt;
	setpathcost BRIDGE COST		Set path cost&lt;br /&gt;
	setportprio BRIDGE PRIO		Set port priority&lt;br /&gt;
	setbridgeprio BRIDGE PRIO	Set bridge priority&lt;br /&gt;
	stp BRIDGE [1|0]		STP on/off&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To manually create bridge interface br0:&lt;br /&gt;
{{Cmd|brctl addbr br0}}&lt;br /&gt;
&lt;br /&gt;
To add interface eth0 and eth1 to br0:&lt;br /&gt;
{{Cmd|brctl addif br0 eth0&lt;br /&gt;
brctl addif br0 eth1}}&lt;br /&gt;
&lt;br /&gt;
Note: You need to set the link status to &#039;&#039;up&#039;&#039; on the added interfaces.&lt;br /&gt;
{{Cmd|ip link set dev eth0 up&lt;br /&gt;
ip link set dev eth1 up}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Networking]]&lt;br /&gt;
&lt;br /&gt;
== Configuration file ==&lt;br /&gt;
Install the scripts that configure the bridge.&lt;br /&gt;
{{Cmd|apk add bridge}}&lt;br /&gt;
&lt;br /&gt;
Bridging is then configured in &#039;&#039;/etc/network/interfaces&#039;&#039; with the &#039;&#039;bridge-ports&#039;&#039; keyword.&lt;br /&gt;
{{Warning|You normally don&#039;t assign ip addresses to the bridged interfaces (eth0 and eth1 in our example) but to the bridge itself (br0).}}&lt;br /&gt;
&lt;br /&gt;
In this example the address 192.168.0.1/24 is used.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
auto br0&lt;br /&gt;
iface br0 inet static&lt;br /&gt;
	bridge-ports eth0 eth1&lt;br /&gt;
	bridge-stp 0&lt;br /&gt;
	address 192.168.0.1&lt;br /&gt;
	netmask 255.255.255.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can set the various options with these keywords:&lt;br /&gt;
; bridge-ports&lt;br /&gt;
: Set bridge ports (ethX) or none for no physical interfaces&lt;br /&gt;
; bridge-aging&lt;br /&gt;
: Set ageing time&lt;br /&gt;
; bridge-fd&lt;br /&gt;
: Set bridge forward delay&lt;br /&gt;
; bridge-hello&lt;br /&gt;
: Set hello time&lt;br /&gt;
; bridge-maxage&lt;br /&gt;
: Set bridge max message age&lt;br /&gt;
; bridge-pathcost&lt;br /&gt;
: Set path cost&lt;br /&gt;
; bridge-portprio&lt;br /&gt;
: Set port priority&lt;br /&gt;
; bridge-bridgeprio&lt;br /&gt;
: Set bridge priority&lt;br /&gt;
; bridge-stp&lt;br /&gt;
: STP on/off&lt;br /&gt;
&lt;br /&gt;
== Using pre-up/post-down ==&lt;br /&gt;
If you want be able to control the bridge interfaces individually, you need to use pre-up/post-down hooks.&lt;br /&gt;
&lt;br /&gt;
Example &#039;&#039;/etc/network/interfaces&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
auto br0&lt;br /&gt;
iface br0 inet static&lt;br /&gt;
	pre-up brctl addbr br0&lt;br /&gt;
	pre-up echo 0 &amp;gt; /proc/sys/net/bridge/bridge-nf-call-arptables&lt;br /&gt;
	pre-up echo 0 &amp;gt; /proc/sys/net/bridge/bridge-nf-call-iptables&lt;br /&gt;
	pre-up echo 0 &amp;gt; /proc/sys/net/bridge/bridge-nf-call-ip6tables&lt;br /&gt;
	address 192.168.0.253&lt;br /&gt;
	netmask 255.255.255.0&lt;br /&gt;
	gateway 192.168.0.254&lt;br /&gt;
	post-down brctl delbr br0&lt;br /&gt;
	&lt;br /&gt;
auto eth0&lt;br /&gt;
iface eth0 inet manual&lt;br /&gt;
	up ip link set $IFACE up&lt;br /&gt;
	up brctl addif br0 $IFACE&lt;br /&gt;
	down brctl delif br0 $IFACE || true&lt;br /&gt;
	down ip link set $IFACE down&lt;br /&gt;
	&lt;br /&gt;
auto eth1&lt;br /&gt;
iface eth1 inet manual&lt;br /&gt;
	up ip link set $IFACE up&lt;br /&gt;
	up brctl addif br0 $IFACE&lt;br /&gt;
	down brctl delif br0 $IFACE || true&lt;br /&gt;
	down ip link set $IFACE down&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That way, you create br0 with: ifup br0. You can add/remove&lt;br /&gt;
individual interfaces to the bridge with ifup eth0, ifdown eth0.&lt;br /&gt;
&lt;br /&gt;
== Bridging for a Xen dom0 ==&lt;br /&gt;
Bridging in a dom0 is a bit specific as it consists in bridging a real interface (i.e. ethX) with a virtual interface (i.e. vifX.Y).&lt;br /&gt;
At bridge creation time, the virtual interface does not exist and will be added by the Xen toolstack when a domU is booting (see Xen documentation on how to link the virtual interface to the correct bridge).&lt;br /&gt;
&lt;br /&gt;
;Particulars :&lt;br /&gt;
- the bridge consists of a single physical interface &amp;lt;br/&amp;gt;&lt;br /&gt;
- the physical interface does not have an IP and is configured manually &amp;lt;br/&amp;gt;&lt;br /&gt;
- the bridge will have the IP address and will be auto, resulting in bringing up the physical interface &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This translates to a sample config :&lt;br /&gt;
&lt;br /&gt;
Example &#039;&#039;/etc/network/interfaces&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
auto eth0&lt;br /&gt;
iface eth0 inet manual&lt;br /&gt;
&lt;br /&gt;
auto br0&lt;br /&gt;
iface br0 inet static&lt;br /&gt;
	address 192.168.0.253&lt;br /&gt;
	netmask 255.255.255.0&lt;br /&gt;
	gateway 192.168.0.254&lt;br /&gt;
        bridge_ports eth0&lt;br /&gt;
        bridge_stp 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After the domU OS is started, the virtual interface wil be added and the working bridge can be checked with&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
brctl show&lt;br /&gt;
&lt;br /&gt;
ifconfig -a&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Bridging for KVM ==&lt;br /&gt;
&lt;br /&gt;
Example &#039;&#039;/etc/network/interfaces&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
{{Note|I personally remove the eth0 declaration without any issue.}}&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
auto br0&lt;br /&gt;
iface br0 inet dhcp&lt;br /&gt;
  bridge_ports eth0&lt;br /&gt;
  bridge_stp 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Little script to allow dhcp over iptables ===&lt;br /&gt;
{{Note|I tried the Using pre-up/post-down as mentionned in #3, but it didn&#039;t work well for me }}&lt;br /&gt;
{{Note|Usually it will be in /etc/rc.local as mentioned [https://wiki.libvirt.org/page/Networking#Debian.2FUbuntu_Bridging here] }}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Run local.d scripts on boot.&lt;br /&gt;
rc-update add local&lt;br /&gt;
&lt;br /&gt;
# Write the script.&lt;br /&gt;
cat &amp;gt;&amp;gt; /etc/local.d/iptables_dhcp_kvm.start &amp;lt;&amp;lt; EOM&lt;br /&gt;
echo 0 &amp;gt; /proc/sys/net/bridge/bridge-nf-call-arptables&lt;br /&gt;
echo 0 &amp;gt; /proc/sys/net/bridge/bridge-nf-call-iptables&lt;br /&gt;
echo 0 &amp;gt; /proc/sys/net/bridge/bridge-nf-call-ip6tables&lt;br /&gt;
iptables -A FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu&lt;br /&gt;
exit 0&lt;br /&gt;
EOM&lt;br /&gt;
&lt;br /&gt;
# local.d script must be executable.&lt;br /&gt;
chmod a+x /etc/local.d/iptables_dhcp_kvm.start&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Bridging for QEMU ==&lt;br /&gt;
&lt;br /&gt;
Replace &#039;&#039;/etc/network/interfaces&#039;&#039; with the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
auto lo&lt;br /&gt;
iface lo inet loopback&lt;br /&gt;
&lt;br /&gt;
auto br0&lt;br /&gt;
iface br0 inet dhcp&lt;br /&gt;
  bridge_ports eth0&lt;br /&gt;
  bridge_stp 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To enable DHCP and get QEMU to use the bridge we&#039;ve created above, run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Install the bridge tools&lt;br /&gt;
apk add bridge&lt;br /&gt;
&lt;br /&gt;
# Load kernel modules needed for KVM bridging.&lt;br /&gt;
printf &#039;tun\ntap\n&#039; &amp;gt;&amp;gt; /etc/modules&lt;br /&gt;
&lt;br /&gt;
# Allow Qemu to use our bridge.&lt;br /&gt;
echo &#039;allow br0&#039; &amp;gt; /etc/qemu/bridge.conf&lt;br /&gt;
&lt;br /&gt;
# Write some sysctl knobs to allow bridging to work.&lt;br /&gt;
printf &#039;# Enable bridge forwarding.&lt;br /&gt;
net.ipv4.conf.br0_bc_forwarding=1&lt;br /&gt;
# Ignore iptables on bridge interfaces.&lt;br /&gt;
net.bridge.bridge-nf-call-iptables=0&lt;br /&gt;
&#039; &amp;gt;&amp;gt; /etc/sysctl.d/bridging.conf&lt;br /&gt;
&lt;br /&gt;
# Apply sysctl config edits.&lt;br /&gt;
sysctl -p&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After a &#039;&#039;reboot&#039;&#039;, you can use the bridge like so (assuming you have a &#039;&#039;qcow2&#039;&#039; image named &#039;&#039;felix-pojtigners-theia.qcow2&#039;&#039;):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
qemu-system-x86_64 -m 4096 -accel kvm -net nic -net bridge,br=br0 -boot d -drive format=qcow2,file=felix-pojtingers-theia.qcow2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t get a DHCP response for the guest machine (assuming you have a DHCP server running on the physical network that &#039;&#039;eth0&#039;&#039; is connected to), you can debug with &#039;&#039;tshark&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tshark -i eth0  -Y &amp;quot;bootp.option.type == 53&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Winny</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Bridge&amp;diff=22228</id>
		<title>Bridge</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Bridge&amp;diff=22228"/>
		<updated>2022-08-15T17:37:23Z</updated>

		<summary type="html">&lt;p&gt;Winny: remove references to &amp;quot;older versions&amp;quot; of alpine.  2.4 is last released 2012, alpine project doesn&amp;#039;t support it, nor should we&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Networking]]&lt;br /&gt;
This document describes how to configure a [http://en.wikipedia.org/wiki/Bridging_%28networking%29 network bridge] interface in Alpine Linux.&lt;br /&gt;
&lt;br /&gt;
== Using brctl ==&lt;br /&gt;
Bridges are managed manually with the &#039;&#039;&#039;brctl&#039;&#039;&#039; command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage: brctl COMMAND [BRIDGE [INTERFACE]]&lt;br /&gt;
&lt;br /&gt;
Manage ethernet bridges&lt;br /&gt;
&lt;br /&gt;
Commands:&lt;br /&gt;
	show			Show a list of bridges&lt;br /&gt;
	addbr BRIDGE		Create BRIDGE&lt;br /&gt;
	delbr BRIDGE		Delete BRIDGE&lt;br /&gt;
	addif BRIDGE IFACE	Add IFACE to BRIDGE&lt;br /&gt;
	delif BRIDGE IFACE	Delete IFACE from BRIDGE&lt;br /&gt;
	setageing BRIDGE TIME		Set ageing time&lt;br /&gt;
	setfd BRIDGE TIME		Set bridge forward delay&lt;br /&gt;
	sethello BRIDGE TIME		Set hello time&lt;br /&gt;
	setmaxage BRIDGE TIME		Set max message age&lt;br /&gt;
	setpathcost BRIDGE COST		Set path cost&lt;br /&gt;
	setportprio BRIDGE PRIO		Set port priority&lt;br /&gt;
	setbridgeprio BRIDGE PRIO	Set bridge priority&lt;br /&gt;
	stp BRIDGE [1|0]		STP on/off&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To manually create bridge interface br0:&lt;br /&gt;
{{Cmd|brctl addbr br0}}&lt;br /&gt;
&lt;br /&gt;
To add interface eth0 and eth1 to br0:&lt;br /&gt;
{{Cmd|brctl addif br0 eth0&lt;br /&gt;
brctl addif br0 eth1}}&lt;br /&gt;
&lt;br /&gt;
Note: You need to set the link status to &#039;&#039;up&#039;&#039; on the added interfaces.&lt;br /&gt;
{{Cmd|ip link set dev eth0 up&lt;br /&gt;
ip link set dev eth1 up}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Networking]]&lt;br /&gt;
&lt;br /&gt;
== Configuration file ==&lt;br /&gt;
Install the scripts that configure the bridge.&lt;br /&gt;
{{Cmd|apk add bridge}}&lt;br /&gt;
&lt;br /&gt;
Bridging is then configured in &#039;&#039;/etc/network/interfaces&#039;&#039; with the &#039;&#039;bridge-ports&#039;&#039; keyword.&lt;br /&gt;
{{Warning|You normally don&#039;t assign ip addresses to the bridged interfaces (eth0 and eth1 in our example) but to the bridge itself (br0).}}&lt;br /&gt;
&lt;br /&gt;
In this example the address 192.168.0.1/24 is used.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
auto br0&lt;br /&gt;
iface br0 inet static&lt;br /&gt;
	bridge-ports eth0 eth1&lt;br /&gt;
	bridge-stp 0&lt;br /&gt;
	address 192.168.0.1&lt;br /&gt;
	netmask 255.255.255.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can set the various options with these keywords:&lt;br /&gt;
; bridge-ports&lt;br /&gt;
: Set bridge ports (ethX) or none for no physical interfaces&lt;br /&gt;
; bridge-aging&lt;br /&gt;
: Set ageing time&lt;br /&gt;
; bridge-fd&lt;br /&gt;
: Set bridge forward delay&lt;br /&gt;
; bridge-hello&lt;br /&gt;
: Set hello time&lt;br /&gt;
; bridge-maxage&lt;br /&gt;
: Set bridge max message age&lt;br /&gt;
; bridge-pathcost&lt;br /&gt;
: Set path cost&lt;br /&gt;
; bridge-portprio&lt;br /&gt;
: Set port priority&lt;br /&gt;
; bridge-bridgeprio&lt;br /&gt;
: Set bridge priority&lt;br /&gt;
; bridge-stp&lt;br /&gt;
: STP on/off&lt;br /&gt;
&lt;br /&gt;
== Using pre-up/post-down ==&lt;br /&gt;
If you want be able to control the bridge interfaces individually, you need to use pre-up/post-down hooks.&lt;br /&gt;
&lt;br /&gt;
Example &#039;&#039;/etc/network/interfaces&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
auto br0&lt;br /&gt;
iface br0 inet static&lt;br /&gt;
	pre-up brctl addbr br0&lt;br /&gt;
	pre-up echo 0 &amp;gt; /proc/sys/net/bridge/bridge-nf-call-arptables&lt;br /&gt;
	pre-up echo 0 &amp;gt; /proc/sys/net/bridge/bridge-nf-call-iptables&lt;br /&gt;
	pre-up echo 0 &amp;gt; /proc/sys/net/bridge/bridge-nf-call-ip6tables&lt;br /&gt;
	address 192.168.0.253&lt;br /&gt;
	netmask 255.255.255.0&lt;br /&gt;
	gateway 192.168.0.254&lt;br /&gt;
	post-down brctl delbr br0&lt;br /&gt;
	&lt;br /&gt;
auto eth0&lt;br /&gt;
iface eth0 inet manual&lt;br /&gt;
	up ip link set $IFACE up&lt;br /&gt;
	up brctl addif br0 $IFACE&lt;br /&gt;
	down brctl delif br0 $IFACE || true&lt;br /&gt;
	down ip link set $IFACE down&lt;br /&gt;
	&lt;br /&gt;
auto eth1&lt;br /&gt;
iface eth1 inet manual&lt;br /&gt;
	up ip link set $IFACE up&lt;br /&gt;
	up brctl addif br0 $IFACE&lt;br /&gt;
	down brctl delif br0 $IFACE || true&lt;br /&gt;
	down ip link set $IFACE down&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That way, you create br0 with: ifup br0. You can add/remove&lt;br /&gt;
individual interfaces to the bridge with ifup eth0, ifdown eth0.&lt;br /&gt;
&lt;br /&gt;
== Bridging for a Xen dom0 ==&lt;br /&gt;
Bridging in a dom0 is a bit specific as it consists in bridging a real interface (i.e. ethX) with a virtual interface (i.e. vifX.Y).&lt;br /&gt;
At bridge creation time, the virtual interface does not exist and will be added by the Xen toolstack when a domU is booting (see Xen documentation on how to link the virtual interface to the correct bridge).&lt;br /&gt;
&lt;br /&gt;
;Particulars :&lt;br /&gt;
- the bridge consists of a single physical interface &amp;lt;br/&amp;gt;&lt;br /&gt;
- the physical interface does not have an IP and is configured manually &amp;lt;br/&amp;gt;&lt;br /&gt;
- the bridge will have the IP address and will be auto, resulting in bringing up the physical interface &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This translates to a sample config :&lt;br /&gt;
&lt;br /&gt;
Example &#039;&#039;/etc/network/interfaces&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
auto eth0&lt;br /&gt;
iface eth0 inet manual&lt;br /&gt;
&lt;br /&gt;
auto br0&lt;br /&gt;
iface br0 inet static&lt;br /&gt;
	address 192.168.0.253&lt;br /&gt;
	netmask 255.255.255.0&lt;br /&gt;
	gateway 192.168.0.254&lt;br /&gt;
        bridge_ports eth0&lt;br /&gt;
        bridge_stp 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After the domU OS is started, the virtual interface wil be added and the working bridge can be checked with&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
brctl show&lt;br /&gt;
&lt;br /&gt;
ifconfig -a&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Bridging for KVM ==&lt;br /&gt;
&lt;br /&gt;
Example &#039;&#039;/etc/network/interfaces&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
{{Note|I personally remove the eth0 declaration without any issue.}}&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
auto br0&lt;br /&gt;
iface br0 inet dhcp&lt;br /&gt;
  bridge_ports eth0&lt;br /&gt;
  bridge_stp 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Little script to allow dhcp over iptables ===&lt;br /&gt;
{{Note|I tried the Using pre-up/post-down as mentionned in #3, but it didn&#039;t work well for me }}&lt;br /&gt;
{{Note|Usually it will be in /etc/rc.local as mentioned [https://wiki.libvirt.org/page/Networking#Debian.2FUbuntu_Bridging here] }}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rc-update add local&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat &amp;gt;&amp;gt; /etc/local.d/iptables_dhcp_kvm.start &amp;lt;&amp;lt; EOM&lt;br /&gt;
echo 0 &amp;gt; /proc/sys/net/bridge/bridge-nf-call-arptables&lt;br /&gt;
echo 0 &amp;gt; /proc/sys/net/bridge/bridge-nf-call-iptables&lt;br /&gt;
echo 0 &amp;gt; /proc/sys/net/bridge/bridge-nf-call-ip6tables&lt;br /&gt;
iptables -A FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu&lt;br /&gt;
exit 0&lt;br /&gt;
EOM&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat &amp;gt;&amp;gt; /etc/local.d/iptables_dhcp_kvm.stop &amp;lt;&amp;lt; EOM&lt;br /&gt;
exit 0&lt;br /&gt;
EOM&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
chmod +x /etc/local.d/iptables_dhcp_kvm.*&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Bridging for QEMU ==&lt;br /&gt;
&lt;br /&gt;
Replace &#039;&#039;/etc/network/interfaces&#039;&#039; with the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
auto lo&lt;br /&gt;
iface lo inet loopback&lt;br /&gt;
&lt;br /&gt;
auto br0&lt;br /&gt;
iface br0 inet dhcp&lt;br /&gt;
  bridge_ports eth0&lt;br /&gt;
  bridge_stp 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To enable DHCP and get QEMU to use the bridge we&#039;ve created above, run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Install the bridge tools&lt;br /&gt;
apk add bridge&lt;br /&gt;
&lt;br /&gt;
# Load kernel modules needed for KVM bridging.&lt;br /&gt;
printf &#039;tun\ntap\n&#039; &amp;gt;&amp;gt; /etc/modules&lt;br /&gt;
&lt;br /&gt;
# Allow Qemu to use our bridge.&lt;br /&gt;
echo &#039;allow br0&#039; &amp;gt; /etc/qemu/bridge.conf&lt;br /&gt;
&lt;br /&gt;
# Write some sysctl knobs to allow bridging to work.&lt;br /&gt;
printf &#039;# Enable bridge forwarding.&lt;br /&gt;
net.ipv4.conf.br0_bc_forwarding=1&lt;br /&gt;
# Ignore iptables on bridge interfaces.&lt;br /&gt;
net.bridge.bridge-nf-call-iptables=0&lt;br /&gt;
&#039; &amp;gt;&amp;gt; /etc/sysctl.d/bridging.conf&lt;br /&gt;
&lt;br /&gt;
# Apply sysctl config edits.&lt;br /&gt;
sysctl -p&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After a &#039;&#039;reboot&#039;&#039;, you can use the bridge like so (assuming you have a &#039;&#039;qcow2&#039;&#039; image named &#039;&#039;felix-pojtigners-theia.qcow2&#039;&#039;):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
qemu-system-x86_64 -m 4096 -accel kvm -net nic -net bridge,br=br0 -boot d -drive format=qcow2,file=felix-pojtingers-theia.qcow2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t get a DHCP response for the guest machine (assuming you have a DHCP server running on the physical network that &#039;&#039;eth0&#039;&#039; is connected to), you can debug with &#039;&#039;tshark&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tshark -i eth0  -Y &amp;quot;bootp.option.type == 53&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Winny</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Bridge&amp;diff=22227</id>
		<title>Bridge</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Bridge&amp;diff=22227"/>
		<updated>2022-08-15T17:35:19Z</updated>

		<summary type="html">&lt;p&gt;Winny: /* Configuration file */ make it more clean one should &amp;#039;&amp;#039;&amp;#039;not&amp;#039;&amp;#039;&amp;#039; set addresses on bridge members, only on the bridge itself&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Networking]]&lt;br /&gt;
This document describes how to configure a [http://en.wikipedia.org/wiki/Bridging_%28networking%29 network bridge] interface in Alpine Linux.&lt;br /&gt;
&lt;br /&gt;
== Using brctl ==&lt;br /&gt;
Bridges are managed manually with the &#039;&#039;&#039;brctl&#039;&#039;&#039; command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage: brctl COMMAND [BRIDGE [INTERFACE]]&lt;br /&gt;
&lt;br /&gt;
Manage ethernet bridges&lt;br /&gt;
&lt;br /&gt;
Commands:&lt;br /&gt;
	show			Show a list of bridges&lt;br /&gt;
	addbr BRIDGE		Create BRIDGE&lt;br /&gt;
	delbr BRIDGE		Delete BRIDGE&lt;br /&gt;
	addif BRIDGE IFACE	Add IFACE to BRIDGE&lt;br /&gt;
	delif BRIDGE IFACE	Delete IFACE from BRIDGE&lt;br /&gt;
	setageing BRIDGE TIME		Set ageing time&lt;br /&gt;
	setfd BRIDGE TIME		Set bridge forward delay&lt;br /&gt;
	sethello BRIDGE TIME		Set hello time&lt;br /&gt;
	setmaxage BRIDGE TIME		Set max message age&lt;br /&gt;
	setpathcost BRIDGE COST		Set path cost&lt;br /&gt;
	setportprio BRIDGE PRIO		Set port priority&lt;br /&gt;
	setbridgeprio BRIDGE PRIO	Set bridge priority&lt;br /&gt;
	stp BRIDGE [1|0]		STP on/off&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To manually create bridge interface br0:&lt;br /&gt;
{{Cmd|brctl addbr br0}}&lt;br /&gt;
&lt;br /&gt;
To add interface eth0 and eth1 to br0:&lt;br /&gt;
{{Cmd|brctl addif br0 eth0&lt;br /&gt;
brctl addif br0 eth1}}&lt;br /&gt;
&lt;br /&gt;
Note: You need to set the link status to &#039;&#039;up&#039;&#039; on the added interfaces.&lt;br /&gt;
{{Cmd|ip link set dev eth0 up&lt;br /&gt;
ip link set dev eth1 up}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Networking]]&lt;br /&gt;
&lt;br /&gt;
== Configuration file ==&lt;br /&gt;
{{Note|This requires Alpine Linux v2.4 or newer}}&lt;br /&gt;
Install the scripts that configure the bridge.&lt;br /&gt;
{{Cmd|apk add bridge}}&lt;br /&gt;
&lt;br /&gt;
Bridging is then configured in &#039;&#039;/etc/network/interfaces&#039;&#039; with the &#039;&#039;bridge-ports&#039;&#039; keyword.&lt;br /&gt;
{{Warning|You normally don&#039;t assign ip addresses to the bridged interfaces (eth0 and eth1 in our example) but to the bridge itself (br0).}}&lt;br /&gt;
&lt;br /&gt;
In this example the address 192.168.0.1/24 is used.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
auto br0&lt;br /&gt;
iface br0 inet static&lt;br /&gt;
	bridge-ports eth0 eth1&lt;br /&gt;
	bridge-stp 0&lt;br /&gt;
	address 192.168.0.1&lt;br /&gt;
	netmask 255.255.255.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can set the various options with these keywords:&lt;br /&gt;
; bridge-ports&lt;br /&gt;
: Set bridge ports (ethX) or none for no physical interfaces&lt;br /&gt;
; bridge-aging&lt;br /&gt;
: Set ageing time&lt;br /&gt;
; bridge-fd&lt;br /&gt;
: Set bridge forward delay&lt;br /&gt;
; bridge-hello&lt;br /&gt;
: Set hello time&lt;br /&gt;
; bridge-maxage&lt;br /&gt;
: Set bridge max message age&lt;br /&gt;
; bridge-pathcost&lt;br /&gt;
: Set path cost&lt;br /&gt;
; bridge-portprio&lt;br /&gt;
: Set port priority&lt;br /&gt;
; bridge-bridgeprio&lt;br /&gt;
: Set bridge priority&lt;br /&gt;
; bridge-stp&lt;br /&gt;
: STP on/off&lt;br /&gt;
&lt;br /&gt;
== Using pre-up/post-down ==&lt;br /&gt;
For older versions of Alpine Linux, or if you want be able to control the bridge interfaces individually, you need to use pre-up/post-down hooks.&lt;br /&gt;
&lt;br /&gt;
Example &#039;&#039;/etc/network/interfaces&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
auto br0&lt;br /&gt;
iface br0 inet static&lt;br /&gt;
	pre-up brctl addbr br0&lt;br /&gt;
	pre-up echo 0 &amp;gt; /proc/sys/net/bridge/bridge-nf-call-arptables&lt;br /&gt;
	pre-up echo 0 &amp;gt; /proc/sys/net/bridge/bridge-nf-call-iptables&lt;br /&gt;
	pre-up echo 0 &amp;gt; /proc/sys/net/bridge/bridge-nf-call-ip6tables&lt;br /&gt;
	address 192.168.0.253&lt;br /&gt;
	netmask 255.255.255.0&lt;br /&gt;
	gateway 192.168.0.254&lt;br /&gt;
	post-down brctl delbr br0&lt;br /&gt;
	&lt;br /&gt;
auto eth0&lt;br /&gt;
iface eth0 inet manual&lt;br /&gt;
	up ip link set $IFACE up&lt;br /&gt;
	up brctl addif br0 $IFACE&lt;br /&gt;
	down brctl delif br0 $IFACE || true&lt;br /&gt;
	down ip link set $IFACE down&lt;br /&gt;
	&lt;br /&gt;
auto eth1&lt;br /&gt;
iface eth1 inet manual&lt;br /&gt;
	up ip link set $IFACE up&lt;br /&gt;
	up brctl addif br0 $IFACE&lt;br /&gt;
	down brctl delif br0 $IFACE || true&lt;br /&gt;
	down ip link set $IFACE down&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That way, you create br0 with: ifup br0. You can add/remove&lt;br /&gt;
individual interfaces to the bridge with ifup eth0, ifdown eth0.&lt;br /&gt;
&lt;br /&gt;
== Bridging for a Xen dom0 ==&lt;br /&gt;
Bridging in a dom0 is a bit specific as it consists in bridging a real interface (i.e. ethX) with a virtual interface (i.e. vifX.Y).&lt;br /&gt;
At bridge creation time, the virtual interface does not exist and will be added by the Xen toolstack when a domU is booting (see Xen documentation on how to link the virtual interface to the correct bridge).&lt;br /&gt;
&lt;br /&gt;
;Particulars :&lt;br /&gt;
- the bridge consists of a single physical interface &amp;lt;br/&amp;gt;&lt;br /&gt;
- the physical interface does not have an IP and is configured manually &amp;lt;br/&amp;gt;&lt;br /&gt;
- the bridge will have the IP address and will be auto, resulting in bringing up the physical interface &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This translates to a sample config :&lt;br /&gt;
&lt;br /&gt;
Example &#039;&#039;/etc/network/interfaces&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
auto eth0&lt;br /&gt;
iface eth0 inet manual&lt;br /&gt;
&lt;br /&gt;
auto br0&lt;br /&gt;
iface br0 inet static&lt;br /&gt;
	address 192.168.0.253&lt;br /&gt;
	netmask 255.255.255.0&lt;br /&gt;
	gateway 192.168.0.254&lt;br /&gt;
        bridge_ports eth0&lt;br /&gt;
        bridge_stp 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After the domU OS is started, the virtual interface wil be added and the working bridge can be checked with&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
brctl show&lt;br /&gt;
&lt;br /&gt;
ifconfig -a&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Bridging for KVM ==&lt;br /&gt;
&lt;br /&gt;
Example &#039;&#039;/etc/network/interfaces&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
{{Note|I personally remove the eth0 declaration without any issue.}}&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
auto br0&lt;br /&gt;
iface br0 inet dhcp&lt;br /&gt;
  bridge_ports eth0&lt;br /&gt;
  bridge_stp 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Little script to allow dhcp over iptables ===&lt;br /&gt;
{{Note|I tried the Using pre-up/post-down as mentionned in #3, but it didn&#039;t work well for me }}&lt;br /&gt;
{{Note|Usually it will be in /etc/rc.local as mentioned [https://wiki.libvirt.org/page/Networking#Debian.2FUbuntu_Bridging here] }}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rc-update add local&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat &amp;gt;&amp;gt; /etc/local.d/iptables_dhcp_kvm.start &amp;lt;&amp;lt; EOM&lt;br /&gt;
echo 0 &amp;gt; /proc/sys/net/bridge/bridge-nf-call-arptables&lt;br /&gt;
echo 0 &amp;gt; /proc/sys/net/bridge/bridge-nf-call-iptables&lt;br /&gt;
echo 0 &amp;gt; /proc/sys/net/bridge/bridge-nf-call-ip6tables&lt;br /&gt;
iptables -A FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu&lt;br /&gt;
exit 0&lt;br /&gt;
EOM&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat &amp;gt;&amp;gt; /etc/local.d/iptables_dhcp_kvm.stop &amp;lt;&amp;lt; EOM&lt;br /&gt;
exit 0&lt;br /&gt;
EOM&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
chmod +x /etc/local.d/iptables_dhcp_kvm.*&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Bridging for QEMU ==&lt;br /&gt;
&lt;br /&gt;
Replace &#039;&#039;/etc/network/interfaces&#039;&#039; with the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
auto lo&lt;br /&gt;
iface lo inet loopback&lt;br /&gt;
&lt;br /&gt;
auto br0&lt;br /&gt;
iface br0 inet dhcp&lt;br /&gt;
  bridge_ports eth0&lt;br /&gt;
  bridge_stp 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To enable DHCP and get QEMU to use the bridge we&#039;ve created above, run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Install the bridge tools&lt;br /&gt;
apk add bridge&lt;br /&gt;
&lt;br /&gt;
# Load kernel modules needed for KVM bridging.&lt;br /&gt;
printf &#039;tun\ntap\n&#039; &amp;gt;&amp;gt; /etc/modules&lt;br /&gt;
&lt;br /&gt;
# Allow Qemu to use our bridge.&lt;br /&gt;
echo &#039;allow br0&#039; &amp;gt; /etc/qemu/bridge.conf&lt;br /&gt;
&lt;br /&gt;
# Write some sysctl knobs to allow bridging to work.&lt;br /&gt;
printf &#039;# Enable bridge forwarding.&lt;br /&gt;
net.ipv4.conf.br0_bc_forwarding=1&lt;br /&gt;
# Ignore iptables on bridge interfaces.&lt;br /&gt;
net.bridge.bridge-nf-call-iptables=0&lt;br /&gt;
&#039; &amp;gt;&amp;gt; /etc/sysctl.d/bridging.conf&lt;br /&gt;
&lt;br /&gt;
# Apply sysctl config edits.&lt;br /&gt;
sysctl -p&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After a &#039;&#039;reboot&#039;&#039;, you can use the bridge like so (assuming you have a &#039;&#039;qcow2&#039;&#039; image named &#039;&#039;felix-pojtigners-theia.qcow2&#039;&#039;):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
qemu-system-x86_64 -m 4096 -accel kvm -net nic -net bridge,br=br0 -boot d -drive format=qcow2,file=felix-pojtingers-theia.qcow2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t get a DHCP response for the guest machine (assuming you have a DHCP server running on the physical network that &#039;&#039;eth0&#039;&#039; is connected to), you can debug with &#039;&#039;tshark&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tshark -i eth0  -Y &amp;quot;bootp.option.type == 53&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Winny</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Bridge&amp;diff=22226</id>
		<title>Bridge</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Bridge&amp;diff=22226"/>
		<updated>2022-08-15T17:31:43Z</updated>

		<summary type="html">&lt;p&gt;Winny: /* Bridging for QEMU */ fixup the shell script for readability + save the iptables sysctl knob&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Networking]]&lt;br /&gt;
This document describes how to configure a [http://en.wikipedia.org/wiki/Bridging_%28networking%29 network bridge] interface in Alpine Linux.&lt;br /&gt;
&lt;br /&gt;
== Using brctl ==&lt;br /&gt;
Bridges are managed manually with the &#039;&#039;&#039;brctl&#039;&#039;&#039; command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage: brctl COMMAND [BRIDGE [INTERFACE]]&lt;br /&gt;
&lt;br /&gt;
Manage ethernet bridges&lt;br /&gt;
&lt;br /&gt;
Commands:&lt;br /&gt;
	show			Show a list of bridges&lt;br /&gt;
	addbr BRIDGE		Create BRIDGE&lt;br /&gt;
	delbr BRIDGE		Delete BRIDGE&lt;br /&gt;
	addif BRIDGE IFACE	Add IFACE to BRIDGE&lt;br /&gt;
	delif BRIDGE IFACE	Delete IFACE from BRIDGE&lt;br /&gt;
	setageing BRIDGE TIME		Set ageing time&lt;br /&gt;
	setfd BRIDGE TIME		Set bridge forward delay&lt;br /&gt;
	sethello BRIDGE TIME		Set hello time&lt;br /&gt;
	setmaxage BRIDGE TIME		Set max message age&lt;br /&gt;
	setpathcost BRIDGE COST		Set path cost&lt;br /&gt;
	setportprio BRIDGE PRIO		Set port priority&lt;br /&gt;
	setbridgeprio BRIDGE PRIO	Set bridge priority&lt;br /&gt;
	stp BRIDGE [1|0]		STP on/off&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To manually create bridge interface br0:&lt;br /&gt;
{{Cmd|brctl addbr br0}}&lt;br /&gt;
&lt;br /&gt;
To add interface eth0 and eth1 to br0:&lt;br /&gt;
{{Cmd|brctl addif br0 eth0&lt;br /&gt;
brctl addif br0 eth1}}&lt;br /&gt;
&lt;br /&gt;
Note: You need to set the link status to &#039;&#039;up&#039;&#039; on the added interfaces.&lt;br /&gt;
{{Cmd|ip link set dev eth0 up&lt;br /&gt;
ip link set dev eth1 up}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Networking]]&lt;br /&gt;
&lt;br /&gt;
== Configuration file ==&lt;br /&gt;
{{Note|This requires Alpine Linux v2.4 or newer}}&lt;br /&gt;
Install the scripts that configure the bridge.&lt;br /&gt;
{{Cmd|apk add bridge}}&lt;br /&gt;
&lt;br /&gt;
Bridging is then configured in &#039;&#039;/etc/network/interfaces&#039;&#039; with the &#039;&#039;bridge-ports&#039;&#039; keyword.&lt;br /&gt;
Note: You normally don&#039;t assign ip addresses to the bridged interfaces (eth0 and eth1 in our example) but to the bridge itself (br0).&lt;br /&gt;
&lt;br /&gt;
In this example the address 192.168.0.1/24 is used.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
auto br0&lt;br /&gt;
iface br0 inet static&lt;br /&gt;
	bridge-ports eth0 eth1&lt;br /&gt;
	bridge-stp 0&lt;br /&gt;
	address 192.168.0.1&lt;br /&gt;
	netmask 255.255.255.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can set the various options with these keywords:&lt;br /&gt;
; bridge-ports&lt;br /&gt;
: Set bridge ports (ethX) or none for no physical interfaces&lt;br /&gt;
; bridge-aging&lt;br /&gt;
: Set ageing time&lt;br /&gt;
; bridge-fd&lt;br /&gt;
: Set bridge forward delay&lt;br /&gt;
; bridge-hello&lt;br /&gt;
: Set hello time&lt;br /&gt;
; bridge-maxage&lt;br /&gt;
: Set bridge max message age&lt;br /&gt;
; bridge-pathcost&lt;br /&gt;
: Set path cost&lt;br /&gt;
; bridge-portprio&lt;br /&gt;
: Set port priority&lt;br /&gt;
; bridge-bridgeprio&lt;br /&gt;
: Set bridge priority&lt;br /&gt;
; bridge-stp&lt;br /&gt;
: STP on/off&lt;br /&gt;
&lt;br /&gt;
== Using pre-up/post-down ==&lt;br /&gt;
For older versions of Alpine Linux, or if you want be able to control the bridge interfaces individually, you need to use pre-up/post-down hooks.&lt;br /&gt;
&lt;br /&gt;
Example &#039;&#039;/etc/network/interfaces&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
auto br0&lt;br /&gt;
iface br0 inet static&lt;br /&gt;
	pre-up brctl addbr br0&lt;br /&gt;
	pre-up echo 0 &amp;gt; /proc/sys/net/bridge/bridge-nf-call-arptables&lt;br /&gt;
	pre-up echo 0 &amp;gt; /proc/sys/net/bridge/bridge-nf-call-iptables&lt;br /&gt;
	pre-up echo 0 &amp;gt; /proc/sys/net/bridge/bridge-nf-call-ip6tables&lt;br /&gt;
	address 192.168.0.253&lt;br /&gt;
	netmask 255.255.255.0&lt;br /&gt;
	gateway 192.168.0.254&lt;br /&gt;
	post-down brctl delbr br0&lt;br /&gt;
	&lt;br /&gt;
auto eth0&lt;br /&gt;
iface eth0 inet manual&lt;br /&gt;
	up ip link set $IFACE up&lt;br /&gt;
	up brctl addif br0 $IFACE&lt;br /&gt;
	down brctl delif br0 $IFACE || true&lt;br /&gt;
	down ip link set $IFACE down&lt;br /&gt;
	&lt;br /&gt;
auto eth1&lt;br /&gt;
iface eth1 inet manual&lt;br /&gt;
	up ip link set $IFACE up&lt;br /&gt;
	up brctl addif br0 $IFACE&lt;br /&gt;
	down brctl delif br0 $IFACE || true&lt;br /&gt;
	down ip link set $IFACE down&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That way, you create br0 with: ifup br0. You can add/remove&lt;br /&gt;
individual interfaces to the bridge with ifup eth0, ifdown eth0.&lt;br /&gt;
&lt;br /&gt;
== Bridging for a Xen dom0 ==&lt;br /&gt;
Bridging in a dom0 is a bit specific as it consists in bridging a real interface (i.e. ethX) with a virtual interface (i.e. vifX.Y).&lt;br /&gt;
At bridge creation time, the virtual interface does not exist and will be added by the Xen toolstack when a domU is booting (see Xen documentation on how to link the virtual interface to the correct bridge).&lt;br /&gt;
&lt;br /&gt;
;Particulars :&lt;br /&gt;
- the bridge consists of a single physical interface &amp;lt;br/&amp;gt;&lt;br /&gt;
- the physical interface does not have an IP and is configured manually &amp;lt;br/&amp;gt;&lt;br /&gt;
- the bridge will have the IP address and will be auto, resulting in bringing up the physical interface &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This translates to a sample config :&lt;br /&gt;
&lt;br /&gt;
Example &#039;&#039;/etc/network/interfaces&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
auto eth0&lt;br /&gt;
iface eth0 inet manual&lt;br /&gt;
&lt;br /&gt;
auto br0&lt;br /&gt;
iface br0 inet static&lt;br /&gt;
	address 192.168.0.253&lt;br /&gt;
	netmask 255.255.255.0&lt;br /&gt;
	gateway 192.168.0.254&lt;br /&gt;
        bridge_ports eth0&lt;br /&gt;
        bridge_stp 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After the domU OS is started, the virtual interface wil be added and the working bridge can be checked with&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
brctl show&lt;br /&gt;
&lt;br /&gt;
ifconfig -a&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Bridging for KVM ==&lt;br /&gt;
&lt;br /&gt;
Example &#039;&#039;/etc/network/interfaces&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
{{Note|I personally remove the eth0 declaration without any issue.}}&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
auto br0&lt;br /&gt;
iface br0 inet dhcp&lt;br /&gt;
  bridge_ports eth0&lt;br /&gt;
  bridge_stp 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Little script to allow dhcp over iptables ===&lt;br /&gt;
{{Note|I tried the Using pre-up/post-down as mentionned in #3, but it didn&#039;t work well for me }}&lt;br /&gt;
{{Note|Usually it will be in /etc/rc.local as mentioned [https://wiki.libvirt.org/page/Networking#Debian.2FUbuntu_Bridging here] }}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rc-update add local&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat &amp;gt;&amp;gt; /etc/local.d/iptables_dhcp_kvm.start &amp;lt;&amp;lt; EOM&lt;br /&gt;
echo 0 &amp;gt; /proc/sys/net/bridge/bridge-nf-call-arptables&lt;br /&gt;
echo 0 &amp;gt; /proc/sys/net/bridge/bridge-nf-call-iptables&lt;br /&gt;
echo 0 &amp;gt; /proc/sys/net/bridge/bridge-nf-call-ip6tables&lt;br /&gt;
iptables -A FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu&lt;br /&gt;
exit 0&lt;br /&gt;
EOM&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat &amp;gt;&amp;gt; /etc/local.d/iptables_dhcp_kvm.stop &amp;lt;&amp;lt; EOM&lt;br /&gt;
exit 0&lt;br /&gt;
EOM&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
chmod +x /etc/local.d/iptables_dhcp_kvm.*&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Bridging for QEMU ==&lt;br /&gt;
&lt;br /&gt;
Replace &#039;&#039;/etc/network/interfaces&#039;&#039; with the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
auto lo&lt;br /&gt;
iface lo inet loopback&lt;br /&gt;
&lt;br /&gt;
auto br0&lt;br /&gt;
iface br0 inet dhcp&lt;br /&gt;
  bridge_ports eth0&lt;br /&gt;
  bridge_stp 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To enable DHCP and get QEMU to use the bridge we&#039;ve created above, run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Install the bridge tools&lt;br /&gt;
apk add bridge&lt;br /&gt;
&lt;br /&gt;
# Load kernel modules needed for KVM bridging.&lt;br /&gt;
printf &#039;tun\ntap\n&#039; &amp;gt;&amp;gt; /etc/modules&lt;br /&gt;
&lt;br /&gt;
# Allow Qemu to use our bridge.&lt;br /&gt;
echo &#039;allow br0&#039; &amp;gt; /etc/qemu/bridge.conf&lt;br /&gt;
&lt;br /&gt;
# Write some sysctl knobs to allow bridging to work.&lt;br /&gt;
printf &#039;# Enable bridge forwarding.&lt;br /&gt;
net.ipv4.conf.br0_bc_forwarding=1&lt;br /&gt;
# Ignore iptables on bridge interfaces.&lt;br /&gt;
net.bridge.bridge-nf-call-iptables=0&lt;br /&gt;
&#039; &amp;gt;&amp;gt; /etc/sysctl.d/bridging.conf&lt;br /&gt;
&lt;br /&gt;
# Apply sysctl config edits.&lt;br /&gt;
sysctl -p&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After a &#039;&#039;reboot&#039;&#039;, you can use the bridge like so (assuming you have a &#039;&#039;qcow2&#039;&#039; image named &#039;&#039;felix-pojtigners-theia.qcow2&#039;&#039;):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
qemu-system-x86_64 -m 4096 -accel kvm -net nic -net bridge,br=br0 -boot d -drive format=qcow2,file=felix-pojtingers-theia.qcow2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t get a DHCP response for the guest machine (assuming you have a DHCP server running on the physical network that &#039;&#039;eth0&#039;&#039; is connected to), you can debug with &#039;&#039;tshark&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tshark -i eth0  -Y &amp;quot;bootp.option.type == 53&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Winny</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=KVM&amp;diff=22225</id>
		<title>KVM</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=KVM&amp;diff=22225"/>
		<updated>2022-08-15T17:23:49Z</updated>

		<summary type="html">&lt;p&gt;Winny: make external links to alpinewiki internal  (See also Help:Editing)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[https://www.linux-kvm.org/page/Main_Page KVM] is an free and open source virtualization solution in a kernel module. Although it is often simply referred to as KVM, the actual hypervisor is [https://www.qemu.org QEMU]. QEMU runs from user-space, but can integrate with KVM, providing better performance by leveraging the hardware from kernel-space. QEMU can virtualize x86, PowerPC, and S390 guests, amongst others. [https://libvirt.org Libvirt] is a management framework that integrates with QEMU/KVM, [[LXC]], [[Xen_Dom0|Xen]] and others.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
The following commands provide &#039;&#039;&#039;libvirt&#039;&#039;&#039; as well as &#039;&#039;&#039;QEMU with emulation for x86_64&#039;&#039;&#039; and &#039;&#039;&#039;qemu-img&#039;&#039;&#039;, a necessary component for using various disk formats such as qcow2. Without qemu-img, only raw disks are available. It can also convert images between several formats like vhdx and vmdk. It also provides the metapackage &#039;&#039;&#039;qemu-modules&#039;&#039;&#039;, which provides subpackages needed for special features. In versions of Alpine before 3.13.0 these features were covered by &#039;&#039;&#039;QEMU with emulation for x86_64&#039;&#039;&#039;.&lt;br /&gt;
{{Cmd|&amp;lt;nowiki&amp;gt;# apk add libvirt-daemon qemu-img qemu-system-x86_64 qemu-modules openrc&lt;br /&gt;
# rc-update add libvirtd&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
== Networking ==&lt;br /&gt;
By default, libvirt uses NAT for VM connectivity. If you want to use the default configuration, you need to load the tun module.&lt;br /&gt;
{{Cmd|# modprobe tun}}&lt;br /&gt;
{{Cmd|add tun to autostart: # echo &amp;quot;tun&amp;quot; &amp;gt;&amp;gt; /etc/modules-load.d/tun.conf}}&lt;br /&gt;
&lt;br /&gt;
To make the tun module load on boot, use this command:&lt;br /&gt;
{{Cmd|# cat /etc/modules {{!}} grep tun {{!}}{{!}} echo tun &amp;gt;&amp;gt; /etc/modules}}&lt;br /&gt;
&lt;br /&gt;
If you prefer bridging a guest over your Ethernet interface, you need to make a [[Bridge#Configuration_file|bridge]].&lt;br /&gt;
&lt;br /&gt;
It&#039;s quite common to use bridges with KVM environments. But when IPv6 is used, Alpine will assign itself a link-local address as well as an SLAAC address in case there&#039;s a router sending Router Advertisements. You don&#039;t want this because you don&#039;t want to have the KVM host an IP address in every network it serves to guests. Unfortunately IPv6 can not just be disabled for the bridge via a sysctl configuration file, because the bridge might not be up when the sysctl config is applied during boot. What works is to put a post-up hook into the /etc/network/interfaces file like this:&lt;br /&gt;
 auto brlan&lt;br /&gt;
 iface brlan inet manual&lt;br /&gt;
        bridge-ports eth1.5&lt;br /&gt;
        bridge-stp 0&lt;br /&gt;
        post-up ip -6 a flush dev brlan; sysctl -w net.ipv6.conf.brlan.disable_ipv6=1&lt;br /&gt;
&lt;br /&gt;
== Management ==&lt;br /&gt;
For non-root management, you will need to add your user to the libvirt group.&lt;br /&gt;
{{Cmd|# addgroup user libvirt}}&lt;br /&gt;
&lt;br /&gt;
You can use libvirt&#039;s virsh at the CLI. It can execute commands as well as run as an interactive shell. Read its manual page and/or use the &amp;quot;help&amp;quot; command for more info. Some basic commands are:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|&amp;lt;nowiki&amp;gt;virsh help&lt;br /&gt;
virsh list --all&lt;br /&gt;
virsh start $domain&lt;br /&gt;
virsh shutdown $domain&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The libvirt project provides a GUI for managing hosts, called virt-manager. It handles local systems as well as remote ones via SSH.&lt;br /&gt;
{{Cmd|&amp;lt;nowiki&amp;gt;# apk add dbus polkit virt-manager terminus-font&lt;br /&gt;
# rc-update add dbus&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
In order to use libvirtd to remotely control KVM over ssh PolicyKit needs a .pkla informing it that this is allowed.&lt;br /&gt;
Write the following file to /etc/polkit-1/localauthority/50-local.d/50-libvirt-ssh-remote-access-policy.pkla&lt;br /&gt;
{{Cmd|&amp;lt;nowiki&amp;gt;[Remote libvirt SSH access]&lt;br /&gt;
 Identity=unix-group:libvirt&lt;br /&gt;
 Action=org.libvirt.unix.manage&lt;br /&gt;
 ResultAny=yes&lt;br /&gt;
 ResultInactive=yes&lt;br /&gt;
 ResultActive=yes&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Guest lifecycle management ==&lt;br /&gt;
The libvirt-guests service (available from Alpine 3.13.5) allows running guests to be automatically suspended or shut down when the host is shut down or rebooted.&lt;br /&gt;
&lt;br /&gt;
The service is configured in /etc/conf.d/libvirt-guests. Enable the service with {{Cmd|# rc-update add libvirt-guests}}&lt;br /&gt;
&lt;br /&gt;
== vfio ==&lt;br /&gt;
&lt;br /&gt;
VFIO is more flexible way to do PCI passthrough. Let&#039;s suppose you want to use following ethernet card as PCI device in a VM.&lt;br /&gt;
&lt;br /&gt;
 # lspci | grep 02:00.0&lt;br /&gt;
 02:00.0 Ethernet controller: Intel Corporation 82576 Gigabit Network Connection (rev 01)&lt;br /&gt;
 # lspci -n -s 02:00.0&lt;br /&gt;
 02:00.0 0200: 8086:10c9 (rev 01)&lt;br /&gt;
&lt;br /&gt;
First, create &#039;&#039;/etc/mkinitfs/features.d/vfio.modules&#039;&#039; with the following content, so mkinitfs includes the VFIO modules in the initramfs.&lt;br /&gt;
&lt;br /&gt;
 kernel/drivers/vfio/vfio.ko.*&lt;br /&gt;
 kernel/drivers/vfio/vfio_virqfd.ko.*&lt;br /&gt;
 kernel/drivers/vfio/vfio_iommu_type1.ko.*&lt;br /&gt;
 kernel/drivers/vfio/pci/vfio-pci.ko.*&lt;br /&gt;
&lt;br /&gt;
Add &#039;&#039;vfio&#039;&#039; the the list of features in &#039;&#039;/etc/mkinitfs/mkinitfs.conf&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Modify following file to instruct &#039;&#039;mkinitfs&#039;&#039; to load following module with the options and rebuild kernel ramdisk.&lt;br /&gt;
&lt;br /&gt;
 # cat /etc/modprobe.d/vfio.conf &amp;lt;&amp;lt;EOF&lt;br /&gt;
 options vfio-pci ids=8086:10c9&lt;br /&gt;
 options vfio_iommu_type1 allow_unsafe_interrupts=1&lt;br /&gt;
 softdep igb pre: vfio-pci&lt;br /&gt;
 EOF&lt;br /&gt;
 # mkinitfs&lt;br /&gt;
&lt;br /&gt;
Now we need to edit the &amp;quot;default_kernel_opts&amp;quot; and &amp;quot;modules&amp;quot; sections in the update-extlinux.conf file. Edit the &amp;quot;default_kernel_opts&amp;quot; to include &#039;&#039;intel_iommu=o iommu=pt&#039;&#039; for Intel platform (AMD uses &#039;&#039;amd_iommu=on&#039;&#039;), and add the VFIO modules to the &amp;quot;modules&amp;quot; section.&lt;br /&gt;
&lt;br /&gt;
  # grep &#039;^default_kernel_opts\|^modules&#039; /etc/update-extlinux.conf&lt;br /&gt;
  default_kernel_opts=&amp;quot;quiet rootfstype=ext4 intel_iommu=on iommu=pt&amp;quot;&lt;br /&gt;
  modules=sd-mod,usb-storage,ext4,raid1,vfio,vfio-pci,vfio_iommu_type1,vfio_virqfd&lt;br /&gt;
&lt;br /&gt;
For syslinux/extlinux, run:&lt;br /&gt;
&lt;br /&gt;
  # update-extlinux&lt;br /&gt;
&lt;br /&gt;
For GRUB (which [https://git.alpinelinux.org/aports/tree/main/grub/alpine-mkconfig.patch#n9 now also uses] the update-extlinux.conf if present), run:&lt;br /&gt;
&lt;br /&gt;
  # grub-mkconfig -o /boot/grub/grub.cfg&lt;br /&gt;
&lt;br /&gt;
Reboot and check dmesg.&lt;br /&gt;
&lt;br /&gt;
 # grep -i -e DMAR -e IOMMU /var/log/dmesg&lt;br /&gt;
 [    0.343795] DMAR: Host address width 36&lt;br /&gt;
 [    0.343797] DMAR: DRHD base: 0x000000fed90000 flags: 0x1&lt;br /&gt;
 [    0.343804] DMAR: dmar0: reg_base_addr fed90000 ver 1:0 cap c90780106f0462 ecap f020e3&lt;br /&gt;
 [    0.343806] DMAR: RMRR base: 0x000000000ed000 end: 0x000000000effff&lt;br /&gt;
 [    0.343807] DMAR: RMRR base: 0x000000bf7ed000 end: 0x000000bf7fffff&lt;br /&gt;
 [    0.553830] iommu: Default domain type: Passthrough (set via kernel command line)&lt;br /&gt;
 [    0.902477] DMAR: No ATSR found&lt;br /&gt;
 [    0.902563] DMAR: dmar0: Using Queued invalidation&lt;br /&gt;
 ...&lt;br /&gt;
 [    0.903256] pci 0000:02:00.0: Adding to iommu group 12&lt;br /&gt;
 ...&lt;br /&gt;
 [    0.903768] DMAR: Intel(R) Virtualization Technology for Directed I/O&lt;br /&gt;
&lt;br /&gt;
If you do not run libvirt VMs under &#039;&#039;root&#039;&#039; (&#039;&#039;egrep &#039;^#*user&#039; /etc/libvirt/qemu.conf&#039;&#039;), then you must have correct permission on &#039;&#039;/dev/vfio/&amp;lt;iommu_group&amp;gt;&#039;&#039;, eg. &#039;&#039;/dev/vfio/12&#039;&#039;. You have to tune &#039;&#039;/etc/mdev.conf&#039;&#039; or UDEV rules. Also note that if there are multiple PCI devices in the same iommu group, you always have to add all of them to the VM otherwise you&#039;ll get an error message like &amp;quot;Please ensure all devices within the iommu_group are bound to their vfio bus driver&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 # virsh dumpxml vm01 | xmllint --xpath &#039;//*/hostdev&#039; -&lt;br /&gt;
 &amp;lt;hostdev mode=&amp;quot;subsystem&amp;quot; type=&amp;quot;pci&amp;quot; managed=&amp;quot;yes&amp;quot;&amp;gt;&lt;br /&gt;
       &amp;lt;driver name=&amp;quot;vfio&amp;quot;/&amp;gt;&lt;br /&gt;
       &amp;lt;source&amp;gt;&lt;br /&gt;
         &amp;lt;address domain=&amp;quot;0x0000&amp;quot; bus=&amp;quot;0x02&amp;quot; slot=&amp;quot;0x00&amp;quot; function=&amp;quot;0x0&amp;quot;/&amp;gt;&lt;br /&gt;
       &amp;lt;/source&amp;gt;&lt;br /&gt;
       &amp;lt;alias name=&amp;quot;hostdev0&amp;quot;/&amp;gt;&lt;br /&gt;
       &amp;lt;address type=&amp;quot;pci&amp;quot; domain=&amp;quot;0x0000&amp;quot; bus=&amp;quot;0x00&amp;quot; slot=&amp;quot;0x06&amp;quot; function=&amp;quot;0x0&amp;quot;/&amp;gt;&lt;br /&gt;
     &amp;lt;/hostdev&amp;gt;&lt;br /&gt;
 &amp;lt;hostdev mode=&amp;quot;subsystem&amp;quot; type=&amp;quot;pci&amp;quot; managed=&amp;quot;yes&amp;quot;&amp;gt;&lt;br /&gt;
       &amp;lt;driver name=&amp;quot;vfio&amp;quot;/&amp;gt;&lt;br /&gt;
       &amp;lt;source&amp;gt;&lt;br /&gt;
         &amp;lt;address domain=&amp;quot;0x0000&amp;quot; bus=&amp;quot;0x02&amp;quot; slot=&amp;quot;0x00&amp;quot; function=&amp;quot;0x1&amp;quot;/&amp;gt;&lt;br /&gt;
       &amp;lt;/source&amp;gt;&lt;br /&gt;
       &amp;lt;alias name=&amp;quot;hostdev1&amp;quot;/&amp;gt;&lt;br /&gt;
       &amp;lt;address type=&amp;quot;pci&amp;quot; domain=&amp;quot;0x0000&amp;quot; bus=&amp;quot;0x00&amp;quot; slot=&amp;quot;0x08&amp;quot; function=&amp;quot;0x0&amp;quot;/&amp;gt;&lt;br /&gt;
     &amp;lt;/hostdev&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you directly use QEMU without libvirt and are trying to pass a GPU to your VM, you may get a &amp;quot;VFIO_MAP_DMA failed: Out of memory&amp;quot; error, when starting the VM as a non-root user. One way to fix it is to install the  &#039;&#039;shadow&#039;&#039; package, and increase the amount of memory the user can lock via the  &#039;&#039;/etc/security/limits.conf&#039;&#039; file:&lt;br /&gt;
{{Cmd|&amp;lt;nowiki&amp;gt;# apk add shadow&lt;br /&gt;
# echo &amp;quot;youruser soft memlock RAMamount \&lt;br /&gt;
youruser hard memlock RAMamount&amp;quot; &amp;gt;&amp;gt; /etc/security/limits.conf&lt;br /&gt;
# reboot&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
Replace &amp;quot;youruser&amp;quot; with the user you wish to run the VM as, and &amp;quot;RAMamount&amp;quot; with how much RAM your VM will need (in KB). The exact amount may throw the same error in the end, so you probably want to increase this value by a few dozen MB (typically +40).&lt;br /&gt;
&lt;br /&gt;
A lot of info on the [https://wiki.archlinux.org/index.php/PCI_passthrough_via_OVMF Archwiki article for PCI passthrough via OVMF].&lt;br /&gt;
&lt;br /&gt;
[[Category:Virtualization]]&lt;/div&gt;</summary>
		<author><name>Winny</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Desktop_environments_and_Window_managers&amp;diff=21559</id>
		<title>Desktop environments and Window managers</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Desktop_environments_and_Window_managers&amp;diff=21559"/>
		<updated>2022-02-07T03:13:08Z</updated>

		<summary type="html">&lt;p&gt;Winny: Remind the user they should add their user to the appropriate groups&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC right}}&lt;br /&gt;
&lt;br /&gt;
{{Tip|Be sure to add your user to &amp;lt;code&amp;gt;input&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;video&amp;lt;/code&amp;gt; groups.}}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alpine Linux&#039;&#039;&#039; 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:&lt;br /&gt;
&lt;br /&gt;
== Desktop environments ==&lt;br /&gt;
&lt;br /&gt;
# [[Xfce]]&lt;br /&gt;
# [[LXQt]]&lt;br /&gt;
# [[KDE|KDE Plasma]]&lt;br /&gt;
# [[Gnome]]&lt;br /&gt;
# [[MATE]]&lt;br /&gt;
&lt;br /&gt;
==  [https://en.wikipedia.org/wiki/Stacking_window_manager Stacking (floating) window managers] ==&lt;br /&gt;
&lt;br /&gt;
* X11:&lt;br /&gt;
** [[Openbox]]&lt;br /&gt;
&lt;br /&gt;
* Wayland:&lt;br /&gt;
** [[Wayfire]]&lt;br /&gt;
&lt;br /&gt;
== [https://en.wikipedia.org/wiki/Tiling_window_manager Tiling (dynamic) window managers] ==&lt;br /&gt;
&lt;br /&gt;
* X11:&lt;br /&gt;
&lt;br /&gt;
** [[Dwm]]&lt;br /&gt;
&lt;br /&gt;
** [[AwesomeWM|Awesome Window Manager]]&lt;br /&gt;
&lt;br /&gt;
* Wayland:&lt;br /&gt;
&lt;br /&gt;
** [[ Sway ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[Installation]]&lt;br /&gt;
* [[Alpine newbie]]&lt;br /&gt;
* [[Post installation]]&lt;br /&gt;
* [[Fonts]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Desktop]]&lt;br /&gt;
[[Category:Newbie]]&lt;/div&gt;</summary>
		<author><name>Winny</name></author>
	</entry>
</feed>