1
0
This commit is contained in:
dtb 2022-04-21 02:07:37 -04:00
parent 91bf786dda
commit d95f67f80a

View File

@ -8,27 +8,29 @@
<META CONTENT="noindex" NAME="googlebot" /> <!-- FUCK GOOGLE --> <META CONTENT="noindex" NAME="googlebot" /> <!-- FUCK GOOGLE -->
<META CONTENT="interest-cohort=()" HTTP-EQUIV="Permissions-Policy" /> <!-- FUCK GOOGLE --> <META CONTENT="interest-cohort=()" HTTP-EQUIV="Permissions-Policy" /> <!-- FUCK GOOGLE -->
<META NAME="viewport" CONTENT="width=device-width, initial-scale=1" /> <META NAME="viewport" CONTENT="width=device-width, initial-scale=1" />
<TITLE>knowledge/alpine</TITLE> <TITLE>knowledge/linux</TITLE>
</HEAD> </HEAD>
<BODY> <BODY>
<P><A HREF="/">~ Return to the rest of the site</A></P> <P><A HREF="/">~ Return to the rest of the site</A></P>
<SCRIPT SRC="/js/cookies.js" TYPE="application/javascript"></SCRIPT> <SCRIPT SRC="/js/cookies.js" TYPE="application/javascript"></SCRIPT>
<SCRIPT SRC="/js/sheets.js" TYPE="application/javascript"></SCRIPT> <SCRIPT SRC="/js/sheets.js" TYPE="application/javascript"></SCRIPT>
<SCRIPT TYPE="application/javascript">window.onload = window.initializesheets;</SCRIPT> <SCRIPT TYPE="application/javascript">window.onload = window.initializesheets;</SCRIPT>
<H1>alpine</H1> <H1>linux</H1>
<H3>updated 2022-04-21</H3> <H3>updated 2022-04-21</H3>
<HR ALIGN="left" SIZE="1" WIDTH="25%" /> <HR ALIGN="left" SIZE="1" WIDTH="25%" />
<H2>Resources</H2> <H2>Alpine</H2>
<H3>Resources</H3>
<UL> <UL>
<LI><A HREF="https://pkgs.alpinelinux.org/contents">Alpine repositories content search</A></LI> <LI><A HREF="https://pkgs.alpinelinux.org/contents">Alpine repositories content search</A></LI>
</UL> </UL>
<H2>Alpine: Always install manual pages</H2> <H3>Always install manual pages</H3>
<P> <P>
Alpine doesn't include man pages in program packages to save on space, instead keeping them in <CODE>[<I>package</I>]-doc</CODE> sibling packages. Alpine doesn't include man pages in program packages to save on space, instead keeping them in <CODE>[<I>package</I>]-doc</CODE> sibling packages.
To always install doc packages with program packages, <CODE>apk add docs</CODE>. To always install doc packages with program packages, <CODE>apk add docs</CODE>.
</P> </P>
<H2>Arch and Artix: Install essential packages</H2> <H2>Arch and Artix</H2>
<H3>Bootstrapping: Installing essential packages</H3>
<P> <P>
On Artix, use <CODE>basestrap(8)</CODE>. On Artix, use <CODE>basestrap(8)</CODE>.
On Arch, use <CODE>pacstrap(8)</CODE>. On Arch, use <CODE>pacstrap(8)</CODE>.
@ -48,32 +50,19 @@ Text editors, network managers or utilities, and other administration tools, for
Manual utilities such as <CODE>man-db</CODE> and others would also be useful. Manual utilities such as <CODE>man-db</CODE> and others would also be useful.
</P> </P>
<H2>Common utilities</H2> <H2>C Language</H2>
<P>A lot of common utilities such as <CODE>lsblk(8)</CODE> and <CODE>more(1)</CODE> are provided by <CODE>util-linux</CODE> which is not installed by default.</P>
<H3>C language</H3>
<UL>
<LI>Compiler: <CODE>tcc</CODE>, <CODE>gcc</CODE>, <CODE>clang</CODE></LI>
<LI>Standard library headers: <CODE>musl-dev</CODE></LI>
<LI>Standard library documentation: <CODE>man-pages</CODE>, <CODE>man-pages-posix</CODE></LI>
</UL>
<P>Also see the <CODE>build-base</CODE> metapackage.</P>
<H3>LUKS</H3>
<P><CODE>cryptsetup</CODE> and <CODE>e2fsprogs</CODE>.</P>
<H3>Manual viewer</H3>
<P><CODE>mandoc</CODE></P>
<H3>Make</H3>
<P><CODE>make</CODE></P>
<H3>Login manager</H3>
<P><CODE>elogind</CODE></P>
<H3>Stream Pager</H3>
<P><CODE>less</CODE></P>
<H3>Task manager</H3>
<P><CODE>top(1)</CODE> comes with busybox; see its derivatives such as <CODE>htop</CODE> for curses-based alternatives.</P>
<H3>Text editing</H3>
<P> <P>
<CODE>emacs</CODE> and <CODE>vim</CODE> come to mind. For compilation, <CODE>tcc(1)</CODE>, <CODE>gcc(1)</CODE>, and <CODE>clang(1)</CODE> are all reasonable choices depending on your needs.
A particularly shoddy attempt at <CODE>ed(1)</CODE> is provided by busybox but will please nobody. </P>
busybox's <CODE>vi(1)</CODE> on the other hand is a very useable implementation of the original. <P>
On Alpine Linux, the standard library headers are in the <CODE>musl-dev</CODE> package.
</P>
<P>
In most system package managers, standard library documentation can be found in the <CODE>man-pages</CODE> and <CODE>man-pages-posix</CODE> packages.
</P>
<P>
Many Linux software distributions' system package managers have meta-packages that pull all necessities for C development as dependencies.
Alpine has <CODE>build-base</CODE> and Debian has <CODE>build-essential</CODE>.
</P> </P>
<H2>fstab</H2> <H2>fstab</H2>
@ -81,6 +70,16 @@ busybox's <CODE>vi(1)</CODE> on the other hand is a very useable implementation
<P>postmarketOS requires that the <CODE>localmount</CODE> OpenRC service be enabled for the system to read <CODE>fstab(5)</CODE>. <P>postmarketOS requires that the <CODE>localmount</CODE> OpenRC service be enabled for the system to read <CODE>fstab(5)</CODE>.
<P>Arch and Artix have fstab generators at <CODE>genfstab(8)</CODE> and <CODE>fstabgen(8)</CODE> respectively in their installation scripts.</P> <P>Arch and Artix have fstab generators at <CODE>genfstab(8)</CODE> and <CODE>fstabgen(8)</CODE> respectively in their installation scripts.</P>
<H2>Login manager</H2>
<P>Use <CODE>elogind</CODE>.</P>
<H2>Make utility</H2>
<P>
<CODE>make(1)</CODE> in modern times is fragmented into the GNU version (in context, <I><CODE>gmake</CODE></I>) and the {Free,Open,Net}BSD version (<I><CODE>bmake</CODE></I>).
Complex Makefiles may not be useable in both.
It's custom for Linux systems to have <CODE>make(1)</CODE> as GNU Make and <CODE>bmake(1)</CODE> as BSD Make, and BSD-based systems to have <CODE>make(1)</CODE> as BSD Make and <CODE>gmake(1)</CODE> as GNU Make.
</P>
<H2>Mount LUKS encrypted partitions at boot</H2> <H2>Mount LUKS encrypted partitions at boot</H2>
<H3>Sources</H3> <H3>Sources</H3>
<UL> <UL>
@ -90,11 +89,31 @@ busybox's <CODE>vi(1)</CODE> on the other hand is a very useable implementation
</UL> </UL>
<P>See <A HREF="/knowledge/cryptography#luks_partitioning">cryptography#LUKS partitioning</A> for how to make a LUKS partition.</P> <P>See <A HREF="/knowledge/cryptography#luks_partitioning">cryptography#LUKS partitioning</A> for how to make a LUKS partition.</P>
<P> <P>
<CODE>cryptsetup-openrc</CODE> provides a <CODE>dmcrypt</CODE> service for OpenRC. <CODE>e2fsprogs</CODE> is needed for the <CODE>dm_mod</CODE> kernel module used for LUKS partition decryption.
Make sure that service is added to runlevel boot and then configure <CODE>/etc/conf.d/dmcrypt</CODE>, and accordingly fstab. </P>
<P>
On most OpenRC-initialized distributions, the <CODE>cryptsetup-openrc</CODE> package provides a <CODE>dmcrypt</CODE> service for OpenRC.
Make sure that service is added to runlevel boot.
</P>
<P>
Configure <CODE>/etc/conf.d/dmcrypt</CODE>, and accordingly fstab.
<CODE>dmcrypt</CODE> will need the UUID of the <I>physical</I> block device while fstab (if being configured with UUIDs will need the UUID of the decrypted block device in the device mapper. <CODE>dmcrypt</CODE> will need the UUID of the <I>physical</I> block device while fstab (if being configured with UUIDs will need the UUID of the decrypted block device in the device mapper.
</P> </P>
<H2>On-line manual</H2>
<P>
In the context of POSIX and UNIX-like systems, an "on-line" manual is a manual that is accessible via the computer system it documents.
Particularly, the <CODE>man(1)</CODE> utility and the manual "pages" it references.
</P>
<P>
Alpine by default uses <CODE>mandoc</CODE>.
</P>
<H2>Paging</H2>
<P>
<CODE>less(1)</CODE> is <CODE>more(1)</CODE>; more or less.
</P>
<H2>Partitions and filesystems</H2> <H2>Partitions and filesystems</H2>
<H3>See also</H3> <H3>See also</H3>
<UL> <UL>
@ -135,6 +154,27 @@ wifi.scan-rand-mac-address=no
On a live system you can then <CODE>rc-service networkmanager restart</CODE> to restart NetworkManager and have it load the new configuration. On a live system you can then <CODE>rc-service networkmanager restart</CODE> to restart NetworkManager and have it load the new configuration.
</P> </P>
<H2>Task management</H2>
<P>
<CODE>top(1)</CODE> comes with busybox, otherwise use <CODE>htop</CODE>.
</P>
<H2>Text editing</H2>
<P>
<CODE>emacs</CODE> and <CODE>vim</CODE> come to mind.
A particularly shoddy attempt at <CODE>ed(1)</CODE> is provided by <CODE>busybox</CODE> but will please nobody.
busybox's <CODE>vi(1)</CODE> on the other hand is a very useable implementation of the original.
</P>
<H2>util-linux</H2>
<H3>See also</H3>
<UL>
<LI><A HREF="https://en.wikipedia.org/wiki/Util-linux">util-linux - Wikipedia</A></LI>
</UL>
<P>
<CODE>util-linux</CODE> is distributed on all popular Linux distributions and contains utilities users may expect to be already present on their systems, like <CODE>more(1)</CODE> or <CODE>hexdump(1)</CODE>.
</P>
<H2>WiFi</H2> <H2>WiFi</H2>
<P> <P>
I use <CODE>iwd(8)</CODE> and <CODE>iwctl(8)</CODE>. I use <CODE>iwd(8)</CODE> and <CODE>iwctl(8)</CODE>.