source: chapter06/util-linux.xml@ c5143c9

6.0
Last change on this file since c5143c9 was 38bb44a, checked in by Gerard Beekmans <gerard@…>, 20 years ago

first round of printed layout fixes

git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/testing/BOOK@4155 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

  • Property mode set to 100644
File size: 20.4 KB
Line 
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">
4 %general-entities;
5]>
6<sect1 id="ch-system-util-linux" role="wrap">
7<title>Util-linux-&util-linux-version;</title>
8<?dbhtml filename="util-linux.html"?>
9
10<indexterm zone="ch-system-util-linux"><primary sortas="a-Util-linux">Util-linux</primary></indexterm>
11
12<sect2 role="package"><title/>
13<para>The Util-linux package contains miscellaneous utility programs. Among
14them are utilities for handling file systems, consoles, partitions, and
15messages.</para>
16
17<segmentedlist>
18<segtitle>&buildtime;</segtitle>
19<segtitle>&diskspace;</segtitle>
20<seglistitem><seg>0.2 SBU</seg><seg>16 MB</seg></seglistitem>
21</segmentedlist>
22
23<segmentedlist>
24<segtitle>Util-linux installation depends on</segtitle>
25<seglistitem><seg>Bash, Binutils, Coreutils,
26Diffutils, GCC, Gettext, Glibc, Grep, Make, Ncurses, Sed, and Zlib</seg></seglistitem>
27</segmentedlist>
28</sect2>
29
30<sect2 role="installation">
31<title>FHS compliance notes</title>
32
33<para>The FHS recommends using the <filename
34class="directory">/var/lib/hwclock</filename> directory instead of the
35usual <filename class="directory">/etc</filename> directory as the
36location for the <filename>adjtime</filename> file. To make the
37<command>hwclock</command> program FHS-compliant, run the
38following:</para>
39
40<screen><userinput>sed -i 's@etc/adjtime@var/lib/hwclock/adjtime@g' \
41 hwclock/hwclock.c
42mkdir -p /var/lib/hwclock</userinput></screen>
43
44</sect2>
45
46<sect2 role="installation">
47<title>Installation of Util-linux</title>
48
49<para>GCC-&gcc-version; miscompiles <command>sfdisk</command> if the
50default optimisation level is used. The following command
51corrects the problem:</para>
52
53<screen><userinput>sed -i -e 's%^include ../MCONFIG%'\
54'&amp;\n\nCFLAGS:=$(CFLAGS) -fno-unit-at-a-time%' fdisk/Makefile</userinput></screen>
55
56<para>Prepare Util-linux for compilation:</para>
57
58<screen><userinput>./configure</userinput></screen>
59
60<para>Compile the package:</para>
61
62<screen><userinput>make HAVE_KILL=yes HAVE_SLN=yes</userinput></screen>
63
64<beginpage/>
65<para>The meaning of the make parameters:</para>
66
67<variablelist>
68<varlistentry>
69<term><parameter>HAVE_KILL=yes</parameter></term>
70<listitem><para>This prevents the
71<command>kill</command> program (already installed by Procps) from being
72built and installed again.</para></listitem>
73</varlistentry>
74
75<varlistentry>
76<term><parameter>HAVE_SLN=yes</parameter></term>
77<listitem><para>This prevents the <command>sln</command> program (a
78statically linked version of <command>ln</command> already installed
79by Glibc) from being built and installed again.</para></listitem>
80</varlistentry>
81</variablelist>
82
83<para>This package does not come with a test suite.</para>
84
85<para>Install the package:</para>
86
87<screen><userinput>make HAVE_KILL=yes HAVE_SLN=yes install</userinput></screen>
88
89</sect2>
90
91<sect2 id="contents-utillinux" role="content"><title>Contents of Util-linux</title>
92
93<segmentedlist>
94<segtitle>Installed programs</segtitle>
95<seglistitem><seg>agetty, arch, blockdev, cal, cfdisk, chkdupexe, col, colcrt,
96colrm, column, ctrlaltdel, cytune, ddate, dmesg, elvtune, fdformat, fdisk,
97fsck.cramfs, fsck.minix, getopt, hexdump, hwclock, ipcrm, ipcs, isosize, line,
98logger, look, losetup, mcookie, mkfs, mkfs.bfs, mkfs.cramfs, mkfs.minix, mkswap,
99more, mount, namei, pg, pivot_root, ramsize (link to rdev), raw, rdev, readprofile,
100rename, renice, rev, rootflags (link to rdev), script, setfdprm, setsid, setterm,
101sfdisk, swapdev, swapoff (link to swapon), swapon, tunelp, ul, umount, vidmode (link to rdev),
102whereis, and write</seg></seglistitem>
103</segmentedlist>
104
105<variablelist><bridgehead renderas="sect3">Short descriptions</bridgehead>
106<?dbfo list-presentation="list"?>
107
108<varlistentry id="agetty">
109<term><command>agetty</command></term>
110<listitem>
111<para>opens a tty port, prompts for a login name,
112and then invokes the <command>login</command> program.</para>
113<indexterm zone="ch-system-util-linux agetty"><primary sortas="b-agetty">agetty</primary></indexterm>
114</listitem>
115</varlistentry>
116
117<varlistentry id="arch">
118<term><command>arch</command></term>
119<listitem>
120<para>reports the machine's architecture.</para>
121<indexterm zone="ch-system-util-linux arch"><primary sortas="b-arch">arch</primary></indexterm>
122</listitem>
123</varlistentry>
124
125<varlistentry id="blockdev">
126<term><command>blockdev</command></term>
127<listitem>
128<para>allows users to call block device ioctls from the command line.</para>
129<indexterm zone="ch-system-util-linux blockdev"><primary sortas="b-blockdev">blockdev</primary></indexterm>
130</listitem>
131</varlistentry>
132
133<varlistentry id="cal">
134<term><command>cal</command></term>
135<listitem>
136<para>displays a simple calendar.</para>
137<indexterm zone="ch-system-util-linux cal"><primary sortas="b-cal">cal</primary></indexterm>
138</listitem>
139</varlistentry>
140
141<varlistentry id="cfdisk">
142<term><command>cfdisk</command></term>
143<listitem>
144<para>manipulates the partition table of the given device.</para>
145<indexterm zone="ch-system-util-linux cfdisk"><primary sortas="b-cfdisk">cfdisk</primary></indexterm>
146</listitem>
147</varlistentry>
148
149<varlistentry id="chkdupexe">
150<term><command>chkdupexe</command></term>
151<listitem>
152<para>finds duplicate executables.</para>
153<indexterm zone="ch-system-util-linux chkdupexe"><primary sortas="b-chkdupexe">chkdupexe</primary></indexterm>
154</listitem>
155</varlistentry>
156
157<varlistentry id="col">
158<term><command>col</command></term>
159<listitem>
160<para>filters out reverse line feeds.</para>
161<indexterm zone="ch-system-util-linux col"><primary sortas="b-col">col</primary></indexterm>
162</listitem>
163</varlistentry>
164
165<varlistentry id="colcrt">
166<term><command>colcrt</command></term>
167<listitem>
168<para>filters <command>nroff</command> output for terminals
169that lack some capabilities, such as overstriking and half-lines.</para>
170<indexterm zone="ch-system-util-linux colcrt"><primary sortas="b-colcrt">colcrt</primary></indexterm>
171</listitem>
172</varlistentry>
173
174<varlistentry id="colrm">
175<term><command>colrm</command></term>
176<listitem>
177<para>filters out the given columns.</para>
178<indexterm zone="ch-system-util-linux colrm"><primary sortas="b-colrm">colrm</primary></indexterm>
179</listitem>
180</varlistentry>
181
182<varlistentry id="column">
183<term><command>column</command></term>
184<listitem>
185<para>formats a given file into multiple columns.</para>
186<indexterm zone="ch-system-util-linux column"><primary sortas="b-column">column</primary></indexterm>
187</listitem>
188</varlistentry>
189
190<varlistentry id="ctrlaltdel">
191<term><command>ctrlaltdel</command></term>
192<listitem>
193<para>sets the function of the Ctrl+Alt+Del key combination to a hard or a
194soft reset.</para>
195<indexterm zone="ch-system-util-linux ctrlaltdel"><primary sortas="b-ctrlaltdel">ctrlaltdel</primary></indexterm>
196</listitem>
197</varlistentry>
198
199<varlistentry id="cytune">
200<term><command>cytune</command></term>
201<listitem>
202<para>tunes the parameters of the serial line drivers for
203Cyclades cards.</para>
204<indexterm zone="ch-system-util-linux cytune"><primary sortas="b-cytune">cytune</primary></indexterm>
205</listitem>
206</varlistentry>
207
208<varlistentry id="ddate">
209<term><command>ddate</command></term>
210<listitem>
211<para>gives the Discordian date or converts the given Gregorian date
212to a Discordian one.</para>
213<indexterm zone="ch-system-util-linux ddate"><primary sortas="b-ddate">ddate</primary></indexterm>
214</listitem>
215</varlistentry>
216
217<varlistentry id="dmesg">
218<term><command>dmesg</command></term>
219<listitem>
220<para>dumps the kernel boot messages.</para>
221<indexterm zone="ch-system-util-linux dmesg"><primary sortas="b-dmesg">dmesg</primary></indexterm>
222</listitem>
223</varlistentry>
224
225<varlistentry id="elvtune">
226<term><command>elvtune</command></term>
227<listitem>
228<para>tunes the performance and interactivity of a block
229device.</para>
230<indexterm zone="ch-system-util-linux elvtune"><primary sortas="b-elvtune">elvtune</primary></indexterm>
231</listitem>
232</varlistentry>
233
234<varlistentry id="fdformat">
235<term><command>fdformat</command></term>
236<listitem>
237<para>low-level formats a floppy disk.</para>
238<indexterm zone="ch-system-util-linux fdformat"><primary sortas="b-fdformat">fdformat</primary></indexterm>
239</listitem>
240</varlistentry>
241
242<varlistentry id="fdisk">
243<term><command>fdisk</command></term>
244<listitem>
245<para>manipulates the partition table of the given device.</para>
246<indexterm zone="ch-system-util-linux fdisk"><primary sortas="b-fdisk">fdisk</primary></indexterm>
247</listitem>
248</varlistentry>
249
250<varlistentry id="fsck.cramfs">
251<term><command>fsck.cramfs</command></term>
252<listitem>
253<para>performs a consistency check on the Cramfs file system on the
254given device.</para>
255<indexterm zone="ch-system-util-linux fsck.cramfs"><primary sortas="b-fsck.cramfs">fsck.cramfs</primary></indexterm>
256</listitem>
257</varlistentry>
258
259<varlistentry id="fsck.minix">
260<term><command>fsck.minix</command></term>
261<listitem>
262<para>performs a consistency check on the Minix file system on the
263given device.</para>
264<indexterm zone="ch-system-util-linux fsck.minix"><primary sortas="b-fsck.minix">fsck.minix</primary></indexterm>
265</listitem>
266</varlistentry>
267
268<varlistentry id="getopt">
269<term><command>getopt</command></term>
270<listitem>
271<para>parses options in the given command line.</para>
272<indexterm zone="ch-system-util-linux getopt"><primary sortas="b-getopt">getopt</primary></indexterm>
273</listitem>
274</varlistentry>
275
276<varlistentry id="hexdump">
277<term><command>hexdump</command></term>
278<listitem>
279<para>dumps the given file in hexadecimal or in another given format.</para>
280<indexterm zone="ch-system-util-linux hexdump"><primary sortas="b-hexdump">hexdump</primary></indexterm>
281</listitem>
282</varlistentry>
283
284<varlistentry id="hwclock">
285<term><command>hwclock</command></term>
286<listitem>
287<para>reads or sets the system's hardware clock, also called
288the Real-Time Clock (RTC)) or Basic Input-Output System (BIOS)
289clock.</para>
290<indexterm zone="ch-system-util-linux hwclock"><primary sortas="b-hwclock">hwclock</primary></indexterm>
291</listitem>
292</varlistentry>
293
294<varlistentry id="ipcrm">
295<term><command>ipcrm</command></term>
296<listitem>
297<para>removes the given Inter-Process Communication (IPC) resource.</para>
298<indexterm zone="ch-system-util-linux ipcrm"><primary sortas="b-ipcrm">ipcrm</primary></indexterm>
299</listitem>
300</varlistentry>
301
302<varlistentry id="ipcs">
303<term><command>ipcs</command></term>
304<listitem>
305<para>provides IPC status information.</para>
306<indexterm zone="ch-system-util-linux ipcs"><primary sortas="b-ipcs">ipcs</primary></indexterm>
307</listitem>
308</varlistentry>
309
310<varlistentry id="isosize">
311<term><command>isosize</command></term>
312<listitem>
313<para>reports the size of an iso9660 file system.</para>
314<indexterm zone="ch-system-util-linux isosize"><primary sortas="b-isosize">isosize</primary></indexterm>
315</listitem>
316</varlistentry>
317
318<varlistentry id="line">
319<term><command>line</command></term>
320<listitem>
321<para>copies a single line.</para>
322<indexterm zone="ch-system-util-linux line"><primary sortas="b-line">line</primary></indexterm>
323</listitem>
324</varlistentry>
325
326<varlistentry id="logger">
327<term><command>logger</command></term>
328<listitem>
329<para>enters the given message into the system log.</para>
330<indexterm zone="ch-system-util-linux logger"><primary sortas="b-logger">logger</primary></indexterm>
331</listitem>
332</varlistentry>
333
334<varlistentry id="look">
335<term><command>look</command></term>
336<listitem>
337<para>displays lines that begin with the given string.</para>
338<indexterm zone="ch-system-util-linux look"><primary sortas="b-look">look</primary></indexterm>
339</listitem>
340</varlistentry>
341
342<varlistentry id="losetup">
343<term><command>losetup</command></term>
344<listitem>
345<para>sets up and controls loop devices.</para>
346<indexterm zone="ch-system-util-linux losetup"><primary sortas="b-losetup">losetup</primary></indexterm>
347</listitem>
348</varlistentry>
349
350<varlistentry id="mcookie">
351<term><command>mcookie</command></term>
352<listitem>
353<para>generates magic cookies (128-bit random hexadecimal numbers) for
354<command>xauth</command>.</para>
355<indexterm zone="ch-system-util-linux mcookie"><primary sortas="b-mcookie">mcookie</primary></indexterm>
356</listitem>
357</varlistentry>
358
359<varlistentry id="mkfs">
360<term><command>mkfs</command></term>
361<listitem>
362<para>builds a file system on a device (usually a hard disk
363partition).</para>
364<indexterm zone="ch-system-util-linux mkfs"><primary sortas="b-mkfs">mkfs</primary></indexterm>
365</listitem>
366</varlistentry>
367
368<varlistentry id="mkfs.bfs">
369<term><command>mkfs.bfs</command></term>
370<listitem>
371<para>creates an Santa Cruz Operations (SCO) bfs file system.</para>
372<indexterm zone="ch-system-util-linux mkfs.bfs"><primary sortas="b-mkfs.bfs">mkfs.bfs</primary></indexterm>
373</listitem>
374</varlistentry>
375
376<varlistentry id="mkfs.cramfs">
377<term><command>mkfs.cramfs</command></term>
378<listitem>
379<para>creates a cramfs file system.</para>
380<indexterm zone="ch-system-util-linux mkfs.cramfs"><primary sortas="b-mkfs.cramfs">mkfs.cramfs</primary></indexterm>
381</listitem>
382</varlistentry>
383
384<varlistentry id="mkfs.minix">
385<term><command>mkfs.minix</command></term>
386<listitem>
387<para>creates a Minix file system.</para>
388<indexterm zone="ch-system-util-linux mkfs.minix"><primary sortas="b-mkfs.minix">mkfs.minix</primary></indexterm>
389</listitem>
390</varlistentry>
391
392<varlistentry id="mkswap">
393<term><command>mkswap</command></term>
394<listitem>
395<para>initializes the given device or file to be used as a swap area.</para>
396<indexterm zone="ch-system-util-linux mkswap"><primary sortas="b-mkswap">mkswap</primary></indexterm>
397</listitem>
398</varlistentry>
399
400<varlistentry id="more">
401<term><command>more</command></term>
402<listitem>
403<para>a filter for paging through text one screen at a time.</para>
404<indexterm zone="ch-system-util-linux more"><primary sortas="b-more">more</primary></indexterm>
405</listitem>
406</varlistentry>
407
408<varlistentry id="mount">
409<term><command>mount</command></term>
410<listitem>
411<para>attaches the file system on the given device to a specified
412directory in the file-system tree.</para>
413<indexterm zone="ch-system-util-linux mount"><primary sortas="b-mount">mount</primary></indexterm>
414</listitem>
415</varlistentry>
416
417<varlistentry id="namei">
418<term><command>namei</command></term>
419<listitem>
420<para>shows the symbolic links in the given pathnames.</para>
421<indexterm zone="ch-system-util-linux namei"><primary sortas="b-namei">namei</primary></indexterm>
422</listitem>
423</varlistentry>
424
425<varlistentry id="pg">
426<term><command>pg</command></term>
427<listitem>
428<para>displays a text file one screen full at a time.</para>
429<indexterm zone="ch-system-util-linux pg"><primary sortas="b-pg">pg</primary></indexterm>
430</listitem>
431</varlistentry>
432
433<varlistentry id="pivot_root">
434<term><command>pivot_root</command></term>
435<listitem>
436<para>makes the given file system the new root file system of the
437current process.</para>
438<indexterm zone="ch-system-util-linux pivot_root"><primary sortas="b-pivot_root">pivot_root</primary></indexterm>
439</listitem>
440</varlistentry>
441
442<varlistentry id="ramsize">
443<term><command>ramsize</command></term>
444<listitem>
445<para>sets the size of the RAM disk in a bootable image.</para>
446<indexterm zone="ch-system-util-linux ramsize"><primary sortas="b-ramsize">ramsize</primary></indexterm>
447</listitem>
448</varlistentry>
449
450<varlistentry id="rdev">
451<term><command>rdev</command></term>
452<listitem>
453<para>queries and sets the root device, among other things, in a
454bootable image.</para>
455<indexterm zone="ch-system-util-linux rdev"><primary sortas="b-rdev">rdev</primary></indexterm>
456</listitem>
457</varlistentry>
458
459<varlistentry id="readprofile">
460<term><command>readprofile</command></term>
461<listitem>
462<para>reads kernel profiling information.</para>
463<indexterm zone="ch-system-util-linux readprofile"><primary sortas="b-readprofile">readprofile</primary></indexterm>
464</listitem>
465</varlistentry>
466
467<varlistentry id="rename">
468<term><command>rename</command></term>
469<listitem>
470<para>renames the given files, replacing a given string with another.</para>
471<indexterm zone="ch-system-util-linux rename"><primary sortas="b-rename">rename</primary></indexterm>
472</listitem>
473</varlistentry>
474
475<varlistentry id="renice">
476<term><command>renice</command></term>
477<listitem>
478<para>alters the priority of running processes.</para>
479<indexterm zone="ch-system-util-linux renice"><primary sortas="b-renice">renice</primary></indexterm>
480</listitem>
481</varlistentry>
482
483<varlistentry id="rev">
484<term><command>rev</command></term>
485<listitem>
486<para>reverses the lines of a given file.</para>
487<indexterm zone="ch-system-util-linux rev"><primary sortas="b-rev">rev</primary></indexterm>
488</listitem>
489</varlistentry>
490
491<varlistentry id="rootflags">
492<term><command>rootflags</command></term>
493<listitem>
494<para>sets the rootflags in a bootable image.</para>
495<indexterm zone="ch-system-util-linux rootflags"><primary sortas="b-rootflags">rootflags</primary></indexterm>
496</listitem>
497</varlistentry>
498
499<varlistentry id="script">
500<term><command>script</command></term>
501<listitem>
502<para>makes a typescript of a terminal session (everything printed to
503the terminal.</para>
504<indexterm zone="ch-system-util-linux script"><primary sortas="b-script">script</primary></indexterm>
505</listitem>
506</varlistentry>
507
508<varlistentry id="setfdprm">
509<term><command>setfdprm</command></term>
510<listitem>
511<para>sets user-provided floppy disk parameters.</para>
512<indexterm zone="ch-system-util-linux setfdprm"><primary sortas="b-setfdprm">setfdprm</primary></indexterm>
513</listitem>
514</varlistentry>
515
516<varlistentry id="setsid">
517<term><command>setsid</command></term>
518<listitem>
519<para>runs the given program in a new session.</para>
520<indexterm zone="ch-system-util-linux setsid"><primary sortas="b-setsid">setsid</primary></indexterm>
521</listitem>
522</varlistentry>
523
524<varlistentry id="setterm">
525<term><command>setterm</command></term>
526<listitem>
527<para>sets terminal attributes.</para>
528<indexterm zone="ch-system-util-linux setterm"><primary sortas="b-setterm">setterm</primary></indexterm>
529</listitem>
530</varlistentry>
531
532<varlistentry id="sfdisk">
533<term><command>sfdisk</command></term>
534<listitem>
535<para>a disk partition table manipulator.</para>
536<indexterm zone="ch-system-util-linux sfdisk"><primary sortas="b-sfdisk">sfdisk</primary></indexterm>
537</listitem>
538</varlistentry>
539
540<varlistentry id="swapdev">
541<term><command>swapdev</command></term>
542<listitem>
543<para>sets the swap device in a bootable image.</para>
544<indexterm zone="ch-system-util-linux swapdev"><primary sortas="b-swapdev">swapdev</primary></indexterm>
545</listitem>
546</varlistentry>
547
548<varlistentry id="swapoff">
549<term><command>swapoff</command></term>
550<listitem>
551<para>disables devices and files for paging and swapping.</para>
552<indexterm zone="ch-system-util-linux swapoff"><primary sortas="b-swapoff">swapoff</primary></indexterm>
553</listitem>
554</varlistentry>
555
556<varlistentry id="swapon">
557<term><command>swapon</command></term>
558<listitem>
559<para>enables devices and files for paging and swapping.</para>
560<indexterm zone="ch-system-util-linux swapon"><primary sortas="b-swapon">swapon</primary></indexterm>
561</listitem>
562</varlistentry>
563
564<varlistentry id="tunelp">
565<term><command>tunelp</command></term>
566<listitem>
567<para>tunes the parameters of the line printer.</para>
568<indexterm zone="ch-system-util-linux tunelp"><primary sortas="b-tunelp">tunelp</primary></indexterm>
569</listitem>
570</varlistentry>
571
572<varlistentry id="ul">
573<term><command>ul</command></term>
574<listitem>
575<para>a filter for translating underscores into
576escape sequences indicating underlining for the terminal in use.</para>
577<indexterm zone="ch-system-util-linux ul"><primary sortas="b-ul">ul</primary></indexterm>
578</listitem>
579</varlistentry>
580
581<varlistentry id="umount">
582<term><command>umount</command></term>
583<listitem>
584<para>disconnects a file system from the system's file tree.</para>
585<indexterm zone="ch-system-util-linux umount"><primary sortas="b-umount">umount</primary></indexterm>
586</listitem>
587</varlistentry>
588
589<varlistentry id="vidmode">
590<term><command>vidmode</command></term>
591<listitem>
592<para>sets the video mode in a bootable image.</para>
593<indexterm zone="ch-system-util-linux vidmode"><primary sortas="b-vidmode">vidmode</primary></indexterm>
594</listitem>
595</varlistentry>
596
597<varlistentry id="whereis">
598<term><command>whereis</command></term>
599<listitem>
600<para>reports the location of binary, the source, and the manual page
601for the given command.</para>
602<indexterm zone="ch-system-util-linux whereis"><primary sortas="b-whereis">whereis</primary></indexterm>
603</listitem>
604</varlistentry>
605
606<varlistentry id="write">
607<term><command>write</command></term>
608<listitem>
609<para>sends a message to the given user
610<emphasis>if</emphasis> that user has not disabled receipt of such messages.</para>
611<indexterm zone="ch-system-util-linux write"><primary sortas="b-write">write</primary></indexterm>
612</listitem>
613</varlistentry>
614</variablelist>
615
616</sect2>
617
618</sect1>
619
Note: See TracBrowser for help on using the repository browser.