GNU core utilities: Difference between revisions

From Alpine Linux
(Created page with "''From [https://www.gnu.org/software/coreutils/ gnu.org]:'' ''The GNU Core Utilities (often called {{Pkg|coreutils}}) are the basic file, shell and text manipulation utilitie...")
 
(rephrased sentence to reduce duplication)
 
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
''From [https://www.gnu.org/software/coreutils/ gnu.org]:''
''The GNU Core Utilities {{Pkg|coreutils}} are the basic file, shell and text manipulation utilities of the GNU operating system. These are the core utilities which are expected to exist on every operating system.'' However, Alpine Linux uses [[BusyBox]] in place of the '''coreutils''' for a more lightweight, minimalist and secure experience but the {{Pkg|coreutils}} is still available. If you wish to use the original {{Pkg|coreutils}} package:


''The GNU Core Utilities (often called {{Pkg|coreutils}}) are the basic file, shell and text manipulation utilities of the GNU operating system. These are the core utilities which are expected to exist on every operating system.''
{{Cmd|# apk add {{Pkg|coreutils}}}}


<br>
== utmps ==


The {{Pkg|coreutils}} is used in most Linux distributions by default (which is why Linux is often refered to as GNU/linux or GNU+Linux), Alpine uses [https://www.busybox.net/ Busybox] in place of the '''coreutils''' for a more ligthweight, minimalist and secure experience but the '''coreutils''' is still available on AlpineLinux if you wish to use it.
Some programs like <code>wall(1)</code> depend on a libc feature named "utmp", that cannot be implemented
in libc securely. For this reason, musl (the libc that Alpine uses) does not implement utmp. Instead, it provides stubs that do nothing.


<br>
That is why programs that use utmp - such as wall, who or w - output nothing but still exit successfully. This is expected, a feature, and cannot be fixed easily.


===== coreutils libc and utmps in alpine =====
The login monitor [https://skarnet.org/software/utmps/ utmps], is a secure implementation of user accounting. The Alpine Linix package {{Pkg|utmps}} can be installed as follows:


Some programs like wall(1) depend on a libc feature named "utmp", that cannot be implemented
{{Cmd|# apk add utmps}}
in libc securely. For this reason, musl (the libc that Alpine uses) does not implement utmp. Instead, it provides stubs that do nothing.
 
Once the package is installed, start the helper script which sets up services.


That is why programs that use utmp - such as wall, who or w - output nothing but still exit successfully. This is expected, a feature, and cannot be fixed easily.
{{Cmd|# setup-utmp}}


<br>
Note that {{Pkg|utmps}} also works without {{Pkg|coreutils}} package.


Some have a nice solution. For example, a {{Pkg|utmps}} login monitor:
== ubase ==


{{Cmd|apk add coreutils utmps}}
There also an alternative to {{Pkg|coreutils}} named {{Pkg|ubase}} currently available in [[Repositories#Testing|testing repository]] that provides better functionality than the built-in busybox, but less than what coreutils offers.


{{Note|Take into consideration that there's an alternative to {{Pkg|coreutils}} named {{Pkg|ubase}} (only available in edge) that provides better functionality than the built-in busybox, but less than what coreutils offers}}
[[Category:System Administration]]

Latest revision as of 09:15, 22 October 2024

The GNU Core Utilities coreutils are the basic file, shell and text manipulation utilities of the GNU operating system. These are the core utilities which are expected to exist on every operating system. However, Alpine Linux uses BusyBox in place of the coreutils for a more lightweight, minimalist and secure experience but the coreutils is still available. If you wish to use the original coreutils package:

# apk add coreutils

utmps

Some programs like wall(1) depend on a libc feature named "utmp", that cannot be implemented in libc securely. For this reason, musl (the libc that Alpine uses) does not implement utmp. Instead, it provides stubs that do nothing.

That is why programs that use utmp - such as wall, who or w - output nothing but still exit successfully. This is expected, a feature, and cannot be fixed easily.

The login monitor utmps, is a secure implementation of user accounting. The Alpine Linix package utmps can be installed as follows:

# apk add utmps

Once the package is installed, start the helper script which sets up services.

# setup-utmp

Note that utmps also works without coreutils package.

ubase

There also an alternative to coreutils named ubase currently available in testing repository that provides better functionality than the built-in busybox, but less than what coreutils offers.