How to get regular stuff working: Difference between revisions

From Alpine Linux
m (→‎Operational hints: shadow seems to be installed by default now)
Line 46: Line 46:
   apk add util-linux pciutils usbutils coreutils binutils findutils grep
   apk add util-linux pciutils usbutils coreutils binutils findutils grep


* /etc/{shadow,group} manipulation requires
 
  apk add shadow


==== Disk Management ====  
==== Disk Management ====  

Revision as of 14:25, 19 May 2021

Man pages

A "man" command and basic manual pages can be installed with:

   apk add mandoc man-pages

The appropos command may be installed with:

   apk add mandoc-apropos 

The man-pages package only provides the system's core manual pages. Other packages come with their separate *-doc sub-packages that ship their documentation (which may include man pages). This is the Alpine Way to allow for the small default footprint. For example:

   $ apk add curl
   $ man curl
   man: No entry for curl in the manual.
   $ apropos curl | wc -l
   0    After adding curl, there are no man pages
   $ apk add curl-doc
   (1/1) Installing curl-doc (7.52.1-r2)
   Executing mandoc-apropos-1.13.3-r6.trigger
   OK: 60 MiB in 31 packages
   $ apropos curl | wc -l
   366  Now, with curl-doc installed, there's a boatload of pages!


If you would like all the documentation packages pertaining to your installed packages to be pulled in automatically, you may install the docs meta package.

   apk add docs

Operational hints

Shell @ commandline

Alpine comes with busybox by default. Busybox is an endpoint for numerous symlinks for various utilities. Though busybox is not that bad, the commands are impaired in functionality.

  • Funny characters at the console

Edit the file at /etc/rc.conf and change line 92 to:

 unicode="YES"
  • Bash

It is easy enough to have bash installed, but this does not mean the symlinks to busybox are gone.

Install bash with:

  apk add bash bash-doc bash-completion
  • Shell utilities (things like grep, awk, ls are all busybox symlinks)
  apk add util-linux pciutils usbutils coreutils binutils findutils grep


Disk Management

Disk management is so much easier with udisks or udisks2

Installation

  apk add udisks2 udisks2-doc

See the mounted disks

  udisksctl status

Compiling : a few notes and a reminder

Compiling in Alpine may be more challenging because it uses musl-libc instead of glibc. Please review 'The functional differences with glibc' if you think of porting packages or just for the sake of knowing, of course.

Alpine offers the regular compiler stuff like gcc and cmake ... possible others

(unvalidated) apk packages to install so one can start building software

  apk add build-base gcc abuild binutils binutils-doc gcc-doc

a complete install for cmake looks like

  apk add cmake cmake-doc extra-cmake-modules extra-cmake-modules-doc

ccache is also available

  apk add ccache ccache-doc