BusyBox: Difference between revisions

From Alpine Linux
m (rephrased sentence, added links and context)
(added reference to core utilities page)
 
Line 22: Line 22:
}}
}}


== Replacing Busybox symlinks ==
== Core utilities ==
{{Main|GNU core utilities}}
Alpine Linux uses BusyBox in place of the coreutils for a more lightweight, minimalist and secure experience but the {{Pkg|coreutils}} package is still available, if you wish to use it.
 
== Replacing Busybox utilities ==
{{Main|How to get regular stuff working}}
{{Main|How to get regular stuff working}}
If you find busybox lacking in features or options, it is easy to [[How to get regular stuff working|replace]] busybox endpoints by their full-featured utilities.  
If you find busybox lacking in features or options, it is easy to [[How to get regular stuff working|replace]] busybox endpoints by their full-featured utilities.


== See Also ==
== See Also ==

Latest revision as of 04:59, 22 October 2024

Alpine Linux is built around musl libc and busybox. BusyBox combines tiny versions of many common UNIX utilities into a single small executable. It provides replacements for most of the utilities usually found in GNU fileutils, shellutils, etc. The utilities in BusyBox generally have fewer options than their full-featured GNU counterparts.

Ash shell

Alpine Linux uses Busybox Ash for its default shell. To change the default shell to other shells like bash, zsh, fish etc..refer change default shell.

Aliases

When using Ash shell, one can’t set aliases in the ~/.profile, but environment variables can be set in it. In order to use aliases with Busybox Ash, you must set the ENV environment variable to refer the aliases file.

First create the file /etc/profile.d/profile.sh as follows:

Contents of /etc/profile.d/profile.sh

if [ -f "$HOME/.config/ash/profile" ]; then . "$HOME/.config/ash/profile" fi

Next create the file ~/.config/ash/profile as follows:

Contents of ~/.config/ash/profile

export ENV="$HOME/.config/ash/ashrc"

Now aliases can be added in the file ~/.config/ash/ashrc:

Contents of ~/.config/ash/ashrc

su="doas -s"

Core utilities

Alpine Linux uses BusyBox in place of the coreutils for a more lightweight, minimalist and secure experience but the coreutils package is still available, if you wish to use it.

Replacing Busybox utilities

If you find busybox lacking in features or options, it is easy to replace busybox endpoints by their full-featured utilities.

See Also