6.19. Util-linux-ng-2.17

The Util-linux-ng package contains miscellaneous utility programs. Among them are utilities for handling file systems, consoles, partitions, and messages.

Approximate build time: 0.6 SBU
Required disk space: 40 MB

6.19.1. FHS compliance notes

The FHS recommends using the /var/lib/hwclock directory instead of the usual /etc directory as the location for the adjtime file. To make the hwclock program FHS-compliant, run the following:

sed -e 's@etc/adjtime@var/lib/hwclock/adjtime@g' \
    -i $(grep -rl '/etc/adjtime' .)
mkdir -pv /var/lib/hwclock

6.19.2. Installation of Util-linux-ng

./configure --enable-arch --enable-partx --enable-write

The meaning of the configure options:

--enable-arch

Enables building the arch program

--enable-partx

Enables building the addpart, delpart and partx programs

--enable-write

Enables building the write program

Compile the package:

make

This package does not come with a test suite.

Install the package:

make install

6.19.3. Contents of Util-linux-ng

Installed programs: addpart, agetty, arch, blkid, blockdev, cal, cfdisk, chkdupexe, chrt, col, colcrt, colrm, column, ctrlaltdel, cytune, ddate, delpart, dmesg, fdformat, fdisk, findfs, flock, fsck, fsck.cramfs, fsck.minix, getopt, hexdump, hwclock, i386, ionice, ipcmk, ipcrm, ipcs, isosize, ldattach, line, linux32, linux64, logger, look, losetup, lscpu, mcookie, mkfs, mkfs.bfs, mkfs.cramfs, mkfs.minix, mkswap, more, mount, namei, partx, pg, pivot_root, readprofile, rename, renice, rev, rtcwake, script, scriptreplay, setarch, setsid, setterm, sfdisk, swapoff (link to swapon), swapon, switch_root, tailf, taskset, tunelp, ul, umount, uuidd, uuidgen, wall, whereis, and write
Installed libraries: libblkid.{a,so}, libuuid.{a,so}

Short Descriptions

addpart

Informs the Linux kernel of new partitions

agetty

Opens a tty port, prompts for a login name, and then invokes the login program

arch

Reports the machine's architecture

blkid

A command line utility to locate and print block device attributes

blockdev

Allows users to call block device ioctls from the command line

cal

Displays a simple calendar

cfdisk

Manipulates the partition table of the given device

chkdupexe

Finds duplicate executables

chrt

Manipulates real-time attributes of a process

col

Filters out reverse line feeds

colcrt

Filters nroff output for terminals that lack some capabilities, such as overstriking and half-lines

colrm

Filters out the given columns

column

Formats a given file into multiple columns

ctrlaltdel

Sets the function of the Ctrl+Alt+Del key combination to a hard or a soft reset

cytune

Tunes the parameters of the serial line drivers for Cyclades cards

ddate

Gives the Discordian date or converts the given Gregorian date to a Discordian one

delpart

Asks the Linux kernel to remove a partition

dmesg

Dumps the kernel boot messages

fdformat

Low-level formats a floppy disk

fdisk

Manipulates the paritition table of the given device

findfs

Finds a file system by label or Universally Unique Identifier (UUID)

flock

Acquires a file lock and then executes a command with the lock held

fsck

Is used to check, and optionally repair, file systems

fsck.cramfs

Performs a consistency check on the Cramfs file system on the given device

fsck.minix

Performs a consistency check on the Minix file system on the given device

getopt

Parses options in the given command line

hexdump

Dumps the given file in hexadecimal or in another given format

hwclock

Reads or sets the system's hardware clock, also called the Real-Time Clock (RTC) or Basic Input-Output System (BIOS) clock

i386

A symbolic link to setarch

ionice

Gets or sets the io scheduling class and priority for a program

ipcmk

Creates various IPC resources

ipcrm

Removes the given Inter-Process Communication (IPC) resource

ipcs

Provides IPC status information

isosize

Reports the size of an iso9660 file system

ldattach

Attaches a line discipline to a serial line

line

Copies a single line

linux32

A symbolic link to setarch

linux64

A symbolic link to setarch

logger

Enters the given message into the system log

look

Displays lines that begin with the given string

losetup

Sets up and controls loop devices

lscpu

Prints CPU architechture information

mcookie

Generates magic cookies (128-bit random hexadecimal numbers) for xauth

mkfs

Builds a file system on a device (usually a hard disk partition)

mkfs.bfs

Creates a Santa Cruz Operations (SCO) bfs file system

mkfs.cramfs

Creates a cramfs file system

mkfs.minix

Creates a Minix file system

mkswap

Initializes the given device or file to be used as a swap area

more

A filter for paging through text one screen at a time

mount

Attaches the file system on the given device to a specified directory in the file-system tree

namei

Shows the symbolic links in the given pathnames

partx

Tells the kernel about the presence and numbering of on-disk partitions

pg

Displays a text file one screen full at a time

pivot_root

Makes the given file system the new root file system of the current process

readprofile

Reads kernel profiling information

rename

Renames the given files, replacing a given string with another

renice

Alters the priority of running processes

rev

Reverses the lines of a given file

rtcwake

Used to enter a system sleep state until specified wakeup time

script

Makes a typescript of a terminal session

scriptreplay

Plays back typescripts using timing information

setarch

Changes reported architecture in a new program environment and sets personality flags

setsid

Runs the given program in a new session

setterm

Sets terminal attributes

sfdisk

A disk partition table manipulator

swapoff

Disables devices and files for paging and swapping

swapon

Enables devices and files for paging and swapping and lists the devices and files currently in use

switch_root

Switches to another filesystem as the root of the mount tree

tailf

Tracks the growth of a log file. Displays the last 10 lines of a log file, then continues displaying any new entries in the log file as they are created

taskset

Retrieves or sets a process' CPU affinity

tunelp

Tunes the parameters of the line printer

ul

A filter for translating underscores into escape sequences indicating underlining for the terminal in use

umount

Disconnects a file system from the system's file tree

uuidd

A daemon used by the UUID library to generate time-based UUIDs in a secure and guranteed-unique fashion.

uuidgen

Creates new UUIDs. Each new UUID can reasonably be considered unique among all UUIDs created, on the local system and on other systems, in the past and in the future

wall

Displays the contents of a file or, by default, its standard input, on the terminals of all currently logged in users

whereis

Reports the location of the binary, source, and man page for the given command

write

Sends a message to the given user if that user has not disabled receipt of such messages

libblkid

Contains routines for device identification and token extraction

libuuid

Contains routines for generating unique identifiers for objects that may be accessible beyond the local system