BusyBox: Difference between revisions
Prabuanand (talk | contribs) (added reference to core utilities page) |
Prabuanand (talk | contribs) (added more info on busybox) |
||
Line 1: | Line 1: | ||
Alpine Linux is built around musl libc and [https://www.busybox.net/ busybox]. BusyBox | Alpine Linux is built around musl libc and [https://www.busybox.net/ busybox]. BusyBox provides replacements for most of the utilities usually found in GNU coreutils, util-linux, etc. The utilities in BusyBox generally have fewer options than their full-featured GNU counterparts. | ||
BusyBox is a multi-call binary. A multi-call binary is an executable program that performs the same job as more than one utility program. That means there is just a single BusyBox binary, but that single binary acts like a large number of utilities. This allows BusyBox to be smaller since all the built-in utility programs (called as applets) can share code for many common operations. Invoking BusyBox with no arguments, will provide with a list of the applets that have been compiled into BusyBox binary. | |||
Refer [https://busybox.net/downloads/BusyBox.html BusyBox Manual] for options supported by BusyBox. | |||
== Ash shell == | == Ash shell == | ||
Line 22: | Line 26: | ||
}} | }} | ||
== | == 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 certain utilities in busybox lacking in features or options, it is easy to [[How to get regular stuff working|replace]] respective busybox endpoints by their equivalent full-featured utilities. | ||
== See Also == | == See Also == | ||
* [https://www.busybox.net/ Official website] | * [https://www.busybox.net/ Official website] | ||
* [https:// | * [https://busybox.net/downloads/BusyBox.html Official BusyBox Manual] | ||
[[Category:System Administration]] | [[Category:System Administration]] |
Revision as of 09:34, 22 October 2024
Alpine Linux is built around musl libc and busybox. BusyBox provides replacements for most of the utilities usually found in GNU coreutils, util-linux, etc. The utilities in BusyBox generally have fewer options than their full-featured GNU counterparts.
BusyBox is a multi-call binary. A multi-call binary is an executable program that performs the same job as more than one utility program. That means there is just a single BusyBox binary, but that single binary acts like a large number of utilities. This allows BusyBox to be smaller since all the built-in utility programs (called as applets) can share code for many common operations. Invoking BusyBox with no arguments, will provide with a list of the applets that have been compiled into BusyBox binary.
Refer BusyBox Manual for options supported by BusyBox.
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
Next create the file ~/.config/ash/profile as follows:
Contents of ~/.config/ash/profile
Now aliases can be added in the file ~/.config/ash/ashrc:
Contents of ~/.config/ash/ashrc
Replacing BusyBox Utilities
If you find certain utilities in busybox lacking in features or options, it is easy to replace respective busybox endpoints by their equivalent full-featured utilities.