How to get regular stuff working

From Alpine Linux
Revision as of 17:44, 13 September 2024 by Prabuanand (talk | contribs) (rearrranged headings)

Alpine comes with busybox by default. Busybox is set up as an endpoint for numerous symlinks that substitute various utilities. Since busybox tries to be a minimalistic package, the busybox commands may still be missing some functionality.

To replace the busybox symlinks, you can install the relevant packages:

Basic utilities

Very basic utilities randing from cd, ls to lsblk grep, are all busybox symlinks, by default. To have the complete packages:

# apk add util-linux coreutils grep findutils

Bash shell

It's also easy enough to install bash itself, or any other shell of your choice:

apk add bash bash-completion

and optionally, change the login shell with chsh.

Hardware Management

Install pciutils and usbutils for configuring pci and usb hardware respectively. You can always remove these packages once the hardware is configured.

# apk add pciutils usbutils

The packages hwdata-pci and hwdata-usb are dependencies for the above utilities and they are installed automatically.

Disk Management

Managing (removable) disk is much easier with udisks

Installation

# apk add udisks2

To see the mounted disks

# udisksctl status

Network Management

For network, you may want to install iproute2

# apk add iproute2

Development environment

Compiling in Alpine may be more challenging because it uses musl-libc instead of glibc. Alpine offers the regular compiler stuff like gcc etc..

For general software development i.e compiling from source

# apk add build-base abuild

Tools specifically needed for alpine specicific development

# apk add build-base abuild

Alpine Software Development Kit meta package includes abuild, build-base, and git

# apk add alpine-sdk

Complete cmake needs the following:

# apk add cmake extra-cmake-modules

ccache and a lot other tools are also available in alpine.

Functional differences between musl and glibc