source: chapter06/util-linux.xml@ 673b0d8

10.0 10.0-rc1 10.1 10.1-rc1 11.0 11.0-rc1 11.0-rc2 11.0-rc3 11.1 11.1-rc1 11.2 11.2-rc1 11.3 11.3-rc1 12.0 12.0-rc1 12.1 12.1-rc1 6.0 6.1 6.1.1 6.3 6.4 6.5 6.6 6.7 6.8 7.0 7.1 7.2 7.3 7.4 7.5 7.5-systemd 7.6 7.6-systemd 7.7 7.7-systemd 7.8 7.8-systemd 7.9 7.9-systemd 8.0 8.1 8.2 8.3 8.4 9.0 9.1 arm bdubbs/gcc13 ml-11.0 multilib renodr/libudev-from-systemd s6-init trunk v5_1 v5_1_1 xry111/arm64 xry111/arm64-12.0 xry111/clfs-ng xry111/lfs-next xry111/loongarch xry111/loongarch-12.0 xry111/loongarch-12.1 xry111/mips64el xry111/pip3 xry111/rust-wip-20221008 xry111/update-glibc
Last change on this file since 673b0d8 was 673b0d8, checked in by Matthew Burgess <matthew@…>, 20 years ago
  • Merged newxml into HEAD

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

  • Property mode set to 100644
File size: 15.7 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">
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<para>The Util-linux package contains miscellaneous utility programs. Among
13them are utilities for handling file systems, consoles, partitions, and
14messages.</para>
15
16<screen>&buildtime; 0.2 SBU
17&diskspace; 16 MB</screen>
18
19<para>Util-linux installation depends on: Bash, Binutils, Coreutils,
20Diffutils, GCC, Gettext, Glibc, Grep, Make, Ncurses, Sed, Zlib.</para>
21
22
23
24<sect2>
25<title>FHS compliance notes</title>
26
27<para>The FHS recommends that we use <filename>/var/lib/hwclock</filename>,
28instead of the usual <filename>/etc</filename>, as the location for the
29<filename>adjtime</filename> file. To make the <command>hwclock</command>
30program FHS-compliant, run the following:</para>
31
32<screen><userinput>cp hwclock/hwclock.c{,.backup}
33sed 's%etc/adjtime%var/lib/hwclock/adjtime%' \
34 hwclock/hwclock.c.backup &gt; hwclock/hwclock.c
35mkdir -p /var/lib/hwclock</userinput></screen>
36
37</sect2>
38
39<sect2>
40<title>Installation of Util-linux</title>
41
42<para>Prepare Util-linux for compilation:</para>
43
44<screen><userinput>./configure</userinput></screen>
45
46<para>Compile the package:</para>
47
48<screen><userinput>make HAVE_KILL=yes HAVE_SLN=yes</userinput></screen>
49
50<para>The meaning of the make parameters:</para>
51
52<itemizedlist>
53<listitem><para><userinput>HAVE_KILL=yes</userinput>: This prevents the
54<command>kill</command> program (already installed by Procps) from being
55built and installed again.</para></listitem>
56
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
60installed again.</para></listitem>
61</itemizedlist>
62
63<para>Now install the package:</para>
64
65<screen><userinput>make HAVE_KILL=yes HAVE_SLN=yes install</userinput></screen>
66
67</sect2>
68
69
70<sect2 id="contents-utillinux"><title>Contents of Util-linux</title>
71
72<para><emphasis>Installed programs</emphasis>: agetty, arch, blockdev, cal,
73cfdisk, chkdupexe, col, colcrt, colrm, column, ctrlaltdel, cytune, ddate,
74dmesg, elvtune, fdformat, fdisk, fsck.cramfs, fsck.minix, getopt, hexdump,
75hwclock, ipcrm, ipcs, isosize, line, logger, look, losetup, mcookie, mkfs,
76mkfs.bfs, mkfs.cramfs, mkfs.minix, mkswap, more, mount, namei, pg, pivot_root,
77ramsize (link to rdev), raw, rdev, readprofile, rename, renice, rev, rootflags
78(link to rdev), script, setfdprm, setsid, setterm, sfdisk, swapoff (link to
79swapon), swapon, tunelp, ul, umount, vidmode (link to rdev), whereis and
80write</para>
81
82</sect2>
83
84<sect2><title>Short descriptions</title>
85
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,
88and then invokes the login program.</para>
89
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>
92
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
95from the command line.</para>
96
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>
99
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
102of the given device.</para>
103
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>
106
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>
109
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
112that lack some capabilities such as overstriking and half-lines.</para>
113
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>
116
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
119columns.</para>
120
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>
124
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
127serial line drivers for Cyclades cards.</para>
128
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
131given Gregorian date to a Discordian one.</para>
132
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>
135
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
138and interactivity of a block device.</para>
139
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>
142
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
145table of the given device.</para>
146
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
149Cramfs file system on the given device.</para>
150
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
153Minix file system on the given device.</para>
154
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>
157
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
160in another given format.</para>
161
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
164hardware clock, also called the RTC (Real-Time Clock) or BIOS (Basic Input-Output System) clock.</para>
165
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>
168
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>
171
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
174file system.</para>
175
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>
178
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
181log.</para>
182
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
185string.</para>
186
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>
189
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
192hexadecimal numbers, for xauth.</para>
193
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>
197
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>
200
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>
203
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>
206
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
209used as a swap area.</para>
210
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
213screen full at a time. But less is much better.</para>
214
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
217to a specified directory (thus hiding the contents of that directory) in the file-system tree.</para>
218
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
221pathnames.</para>
222
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
225time.</para>
226
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
229root file system of the current process.</para>
230
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
233RAM disk in a bootable image.</para>
234
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
237device and other things in a bootable image.</para>
238
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>
241
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
244string with another.</para>
245
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
248processes.</para>
249
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>
252
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
255in a bootable image.</para>
256
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
259session, of everything printed to the terminal.</para>
260
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
263parameters.</para>
264
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>
267
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>
270
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>
273
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
276in a bootable image.</para>
277
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
280and swapping.</para>
281
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
284and swapping.</para>
285
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
288line printer.</para>
289
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
292escape sequences indicating underlining for the terminal in use.</para>
293
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
296system's file tree.</para>
297
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
300in a bootable image.</para>
301
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
304source, and the manual page for the given command.</para>
305
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>
309
310</sect2>
311
312
313
314</sect1>
Note: See TracBrowser for help on using the repository browser.