source: chapter06/util-linux.xml@ 1dc34de7

6.0
Last change on this file since 1dc34de7 was ef13657, checked in by Gerard Beekmans <gerard@…>, 20 years ago

Completed global edits for upcoming 6.0 release

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