source: chapter06/util-linux.xml@ 9dfc02f

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 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 9dfc02f was 9dfc02f, checked in by Zack Winkles <winkie@…>, 20 years ago

Current BE-LFS (but w/ GCC 3.3.3) merged -> 6.0 branch

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

  • Property mode set to 100644
File size: 16.0 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>Util-linux has issues with the Linux 2.6 kernel series - fix these isues
43by applying the following patch:</para>
44
45<screen><userinput>patch -Np1 -i ../util-linux-&util-linux-version;-kernel-dj-2.6-1.patch</userinput></screen>
46
47<para>Prepare Util-linux for compilation:</para>
48
49<screen><userinput>./configure</userinput></screen>
50
51<para>Compile the package:</para>
52
53<screen><userinput>make HAVE_KILL=yes HAVE_SLN=yes</userinput></screen>
54
55<para>The meaning of the make parameters:</para>
56
57<itemizedlist>
58<listitem><para><userinput>HAVE_KILL=yes</userinput>: This prevents the
59<command>kill</command> program (already installed by Procps) from being
60built and installed again.</para></listitem>
61
62<listitem><para><userinput>HAVE_SLN=yes</userinput>: This prevents the
63<command>sln</command> program (a statically linked
64<command>ln</command> already installed by Glibc) from being built and
65installed again.</para></listitem>
66</itemizedlist>
67
68<para>Now install the package:</para>
69
70<screen><userinput>make HAVE_KILL=yes HAVE_SLN=yes install</userinput></screen>
71
72</sect2>
73
74
75<sect2 id="contents-utillinux"><title>Contents of Util-linux</title>
76
77<para><emphasis>Installed programs</emphasis>: agetty, arch, blockdev, cal,
78cfdisk, chkdupexe, col, colcrt, colrm, column, ctrlaltdel, cytune, ddate,
79dmesg, elvtune, fdformat, fdisk, fsck.cramfs, fsck.minix, getopt, hexdump,
80hwclock, ipcrm, ipcs, isosize, line, logger, look, losetup, mcookie, mkfs,
81mkfs.bfs, mkfs.cramfs, mkfs.minix, mkswap, more, mount, namei, pg, pivot_root,
82ramsize (link to rdev), raw, rdev, readprofile, rename, renice, rev, rootflags
83(link to rdev), script, setfdprm, setsid, setterm, sfdisk, swapoff (link to
84swapon), swapon, tunelp, ul, umount, vidmode (link to rdev), whereis and
85write</para>
86
87</sect2>
88
89<sect2><title>Short descriptions</title>
90
91<indexterm zone="ch-system-util-linux agetty"><primary sortas="b-agetty">agetty</primary></indexterm>
92<para id="agetty"><command>agetty</command> opens a tty port, prompts for a login name,
93and then invokes the login program.</para>
94
95<indexterm zone="ch-system-util-linux arch"><primary sortas="b-arch">arch</primary></indexterm>
96<para id="arch"><command>arch</command> reports the machine's architecture.</para>
97
98<indexterm zone="ch-system-util-linux blockdev"><primary sortas="b-blockdev">blockdev</primary></indexterm>
99<para id="blockdev"><command>blockdev</command> allows you to call block device ioctls
100from the command line.</para>
101
102<indexterm zone="ch-system-util-linux cal"><primary sortas="b-cal">cal</primary></indexterm>
103<para id="cal"><command>cal</command> displays a simple calendar.</para>
104
105<indexterm zone="ch-system-util-linux cfdisk"><primary sortas="b-cfdisk">cfdisk</primary></indexterm>
106<para id="cfdisk"><command>cfdisk</command> is used to manipulate the partition table
107of the given device.</para>
108
109<indexterm zone="ch-system-util-linux chkdupexe"><primary sortas="b-chkdupexe">chkdupexe</primary></indexterm>
110<para id="chkdupexe"><command>chkdupexe</command> finds duplicate executables.</para>
111
112<indexterm zone="ch-system-util-linux col"><primary sortas="b-col">col</primary></indexterm>
113<para id="col"><command>col</command> filters out reverse line feeds.</para>
114
115<indexterm zone="ch-system-util-linux colcrt"><primary sortas="b-colcrt">colcrt</primary></indexterm>
116<para id="colcrt"><command>colcrt</command> is used to filter nroff output for terminals
117that lack some capabilities such as overstriking and half-lines.</para>
118
119<indexterm zone="ch-system-util-linux colrm"><primary sortas="b-colrm">colrm</primary></indexterm>
120<para id="colrm"><command>colrm</command> filters out the given columns.</para>
121
122<indexterm zone="ch-system-util-linux column"><primary sortas="b-column">column</primary></indexterm>
123<para id="column"><command>column</command> formats a given file into multiple
124columns.</para>
125
126<indexterm zone="ch-system-util-linux ctrlaltdel"><primary sortas="b-ctrlaltdel">ctrlaltdel</primary></indexterm>
127<para id="ctrlaltdel"><command>ctrlaltdel</command> sets the function of the Ctrl+Alt+Del
128 key combination to a hard or a soft reset.</para>
129
130<indexterm zone="ch-system-util-linux cytune"><primary sortas="b-cytune">cytune</primary></indexterm>
131<para id="cytune"><command>cytune</command> was used to tune the parameters of the
132serial line drivers for Cyclades cards.</para>
133
134<indexterm zone="ch-system-util-linux ddate"><primary sortas="b-ddate">ddate</primary></indexterm>
135<para id="ddate"><command>ddate</command> gives the Discordian date, or converts the
136given Gregorian date to a Discordian one.</para>
137
138<indexterm zone="ch-system-util-linux dmesg"><primary sortas="b-dmesg">dmesg</primary></indexterm>
139<para id="dmesg"><command>dmesg</command> dumps the kernel boot messages.</para>
140
141<indexterm zone="ch-system-util-linux elvtune"><primary sortas="b-elvtune">elvtune</primary></indexterm>
142<para id="elvtune"><command>elvtune</command> can be used to tune the performance
143and interactivity of a block device.</para>
144
145<indexterm zone="ch-system-util-linux fdformat"><primary sortas="b-fdformat">fdformat</primary></indexterm>
146<para id="fdformat"><command>fdformat</command> low-level formats a floppy disk.</para>
147
148<indexterm zone="ch-system-util-linux fdisk"><primary sortas="b-fdisk">fdisk</primary></indexterm>
149<para id="fdisk"><command>fdisk</command> could be used to manipulate the partition
150table of the given device.</para>
151
152<indexterm zone="ch-system-util-linux fsck.cramfs"><primary sortas="b-fsck.cramfs">fsck.cramfs</primary></indexterm>
153<para id="fsck.cramfs"><command>fsck.cramfs</command> performs a consistency check on the
154Cramfs file system on the given device.</para>
155
156<indexterm zone="ch-system-util-linux fsck.minix"><primary sortas="b-fsck.minix">fsck.minix</primary></indexterm>
157<para id="fsck.minix"><command>fsck.minix</command> performs a consistency check on the
158Minix file system on the given device.</para>
159
160<indexterm zone="ch-system-util-linux getopt"><primary sortas="b-getopt">getopt</primary></indexterm>
161<para id="getopt"><command>getopt</command> parses options in the given command line.</para>
162
163<indexterm zone="ch-system-util-linux hexdump"><primary sortas="b-hexdump">hexdump</primary></indexterm>
164<para id="hexdump"><command>hexdump</command> dumps the given file in hexadecimal, or
165in another given format.</para>
166
167<indexterm zone="ch-system-util-linux hwclock"><primary sortas="b-hwclock">hwclock</primary></indexterm>
168<para id="hwclock"><command>hwclock</command> is used to read or set the system's
169hardware clock, also called the RTC (Real-Time Clock) or BIOS (Basic Input-Output System) clock.</para>
170
171<indexterm zone="ch-system-util-linux ipcrm"><primary sortas="b-ipcrm">ipcrm</primary></indexterm>
172<para id="ipcrm"><command>ipcrm</command> removes the given IPC resource.</para>
173
174<indexterm zone="ch-system-util-linux ipcs"><primary sortas="b-ipcs">ipcs</primary></indexterm>
175<para id="ipcs"><command>ipcs</command> provides IPC status information.</para>
176
177<indexterm zone="ch-system-util-linux isosize"><primary sortas="b-isosize">isosize</primary></indexterm>
178<para id="isosize"><command>isosize</command> reports the size of an iso9660
179file system.</para>
180
181<indexterm zone="ch-system-util-linux line"><primary sortas="b-line">line</primary></indexterm>
182<para id="line"><command>line</command> copies a single line.</para>
183
184<indexterm zone="ch-system-util-linux logger"><primary sortas="b-logger">logger</primary></indexterm>
185<para id="logger"><command>logger</command> enters the given message into the system
186log.</para>
187
188<indexterm zone="ch-system-util-linux look"><primary sortas="b-look">look</primary></indexterm>
189<para id="look"><command>look</command> displays lines that begin with the given
190string.</para>
191
192<indexterm zone="ch-system-util-linux losetup"><primary sortas="b-losetup">losetup</primary></indexterm>
193<para id="losetup"><command>losetup</command> is used to set up and control loop devices.</para>
194
195<indexterm zone="ch-system-util-linux mcookie"><primary sortas="b-mcookie">mcookie</primary></indexterm>
196<para id="mcookie"><command>mcookie</command> generates magic cookies, 128-bit random
197hexadecimal numbers, for xauth.</para>
198
199<indexterm zone="ch-system-util-linux mkfs"><primary sortas="b-mkfs">mkfs</primary></indexterm>
200<para id="mkfs"><command>mkfs</command> is used to build a file system on a device
201(usually a hard disk partition).</para>
202
203<indexterm zone="ch-system-util-linux mkfs.bfs"><primary sortas="b-mkfs.bfs">mkfs.bfs</primary></indexterm>
204<para id="mkfs.bfs"><command>mkfs.bfs</command> creates an SCO (Santa Cruz Operations) bfs file system.</para>
205
206<indexterm zone="ch-system-util-linux mkfs.cramfs"><primary sortas="b-mkfs.cramfs">mkfs.cramfs</primary></indexterm>
207<para id="mkfs.cramfs"><command>mkfs.cramfs</command> creates a cramfs file system.</para>
208
209<indexterm zone="ch-system-util-linux mkfs.minix"><primary sortas="b-mkfs.minix">mkfs.minix</primary></indexterm>
210<para id="mkfs.minix"><command>mkfs.minix</command> creates a Minix file system.</para>
211
212<indexterm zone="ch-system-util-linux mkswap"><primary sortas="b-mkswap">mkswap</primary></indexterm>
213<para id="mkswap"><command>mkswap</command> initializes the given device or file to be
214used as a swap area.</para>
215
216<indexterm zone="ch-system-util-linux more"><primary sortas="b-more">more</primary></indexterm>
217<para id="more"><command>more</command> is a filter for paging through text one
218screen full at a time. But less is much better.</para>
219
220<indexterm zone="ch-system-util-linux mount"><primary sortas="b-mount">mount</primary></indexterm>
221<para id="mount"><command>mount</command> attaches the file system on the given device
222to a specified directory (thus hiding the contents of that directory) in the file-system tree.</para>
223
224<indexterm zone="ch-system-util-linux namei"><primary sortas="b-namei">namei</primary></indexterm>
225<para id="namei"><command>namei</command> shows the symbolic links in the given
226pathnames.</para>
227
228<indexterm zone="ch-system-util-linux pg"><primary sortas="b-pg">pg</primary></indexterm>
229<para id="pg"><command>pg</command> displays a text file one screen full at a
230time.</para>
231
232<indexterm zone="ch-system-util-linux pivot_root"><primary sortas="b-pivot_root">pivot_root</primary></indexterm>
233<para id="pivot_root"><command>pivot_root</command> makes the given file system the new
234root file system of the current process.</para>
235
236<indexterm zone="ch-system-util-linux ramsize"><primary sortas="b-ramsize">ramsize</primary></indexterm>
237<para id="ramsize"><command>ramsize</command> is used to set the size of the
238RAM disk in a bootable image.</para>
239
240<indexterm zone="ch-system-util-linux rdev"><primary sortas="b-rdev">rdev</primary></indexterm>
241<para id="rdev"><command>rdev</command> is used to query and set the root
242device and other things in a bootable image.</para>
243
244<indexterm zone="ch-system-util-linux readprofile"><primary sortas="b-readprofile">readprofile</primary></indexterm>
245<para id="readprofile"><command>readprofile</command> reads kernel profiling information.</para>
246
247<indexterm zone="ch-system-util-linux rename"><primary sortas="b-rename">rename</primary></indexterm>
248<para id="rename"><command>rename</command> renames the given files, replacing a given
249string with another.</para>
250
251<indexterm zone="ch-system-util-linux renice"><primary sortas="b-renice">renice</primary></indexterm>
252<para id="renice"><command>renice</command> is used to alter the priority of running
253processes.</para>
254
255<indexterm zone="ch-system-util-linux rev"><primary sortas="b-rev">rev</primary></indexterm>
256<para id="rev"><command>rev</command> reverses the lines of a given file.</para>
257
258<indexterm zone="ch-system-util-linux rootflags"><primary sortas="b-rootflags">rootflags</primary></indexterm>
259<para id="rootflags"><command>rootflags</command> is used to set the rootflags
260in a bootable image.</para>
261
262<indexterm zone="ch-system-util-linux script"><primary sortas="b-script">script</primary></indexterm>
263<para id="script"><command>script</command> makes a typescript of a terminal
264session, of everything printed to the terminal.</para>
265
266<indexterm zone="ch-system-util-linux setfdprm"><primary sortas="b-setfdprm">setfdprm</primary></indexterm>
267<para id="setfdprm"><command>setfdprm</command> sets user-provided floppy disk
268parameters.</para>
269
270<indexterm zone="ch-system-util-linux setsid"><primary sortas="b-setsid">setsid</primary></indexterm>
271<para id="setsid"><command>setsid</command> runs the given program in a new session.</para>
272
273<indexterm zone="ch-system-util-linux setterm"><primary sortas="b-setterm">setterm</primary></indexterm>
274<para id="setterm"><command>setterm</command> is used to set terminal attributes.</para>
275
276<indexterm zone="ch-system-util-linux sfdisk"><primary sortas="b-sfdisk">sfdisk</primary></indexterm>
277<para id="sfdisk"><command>sfdisk</command> is a disk partition table manipulator.</para>
278
279<indexterm zone="ch-system-util-linux swapdev"><primary sortas="b-swapdev">swapdev</primary></indexterm>
280<para id="swapdev"><command>swapdev</command> is used to set the swap device
281in a bootable image.</para>
282
283<indexterm zone="ch-system-util-linux swapoff"><primary sortas="b-swapoff">swapoff</primary></indexterm>
284<para id="swapoff"><command>swapoff</command> disables devices and files for paging
285and swapping.</para>
286
287<indexterm zone="ch-system-util-linux swapon"><primary sortas="b-swapon">swapon</primary></indexterm>
288<para id="swapon"><command>swapon</command> enables devices and files for paging
289and swapping.</para>
290
291<indexterm zone="ch-system-util-linux tunelp"><primary sortas="b-tunelp">tunelp</primary></indexterm>
292<para id="tunelp"><command>tunelp</command> is used to tune the parameters of the
293line printer.</para>
294
295<indexterm zone="ch-system-util-linux ul"><primary sortas="b-ul">ul</primary></indexterm>
296<para id="ul"><command>ul</command> is a filter for translating underscores into
297escape sequences indicating underlining for the terminal in use.</para>
298
299<indexterm zone="ch-system-util-linux umount"><primary sortas="b-umount">umount</primary></indexterm>
300<para id="umount"><command>umount</command> disconnects a file system from the
301system's file tree.</para>
302
303<indexterm zone="ch-system-util-linux vidmode"><primary sortas="b-vidmode">vidmode</primary></indexterm>
304<para id="vidmode"><command>vidmode</command> could be used to set the video mode
305in a bootable image.</para>
306
307<indexterm zone="ch-system-util-linux whereis"><primary sortas="b-whereis">whereis</primary></indexterm>
308<para id="whereis"><command>whereis</command> reports the location of binary, the
309source, and the manual page for the given command.</para>
310
311<indexterm zone="ch-system-util-linux write"><primary sortas="b-write">write</primary></indexterm>
312<para id="write"><command>write</command> sends a message to the given user,
313<emphasis>if</emphasis> that user has not disabled such messages.</para>
314
315</sect2>
316
317
318
319</sect1>
Note: See TracBrowser for help on using the repository browser.