How to get regular stuff working: Difference between revisions

From Alpine Linux
(rearrranged headings)
m (Fix spelling and repeated information)
 
Line 4: Line 4:


== Basic utilities ==
== Basic utilities ==
Very basic utilities randing from cd, ls to lsblk grep, are all busybox symlinks, by default. To have the complete packages:
Very basic utilities ranging from cd, ls, lsblk, grep, are all busybox symlinks by default. To have the complete packages:
: {{Cmd|# apk add {{pkg|util-linux}} {{pkg|coreutils}} {{pkg|grep}} {{pkg|findutils}} }}
 
{{Cmd|# apk add {{pkg|util-linux}} {{pkg|coreutils}} {{pkg|grep}} {{pkg|findutils}} }}


== Bash shell ==  
== Bash shell ==  


It's also easy enough to install bash itself, or any other shell of your choice:   
It's also easy enough to install bash itself, or any other shell of your choice:   
: {{Cmd|apk add {{pkg|bash}} {{pkg|bash-completion}}}}
 
{{Cmd|apk add {{pkg|bash}} {{pkg|bash-completion}}}}
 
and optionally, change the login shell with '''{{ic|chsh}}'''.
and optionally, change the login shell with '''{{ic|chsh}}'''.


== Hardware Management ==
== Hardware Management ==


Install {{pkg|pciutils}} and {{pkg|usbutils}} for configuring pci and usb hardware respectively. You can always remove these packages once the hardware is configured.  
Install {{pkg|pciutils}} and {{pkg|usbutils}} for configuring PCI and USB hardware respectively. You can always remove these packages once the hardware is configured.  


: {{Cmd|# apk add {{pkg|pciutils}} {{pkg|usbutils}}}}
{{Cmd|# apk add {{pkg|pciutils}} {{pkg|usbutils}}}}


The packages {{pkg|hwdata-pci}} and {{pkg|hwdata-usb}} are dependencies for the above utilities and they are installed automatically.
The packages {{pkg|hwdata-pci}} and {{pkg|hwdata-usb}} are dependencies for the above utilities and they are installed automatically.
Line 23: Line 26:
== Disk Management ==
== Disk Management ==


Managing (removable) disk is much easier with udisks
Managing (removable) disks is much easier with udisks.
 
Installation   


{{Cmd|# apk add {{pkg|udisks2}}}}
{{Cmd|# apk add {{pkg|udisks2}}}}


To see the mounted disks
To see the mounted disks:


{{Cmd|# udisksctl status}}
{{Cmd|# udisksctl status}}


== Network Management ==
== Network Management ==
For network, you may want to install {{pkg|iproute2}}
For network, you may want to install {{pkg|iproute2}}.


{{Cmd|# apk add {{pkg|iproute2}}}}  
{{Cmd|# apk add {{pkg|iproute2}}}}  
Line 40: Line 41:
== Development environment ==
== Development environment ==


Compiling in Alpine may be more challenging because it uses [https://musl.libc.org/ musl-libc] instead of glibc.  Alpine offers the regular compiler stuff like gcc etc..
Compiling in Alpine may be more challenging because it uses [https://musl.libc.org/ musl-libc] instead of glibc.  Alpine offers the regular compiler stuff such as {{pkg|gcc}}.


For general software development i.e compiling from source
{{Cmd|# apk add {{pkg|gcc}}}}


{{Cmd|# apk add {{pkg|build-base}} {{pkg|abuild}}}}
The {{pkg|alpine-sdk}} meta package is provided to build packages for Alpine. It includes {{pkg|abuild}}, {{pkg|build-base}}, and {{pkg|git}}.


Tools specifically needed for alpine specicific development
{{Cmd|# apk add {{pkg|alpine-sdk}}}}
{{Cmd|# apk add {{pkg|build-base}} {{pkg|abuild}}}}


Alpine Software Development Kit meta package includes {{pkg|abuild}}, {{pkg|build-base}}, and {{pkg|git}}
To install CMake:
{{Cmd|# apk add {{pkg|alpine-sdk}} }}


Complete cmake needs the following:
{{Cmd|# apk add {{pkg|cmake}} {{pkg|extra-cmake-modules}}}}
{{Cmd|# apk add {{pkg|cmake}} {{pkg|extra-cmake-modules}}}}


{{pkg|ccache}} and a lot other tools are also available in alpine.  
{{pkg|ccache}} and a lot other tools are also available in Alpine.  


[https://wiki.musl-libc.org/functional-differences-from-glibc.html Functional differences between musl and glibc]
[https://wiki.musl-libc.org/functional-differences-from-glibc.html Functional differences between musl and glibc]
[[Category:Installation]]
[[Category:Installation]]

Latest revision as of 05:01, 8 October 2024

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 ranging from cd, ls, 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) disks is much easier with udisks.

# 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 such as gcc.

# apk add gcc

The alpine-sdk meta package is provided to build packages for Alpine. It includes abuild, build-base, and git.

# apk add alpine-sdk

To install CMake:

# apk add cmake extra-cmake-modules

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

Functional differences between musl and glibc