1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
3 <!ENTITY % general-entities SYSTEM "../general.ent">
6 <sect1 id="ch-system-util-linux" xreflabel="Util-linux">
7 <title>Util-linux-&util-linux-version;</title>
8 <?dbhtml filename="util-linux.html"?>
10 <indexterm zone="ch-system-util-linux"><primary sortas="a-Util-linux">Util-linux</primary></indexterm>
12 <para>The Util-linux package contains miscellaneous utility programs. Among
13 them are utilities for handling file systems, consoles, partitions, and
16 <screen>&buildtime; 0.2 SBU
17 &diskspace; 16 MB</screen>
19 <para>Util-linux installation depends on: Bash, Binutils, Coreutils,
20 Diffutils, GCC, Gettext, Glibc, Grep, Make, Ncurses, Sed, Zlib.</para>
25 <title>FHS compliance notes</title>
27 <para>The FHS recommends that we use <filename>/var/lib/hwclock</filename>,
28 instead of the usual <filename>/etc</filename>, as the location for the
29 <filename>adjtime</filename> file. To make the <command>hwclock</command>
30 program FHS-compliant, run the following:</para>
32 <screen><userinput>cp hwclock/hwclock.c{,.backup}
33 sed 's%etc/adjtime%var/lib/hwclock/adjtime%' \
34 hwclock/hwclock.c.backup > hwclock/hwclock.c
35 mkdir -p /var/lib/hwclock</userinput></screen>
40 <title>Installation of Util-linux</title>
42 <para>Prepare Util-linux for compilation:</para>
44 <screen><userinput>./configure</userinput></screen>
46 <para>Compile the package:</para>
48 <screen><userinput>make HAVE_KILL=yes HAVE_SLN=yes</userinput></screen>
50 <para>The meaning of the make parameters:</para>
53 <listitem><para><userinput>HAVE_KILL=yes</userinput>: This prevents the
54 <command>kill</command> program (already installed by Procps) from being
55 built and installed again.</para></listitem>
57 <listitem><para><userinput>HAVE_SLN=yes</userinput>: This prevents the
58 <command>sln</command> program (a statically linked
59 <command>ln</command> already installed by Glibc) from being built and
60 installed again.</para></listitem>
63 <para>Now install the package:</para>
65 <screen><userinput>make HAVE_KILL=yes HAVE_SLN=yes install</userinput></screen>
70 <sect2 id="contents-utillinux"><title>Contents of Util-linux</title>
72 <para><emphasis>Installed programs</emphasis>: agetty, arch, blockdev, cal,
73 cfdisk, chkdupexe, col, colcrt, colrm, column, ctrlaltdel, cytune, ddate,
74 dmesg, elvtune, fdformat, fdisk, fsck.cramfs, fsck.minix, getopt, hexdump,
75 hwclock, ipcrm, ipcs, isosize, line, logger, look, losetup, mcookie, mkfs,
76 mkfs.bfs, mkfs.cramfs, mkfs.minix, mkswap, more, mount, namei, pg, pivot_root,
77 ramsize (link to rdev), raw, rdev, readprofile, rename, renice, rev, rootflags
78 (link to rdev), script, setfdprm, setsid, setterm, sfdisk, swapoff (link to
79 swapon), swapon, tunelp, ul, umount, vidmode (link to rdev), whereis and
84 <sect2><title>Short descriptions</title>
86 <indexterm zone="ch-system-util-linux agetty"><primary sortas="b-agetty">agetty</primary></indexterm>
87 <para id="agetty"><command>agetty</command> opens a tty port, prompts for a login name,
88 and then invokes the login program.</para>
90 <indexterm zone="ch-system-util-linux arch"><primary sortas="b-arch">arch</primary></indexterm>
91 <para id="arch"><command>arch</command> reports the machine's architecture.</para>
93 <indexterm zone="ch-system-util-linux blockdev"><primary sortas="b-blockdev">blockdev</primary></indexterm>
94 <para id="blockdev"><command>blockdev</command> allows you to call block device ioctls
95 from the command line.</para>
97 <indexterm zone="ch-system-util-linux cal"><primary sortas="b-cal">cal</primary></indexterm>
98 <para id="cal"><command>cal</command> displays a simple calendar.</para>
100 <indexterm zone="ch-system-util-linux cfdisk"><primary sortas="b-cfdisk">cfdisk</primary></indexterm>
101 <para id="cfdisk"><command>cfdisk</command> is used to manipulate the partition table
102 of the given device.</para>
104 <indexterm zone="ch-system-util-linux chkdupexe"><primary sortas="b-chkdupexe">chkdupexe</primary></indexterm>
105 <para id="chkdupexe"><command>chkdupexe</command> finds duplicate executables.</para>
107 <indexterm zone="ch-system-util-linux col"><primary sortas="b-col">col</primary></indexterm>
108 <para id="col"><command>col</command> filters out reverse line feeds.</para>
110 <indexterm zone="ch-system-util-linux colcrt"><primary sortas="b-colcrt">colcrt</primary></indexterm>
111 <para id="colcrt"><command>colcrt</command> is used to filter nroff output for terminals
112 that lack some capabilities such as overstriking and half-lines.</para>
114 <indexterm zone="ch-system-util-linux colrm"><primary sortas="b-colrm">colrm</primary></indexterm>
115 <para id="colrm"><command>colrm</command> filters out the given columns.</para>
117 <indexterm zone="ch-system-util-linux column"><primary sortas="b-column">column</primary></indexterm>
118 <para id="column"><command>column</command> formats a given file into multiple
121 <indexterm zone="ch-system-util-linux ctrlaltdel"><primary sortas="b-ctrlaltdel">ctrlaltdel</primary></indexterm>
122 <para id="ctrlaltdel"><command>ctrlaltdel</command> sets the function of the Ctrl+Alt+Del
123 key combination to a hard or a soft reset.</para>
125 <indexterm zone="ch-system-util-linux cytune"><primary sortas="b-cytune">cytune</primary></indexterm>
126 <para id="cytune"><command>cytune</command> was used to tune the parameters of the
127 serial line drivers for Cyclades cards.</para>
129 <indexterm zone="ch-system-util-linux ddate"><primary sortas="b-ddate">ddate</primary></indexterm>
130 <para id="ddate"><command>ddate</command> gives the Discordian date, or converts the
131 given Gregorian date to a Discordian one.</para>
133 <indexterm zone="ch-system-util-linux dmesg"><primary sortas="b-dmesg">dmesg</primary></indexterm>
134 <para id="dmesg"><command>dmesg</command> dumps the kernel boot messages.</para>
136 <indexterm zone="ch-system-util-linux elvtune"><primary sortas="b-elvtune">elvtune</primary></indexterm>
137 <para id="elvtune"><command>elvtune</command> can be used to tune the performance
138 and interactivity of a block device.</para>
140 <indexterm zone="ch-system-util-linux fdformat"><primary sortas="b-fdformat">fdformat</primary></indexterm>
141 <para id="fdformat"><command>fdformat</command> low-level formats a floppy disk.</para>
143 <indexterm zone="ch-system-util-linux fdisk"><primary sortas="b-fdisk">fdisk</primary></indexterm>
144 <para id="fdisk"><command>fdisk</command> could be used to manipulate the partition
145 table of the given device.</para>
147 <indexterm zone="ch-system-util-linux fsck.cramfs"><primary sortas="b-fsck.cramfs">fsck.cramfs</primary></indexterm>
148 <para id="fsck.cramfs"><command>fsck.cramfs</command> performs a consistency check on the
149 Cramfs file system on the given device.</para>
151 <indexterm zone="ch-system-util-linux fsck.minix"><primary sortas="b-fsck.minix">fsck.minix</primary></indexterm>
152 <para id="fsck.minix"><command>fsck.minix</command> performs a consistency check on the
153 Minix file system on the given device.</para>
155 <indexterm zone="ch-system-util-linux getopt"><primary sortas="b-getopt">getopt</primary></indexterm>
156 <para id="getopt"><command>getopt</command> parses options in the given command line.</para>
158 <indexterm zone="ch-system-util-linux hexdump"><primary sortas="b-hexdump">hexdump</primary></indexterm>
159 <para id="hexdump"><command>hexdump</command> dumps the given file in hexadecimal, or
160 in another given format.</para>
162 <indexterm zone="ch-system-util-linux hwclock"><primary sortas="b-hwclock">hwclock</primary></indexterm>
163 <para id="hwclock"><command>hwclock</command> is used to read or set the system's
164 hardware clock, also called the RTC (Real-Time Clock) or BIOS (Basic Input-Output System) clock.</para>
166 <indexterm zone="ch-system-util-linux ipcrm"><primary sortas="b-ipcrm">ipcrm</primary></indexterm>
167 <para id="ipcrm"><command>ipcrm</command> removes the given IPC resource.</para>
169 <indexterm zone="ch-system-util-linux ipcs"><primary sortas="b-ipcs">ipcs</primary></indexterm>
170 <para id="ipcs"><command>ipcs</command> provides IPC status information.</para>
172 <indexterm zone="ch-system-util-linux isosize"><primary sortas="b-isosize">isosize</primary></indexterm>
173 <para id="isosize"><command>isosize</command> reports the size of an iso9660
176 <indexterm zone="ch-system-util-linux line"><primary sortas="b-line">line</primary></indexterm>
177 <para id="line"><command>line</command> copies a single line.</para>
179 <indexterm zone="ch-system-util-linux logger"><primary sortas="b-logger">logger</primary></indexterm>
180 <para id="logger"><command>logger</command> enters the given message into the system
183 <indexterm zone="ch-system-util-linux look"><primary sortas="b-look">look</primary></indexterm>
184 <para id="look"><command>look</command> displays lines that begin with the given
187 <indexterm zone="ch-system-util-linux losetup"><primary sortas="b-losetup">losetup</primary></indexterm>
188 <para id="losetup"><command>losetup</command> is used to set up and control loop devices.</para>
190 <indexterm zone="ch-system-util-linux mcookie"><primary sortas="b-mcookie">mcookie</primary></indexterm>
191 <para id="mcookie"><command>mcookie</command> generates magic cookies, 128-bit random
192 hexadecimal numbers, for xauth.</para>
194 <indexterm zone="ch-system-util-linux mkfs"><primary sortas="b-mkfs">mkfs</primary></indexterm>
195 <para id="mkfs"><command>mkfs</command> is used to build a file system on a device
196 (usually a hard disk partition).</para>
198 <indexterm zone="ch-system-util-linux mkfs.bfs"><primary sortas="b-mkfs.bfs">mkfs.bfs</primary></indexterm>
199 <para id="mkfs.bfs"><command>mkfs.bfs</command> creates an SCO (Santa Cruz Operations) bfs file system.</para>
201 <indexterm zone="ch-system-util-linux mkfs.cramfs"><primary sortas="b-mkfs.cramfs">mkfs.cramfs</primary></indexterm>
202 <para id="mkfs.cramfs"><command>mkfs.cramfs</command> creates a cramfs file system.</para>
204 <indexterm zone="ch-system-util-linux mkfs.minix"><primary sortas="b-mkfs.minix">mkfs.minix</primary></indexterm>
205 <para id="mkfs.minix"><command>mkfs.minix</command> creates a Minix file system.</para>
207 <indexterm zone="ch-system-util-linux mkswap"><primary sortas="b-mkswap">mkswap</primary></indexterm>
208 <para id="mkswap"><command>mkswap</command> initializes the given device or file to be
209 used as a swap area.</para>
211 <indexterm zone="ch-system-util-linux more"><primary sortas="b-more">more</primary></indexterm>
212 <para id="more"><command>more</command> is a filter for paging through text one
213 screen full at a time. But less is much better.</para>
215 <indexterm zone="ch-system-util-linux mount"><primary sortas="b-mount">mount</primary></indexterm>
216 <para id="mount"><command>mount</command> attaches the file system on the given device
217 to a specified directory (thus hiding the contents of that directory) in the file-system tree.</para>
219 <indexterm zone="ch-system-util-linux namei"><primary sortas="b-namei">namei</primary></indexterm>
220 <para id="namei"><command>namei</command> shows the symbolic links in the given
223 <indexterm zone="ch-system-util-linux pg"><primary sortas="b-pg">pg</primary></indexterm>
224 <para id="pg"><command>pg</command> displays a text file one screen full at a
227 <indexterm zone="ch-system-util-linux pivot_root"><primary sortas="b-pivot_root">pivot_root</primary></indexterm>
228 <para id="pivot_root"><command>pivot_root</command> makes the given file system the new
229 root file system of the current process.</para>
231 <indexterm zone="ch-system-util-linux ramsize"><primary sortas="b-ramsize">ramsize</primary></indexterm>
232 <para id="ramsize"><command>ramsize</command> is used to set the size of the
233 RAM disk in a bootable image.</para>
235 <indexterm zone="ch-system-util-linux rdev"><primary sortas="b-rdev">rdev</primary></indexterm>
236 <para id="rdev"><command>rdev</command> is used to query and set the root
237 device and other things in a bootable image.</para>
239 <indexterm zone="ch-system-util-linux readprofile"><primary sortas="b-readprofile">readprofile</primary></indexterm>
240 <para id="readprofile"><command>readprofile</command> reads kernel profiling information.</para>
242 <indexterm zone="ch-system-util-linux rename"><primary sortas="b-rename">rename</primary></indexterm>
243 <para id="rename"><command>rename</command> renames the given files, replacing a given
244 string with another.</para>
246 <indexterm zone="ch-system-util-linux renice"><primary sortas="b-renice">renice</primary></indexterm>
247 <para id="renice"><command>renice</command> is used to alter the priority of running
250 <indexterm zone="ch-system-util-linux rev"><primary sortas="b-rev">rev</primary></indexterm>
251 <para id="rev"><command>rev</command> reverses the lines of a given file.</para>
253 <indexterm zone="ch-system-util-linux rootflags"><primary sortas="b-rootflags">rootflags</primary></indexterm>
254 <para id="rootflags"><command>rootflags</command> is used to set the rootflags
255 in a bootable image.</para>
257 <indexterm zone="ch-system-util-linux script"><primary sortas="b-script">script</primary></indexterm>
258 <para id="script"><command>script</command> makes a typescript of a terminal
259 session, of everything printed to the terminal.</para>
261 <indexterm zone="ch-system-util-linux setfdprm"><primary sortas="b-setfdprm">setfdprm</primary></indexterm>
262 <para id="setfdprm"><command>setfdprm</command> sets user-provided floppy disk
265 <indexterm zone="ch-system-util-linux setsid"><primary sortas="b-setsid">setsid</primary></indexterm>
266 <para id="setsid"><command>setsid</command> runs the given program in a new session.</para>
268 <indexterm zone="ch-system-util-linux setterm"><primary sortas="b-setterm">setterm</primary></indexterm>
269 <para id="setterm"><command>setterm</command> is used to set terminal attributes.</para>
271 <indexterm zone="ch-system-util-linux sfdisk"><primary sortas="b-sfdisk">sfdisk</primary></indexterm>
272 <para id="sfdisk"><command>sfdisk</command> is a disk partition table manipulator.</para>
274 <indexterm zone="ch-system-util-linux swapdev"><primary sortas="b-swapdev">swapdev</primary></indexterm>
275 <para id="swapdev"><command>swapdev</command> is used to set the swap device
276 in a bootable image.</para>
278 <indexterm zone="ch-system-util-linux swapoff"><primary sortas="b-swapoff">swapoff</primary></indexterm>
279 <para id="swapoff"><command>swapoff</command> disables devices and files for paging
282 <indexterm zone="ch-system-util-linux swapon"><primary sortas="b-swapon">swapon</primary></indexterm>
283 <para id="swapon"><command>swapon</command> enables devices and files for paging
286 <indexterm zone="ch-system-util-linux tunelp"><primary sortas="b-tunelp">tunelp</primary></indexterm>
287 <para id="tunelp"><command>tunelp</command> is used to tune the parameters of the
290 <indexterm zone="ch-system-util-linux ul"><primary sortas="b-ul">ul</primary></indexterm>
291 <para id="ul"><command>ul</command> is a filter for translating underscores into
292 escape sequences indicating underlining for the terminal in use.</para>
294 <indexterm zone="ch-system-util-linux umount"><primary sortas="b-umount">umount</primary></indexterm>
295 <para id="umount"><command>umount</command> disconnects a file system from the
296 system's file tree.</para>
298 <indexterm zone="ch-system-util-linux vidmode"><primary sortas="b-vidmode">vidmode</primary></indexterm>
299 <para id="vidmode"><command>vidmode</command> could be used to set the video mode
300 in a bootable image.</para>
302 <indexterm zone="ch-system-util-linux whereis"><primary sortas="b-whereis">whereis</primary></indexterm>
303 <para id="whereis"><command>whereis</command> reports the location of binary, the
304 source, and the manual page for the given command.</para>
306 <indexterm zone="ch-system-util-linux write"><primary sortas="b-write">write</primary></indexterm>
307 <para id="write"><command>write</command> sends a message to the given user,
308 <emphasis>if</emphasis> that user has not disabled such messages.</para>