util-linux
The util-linux suite contains userspace utilities for Linux specific system management including device control, terminal logins, process management, and tty messaging. It is a fundamental block of userspace utilities for Linux systems.
Gentoo includes util-linux package in the @system set.
Installation
USE flags
USE flags for sys-apps/util-linux Various useful Linux utilities
audit
|
Use sys-process/audit to emit audit messages about system changes |
build
|
!!internal use only!! DO NOT SET THIS FLAG YOURSELF!, used for creating build images and the first half of bootstrapping [make stage1] |
caps
|
build setpriv helper (run programs with diff capabilities) |
cramfs
|
build mkfs/fsck helpers for cramfs filesystems |
cryptsetup
|
Use sys-fs/cryptsetup to have built-in dm-verity in libmount |
fdformat
|
build fdformat (floppy disk format) |
hardlink
|
build hardlink program |
kill
|
build the kill program |
logger
|
build the logger program |
magic
|
Add support for file type detection via magic bytes (usually via libmagic from sys-apps/file) |
ncurses
|
Add ncurses support (console display library) |
nls
|
Add Native Language Support (using gettextGNU locale utilities) |
pam
|
build runuser helper |
python
|
Add optional support/bindings for the Python language |
readline
|
Enable support for libreadline, a GNU line-editing library that almost everyone wants |
rtas
|
Add support for the Run Time Abstraction Services (RTAS) |
selinux
|
!!internal use only!! Security Enhanced Linux support, this must be set by the selinux profile or breakage will occur |
slang
|
Add support for the slang text display library (it's like ncurses, but different) |
split-usr
|
Enable behavior to support maintaining /bin, /lib*, /sbin and /usr/sbin separately from /usr/bin and /usr/lib* |
static-libs
|
Build static versions of dynamic libraries as well |
su
|
build the su program |
suid
|
Install some programs with suid bit set to provide additional functionality. mount/umount: non-root users may mount/umount devices wall/write: non-root users can notify other users su: non-root users may become root |
systemd
|
Enable use of systemd-specific libraries and features like socket activation or session tracking |
test
|
Enable dependencies and/or preparations necessary to run tests (usually controlled by FEATURES=test but can be toggled independently) |
tty-helpers
|
install the mesg/wall/write tools for talking to local users |
udev
|
Enable virtual/udev integration (device discovery, power and storage device support, etc) |
unicode
|
Add support for Unicode |
kill
Enabling the kill
USE flag will typically creates a conflict between the sys-process/procps and sys-apps/util-linux packages. Both packages include the kill command, and both packages are capable of conditionally building the kill utility by setting the kill
USE flag (in fact, sys-apps/coreutils also includes support for a kill command).
Gentoo toolchain developers have decided the sys-process/procps package will be the default provider of the kill utility for the @system set.
tty-helpers
The mesg, wall, and write utilities are installed using the tty-helpers
USE flag. This can be viewed by scrolling down in USE flags section above.
For security reasons, these utilities are disabled by default.
Emerge
root #
emerge --ask --oneshot sys-apps/util-linux
--oneshot
is used in the above command because util-linux is included in the @system set. It is typically not necessary to include it in a @selected set (/var/lib/porage/world file).Usage
There are many utilities included in with the util-linux package.
binary | description |
---|---|
addpart | |
adjtimex | |
agetty | |
blkdiscard | |
blkid | |
blkzone | |
blockdev | |
cal | |
cfdisk | |
chcpu | |
chfn | |
chmem | |
choom | |
chrt | |
chsh | |
col | |
colcrt | |
colrm | |
column | |
ctrlaltdel | |
ddate | |
delpart | |
dmesg | |
eject | |
fallocate | |
fdformat | |
fdisk | |
fincore | |
findfs | |
findmnt | |
flock | |
fsck | |
fsck.cramfs | |
fsck.minix | |
fsfreeze | |
fstrim | |
getopt | |
hardlink | |
hexdump | |
hwclock | |
ionice | |
ipcmk | |
ipcrm | |
ipcs | |
irqtop | |
isosize | |
jaztool | |
kill | |
ldattach | |
line | |
logger | |
login | |
look | |
losetup | |
lsblk | |
lscpu | |
lsfd | |
lsipc | |
lsirq | |
lslocks | |
lslogins | |
lsmem | |
lsns | |
mcookie | |
mesg | |
mkfs | |
mkfs.bfs | |
mkfs.cramfs | |
mkfs.minix | |
mkswap | |
more | |
mount | |
mountpoint | |
namei | |
nsenter | |
partx | |
pg | |
pivot_root | |
prlimit | |
readprofile | |
rename | |
renice | |
resizepart | |
rev | |
rfkill | |
rtcwake | |
runuser | |
script | |
scriptlive | |
scriptreplay | |
setarch | |
setpriv | |
setserial | |
setsid | |
setterm | |
sfdisk | |
strings-BSD | |
swaplabel | |
swapoff | |
swapon | |
switch_root | |
taskset | |
uclampset | |
ul | |
umount | |
unshare | |
utmpdump | |
uuidgen | |
uuidparse | |
wall | |
wdctl | |
whereis | |
wipefs | |
write | |
zramctl |
Installed utilities can be obtained by the following command:
user $
cat /var/db/pkg/sys-apps/util-linux*/CONTENTS | grep bin | awk '{print $NF}' FS=/ | cut -d " " -f 1
Alternatively the following command can be used if the app-portage/portage-utils suite is installed:
user $
qlist sys-apps/util-linux | grep bin
Troubleshooting
See also
- GNU Coreutils — provide many of the basic commands of the UNIX(like) OS.