util-linux is the package bundling most of the small, essential Linux-specific command-line tools: partition, filesystem, login, and process utilities that are not part of GNU coreutils. Source: kernel.org/pub/linux/utils/util-linux.
Tools from this package documented elsewhere on this site¶
| Tool | Page |
|---|---|
logger |
logger |
ionice |
ionice |
rename |
rename |
mount, umount, findmnt |
mount |
fsck, wipefs, blockdev |
storage |
dmesg |
referenced in xrdp troubleshooting and elsewhere |
script, scriptreplay |
scriptreplay |
lsblk, blkid |
referenced throughout storage |
Others worth knowing, briefly¶
lscpu # CPU model, core/thread/socket counts, cache sizes
lsblk -f # block devices, filesystem types, UUIDs, mountpoints
hwclock --show # hardware clock; --systohc / --hctosys to sync with the system clock
setarch linux32 command # run a command reporting a 32-bit uname (compatibility shims)
taskset -c 0,1 command # pin a command to specific CPUs
nsenter --target <pid> --net -- ip a # enter another process's namespaces (see network namespaces guide)
rev file # reverse each line, character by character
column -t file.tsv # align columns (see the bash guide's CSV example)
whereis command # binary, source, and man page locations for a command
flock /var/lock/myjob.lock command # simple mutual-exclusion lock around a command, for cron jobs
flock is worth calling out for cron: wrapping a scheduled job in flock -n /var/lock/job.lock job.sh stops a slow run from overlapping with the next scheduled one.
Full list of included tools: dpkg -L util-linux | grep bin (Debian/Ubuntu) or rpm -ql util-linux | grep bin (RHEL family).