⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 util-linux.html

📁 lfs3.1 从源代码构建linux。html版本。
💻 HTML
字号:
<HTML><HEAD><TITLE>Installing Util-linux-2.11m</TITLE><METANAME="GENERATOR"CONTENT="Modular DocBook HTML Stylesheet Version 1.63"><LINKREL="HOME"TITLE="Linux From Scratch"HREF="../index.html"><LINKREL="UP"TITLE="Installing basic system software"HREF="../chapter06/chapter06.html"><LINKREL="PREVIOUS"TITLE="Installing Textutils-2.0"HREF="../chapter06/textutils.html"><LINKREL="NEXT"TITLE="Removing old NSS library files"HREF="../chapter06/removeoldnss.html"></HEAD><BODYCLASS="sect1"BGCOLOR="#FFFFFF"TEXT="#000000"LINK="#0000FF"VLINK="#840084"ALINK="#0000FF"><DIVCLASS="NAVHEADER"><TABLEWIDTH="100%"BORDER="0"CELLPADDING="0"CELLSPACING="0"><TR><THCOLSPAN="3"ALIGN="center">Linux From Scratch: Version 3.1</TH></TR><TR><TDWIDTH="10%"ALIGN="left"VALIGN="bottom"><AHREF="../chapter06/textutils.html">Prev</A></TD><TDWIDTH="80%"ALIGN="center"VALIGN="bottom">Chapter 6. Installing basic system software</TD><TDWIDTH="10%"ALIGN="right"VALIGN="bottom"><AHREF="../chapter06/removeoldnss.html">Next</A></TD></TR></TABLE><HRALIGN="LEFT"WIDTH="100%"></DIV><DIVCLASS="sect1"><H1CLASS="sect1"><ANAME="ch06-utillinux">6.54. Installing Util-linux-2.11m</A></H1><TABLEBORDER="0"BGCOLOR="#E0E0E0"WIDTH="100%"><TR><TD><FONTCOLOR="#000000"><PRECLASS="screen">Estimated build time:           1 minuteEstimated required disk space:  9 MB</PRE></FONT></TD></TR></TABLE><DIVCLASS="sect2"><H2CLASS="sect2"><ANAME="AEN3887">6.54.1. FHS compliance notes</A></H2><P>The FHS recommends that we use /var/lib/hwclock as the location of the adjtime file, instead of the usual /etc. To make hwclock, which is part of theutil-linux package, FHS-compliant, run the following.</P><P><TABLEBORDER="0"BGCOLOR="#E0E0E0"WIDTH="100%"><TR><TD><FONTCOLOR="#000000"><PRECLASS="screen"><TTCLASS="userinput"><B>cp hwclock/hwclock.c hwclock/hwclock.c.backup &#38;&#38;sed 's%etc/adjtime%var/lib/hwclock/adjtime%' \牋爃wclock/hwclock.c &#62; tmp~ &#38;&#38;mv tmp~ hwclock/hwclock.c &#38;&#38;mkdir -p /var/lib/hwclock</B></TT></PRE></FONT></TD></TR></TABLE></P></DIV><DIVCLASS="sect2"><H2CLASS="sect2"><ANAME="AEN3893">6.54.2. Installation of Util-Linux</A></H2><P>Install Util-Linux by running the following commands:</P><P><TABLEBORDER="0"BGCOLOR="#E0E0E0"WIDTH="100%"><TR><TD><FONTCOLOR="#000000"><PRECLASS="screen"><TTCLASS="userinput"><B>./configure &#38;&#38;make HAVE_SLN=yes ADD_RAW=yes &#38;&#38;make HAVE_SLN=yes ADD_RAW=yes install</B></TT></PRE></FONT></TD></TR></TABLE></P></DIV><DIVCLASS="sect2"><H2CLASS="sect2"><ANAME="AEN3899">6.54.3. Command explanations</A></H2><P><TTCLASS="userinput"><B>HAVE_SLN=yes</B></TT>: We don't build this program because it already was installed by Glibc.</P></DIV><DIVCLASS="sect2"><H2CLASS="sect2"><ANAME="AEN3903">6.54.4. Contents</A></H2><P>The Util-linux package contains the agetty, arch, blockdev, cal, cfdisk, chkdupexe, col, colcrt, colrm, column, ctrlaltdel, cytune, ddate, dmesg, elvtune, fdformat, fdisk, fsck.minix, getopt, hexdump, hwclock, ipcrm, ipcs, kill, logger, look, losetup, mcookie, mkfs, mkfs.bfs, mkfs.minix, mkswap, more, mount, namei,umount, ramsize, rdev, readprofile, rename, renice, rev, rootflags,script, setfdprm, setsid, setterm, sfdisk, swapdev, swapoff, swapon, tunelp, ul, vidmode, whereis, and write programs.</P></DIV><DIVCLASS="sect2"><H2CLASS="sect2"><ANAME="AEN3906">6.54.5. Description</A></H2><DIVCLASS="sect3"><H3CLASS="sect3"><ANAME="AEN3908">6.54.5.1. agetty</A></H3><P>agetty opens a tty port, prompts for a login name and invokes the/bin/login command.</P></DIV><DIVCLASS="sect3"><H3CLASS="sect3"><ANAME="AEN3911">6.54.5.2. arch</A></H3><P>arch prints the machine architecture.</P></DIV><DIVCLASS="sect3"><H3CLASS="sect3"><ANAME="AEN3914">6.54.5.3. blockdev</A></H3><P>blockdev allows to call block device ioctls from the command line</P></DIV><DIVCLASS="sect3"><H3CLASS="sect3"><ANAME="AEN3917">6.54.5.4. cal</A></H3><P>cal displays a simple calender.</P></DIV><DIVCLASS="sect3"><H3CLASS="sect3"><ANAME="AEN3920">6.54.5.5. cfdisk</A></H3><P>cfdisk is an libncurses based disk partition table manipulator.</P></DIV><DIVCLASS="sect3"><H3CLASS="sect3"><ANAME="AEN3923">6.54.5.6. chkdupexe</A></H3><P>chkdupexe finds duplicate executables.</P></DIV><DIVCLASS="sect3"><H3CLASS="sect3"><ANAME="AEN3926">6.54.5.7. col</A></H3><P>col filters reverse line feeds from input.</P></DIV><DIVCLASS="sect3"><H3CLASS="sect3"><ANAME="AEN3929">6.54.5.8. colcrt</A></H3><P>colcrt filters nroff output for CRT previewing.</P></DIV><DIVCLASS="sect3"><H3CLASS="sect3"><ANAME="AEN3932">6.54.5.9. colrm</A></H3><P>colrm removes columns from a file.</P></DIV><DIVCLASS="sect3"><H3CLASS="sect3"><ANAME="AEN3935">6.54.5.10. column</A></H3><P>column columnates lists.</P></DIV><DIVCLASS="sect3"><H3CLASS="sect3"><ANAME="AEN3938">6.54.5.11. ctrlaltdel</A></H3><P>ctrlaltdel sets the function of the CTRL+ALT+DEL key combination (hardor soft reset).</P></DIV><DIVCLASS="sect3"><H3CLASS="sect3"><ANAME="AEN3941">6.54.5.12. cytune</A></H3><P>cytune queries and modifies the interruption threshold for the Cycladesdriver.</P></DIV><DIVCLASS="sect3"><H3CLASS="sect3"><ANAME="AEN3944">6.54.5.13. ddate</A></H3><P>ddate converts Gregorian dates to Discordian dates.</P></DIV><DIVCLASS="sect3"><H3CLASS="sect3"><ANAME="AEN3947">6.54.5.14. dmesg</A></H3><P>dmesg is used to examine or control the kernel ring buffer (bootmessages from the kernel).</P></DIV><DIVCLASS="sect3"><H3CLASS="sect3"><ANAME="AEN3950">6.54.5.15. elvtune</A></H3><P>elvtune allows to tune the I/O elevator per block device queue basis.</P></DIV><DIVCLASS="sect3"><H3CLASS="sect3"><ANAME="AEN3953">6.54.5.16. fdformat</A></H3><P>fdformat low-level formats a floppy disk.</P></DIV><DIVCLASS="sect3"><H3CLASS="sect3"><ANAME="AEN3956">6.54.5.17. fdisk</A></H3><P>fdisk is a disk partition table manipulator.</P></DIV><DIVCLASS="sect3"><H3CLASS="sect3"><ANAME="AEN3959">6.54.5.18. fsck.minix</A></H3><P>fsck.minix performs a consistency check for the Linux MINIX filesystem.</P></DIV><DIVCLASS="sect3"><H3CLASS="sect3"><ANAME="AEN3962">6.54.5.19. getopt</A></H3><P>getops parses command options the same way as the getopt Ccommand.</P></DIV><DIVCLASS="sect3"><H3CLASS="sect3"><ANAME="AEN3965">6.54.5.20. hexdump</A></H3><P>hexdump displays specified files, or standard input, in a user specifiedformat (ascii, decimal, hexadecimal, octal).</P></DIV><DIVCLASS="sect3"><H3CLASS="sect3"><ANAME="AEN3968">6.54.5.21. hwclock</A></H3><P>hwclock queries and sets the hardware clock (Also called the RTC or BIOSclock).</P></DIV><DIVCLASS="sect3"><H3CLASS="sect3"><ANAME="AEN3971">6.54.5.22. ipcrm</A></H3><P>ipcrm removes a specified resource.</P></DIV><DIVCLASS="sect3"><H3CLASS="sect3"><ANAME="AEN3974">6.54.5.23. ipcs</A></H3><P>ipcs provides information on IPC facilities.</P></DIV><DIVCLASS="sect3"><H3CLASS="sect3"><ANAME="AEN3977">6.54.5.24. kill</A></H3><P>kill sends a specified signal to the specified process.</P></DIV><DIVCLASS="sect3"><H3CLASS="sect3"><ANAME="AEN3980">6.54.5.25. logger</A></H3><P>logger makes entries in the system log.</P></DIV><DIVCLASS="sect3"><H3CLASS="sect3"><ANAME="AEN3983">6.54.5.26. look</A></H3><P>look displays lines beginning with a given string.</P></DIV><DIVCLASS="sect3"><H3CLASS="sect3"><ANAME="AEN3986">6.54.5.27. losetup</A></H3><P>losetup sets up and controls loop devices.</P></DIV><DIVCLASS="sect3"><H3CLASS="sect3"><ANAME="AEN3989">6.54.5.28. mcookie</A></H3><P>mcookie generates magic cookies for xauth.</P></DIV><DIVCLASS="sect3"><H3CLASS="sect3"><ANAME="AEN3992">6.54.5.29. mkfs</A></H3><P>mkfs builds a Linux filesystem on a device, usually a harddiskpartition.</P></DIV><DIVCLASS="sect3"><H3CLASS="sect3"><ANAME="AEN3995">6.54.5.30. mkfs.bfs</A></H3><P>mkfs.bfs creates a SCO bfs file system on a device, usually a harddiskpartition.</P></DIV><DIVCLASS="sect3"><H3CLASS="sect3"><ANAME="AEN3998">6.54.5.31. mkfs.minix</A></H3><P>mkfs.minix creates a Linux MINIX filesystem on a device, usually aharddisk partition.</P></DIV><DIVCLASS="sect3"><H3CLASS="sect3"><ANAME="AEN4001">6.54.5.32. mkswap</A></H3><P>mkswap sets up a Linux swap area on a device or in a file.</P></DIV><DIVCLASS="sect3"><H3CLASS="sect3"><ANAME="AEN4004">6.54.5.33. more</A></H3><P>more is a filter for paging through text one screen full at atime.</P></DIV><DIVCLASS="sect3"><H3CLASS="sect3"><ANAME="AEN4007">6.54.5.34. mount</A></H3><P>mount mounts a filesystem from a device to a directory (mount point).</P></DIV><DIVCLASS="sect3"><H3CLASS="sect3"><ANAME="AEN4010">6.54.5.35. namei</A></H3><P>namei follows a pathname until a terminal point is found.</P></DIV><DIVCLASS="sect3"><H3CLASS="sect3"><ANAME="AEN4013">6.54.5.36. umount</A></H3><P>umount unmounts a mounted filesystem.</P></DIV><DIVCLASS="sect3"><H3CLASS="sect3"><ANAME="AEN4016">6.54.5.37. ramsize</A></H3><P>ramsize queries and sets RAM disk size.</P></DIV><DIVCLASS="sect3"><H3CLASS="sect3"><ANAME="AEN4019">6.54.5.38. rdev</A></H3><P>rdev queries and sets image root device, swap device, RAM disk size, orvideo mode.</P></DIV><DIVCLASS="sect3"><H3CLASS="sect3"><ANAME="AEN4022">6.54.5.39. readprofile</A></H3><P>readprofile reads kernel profiling information.</P></DIV><DIVCLASS="sect3"><H3CLASS="sect3"><ANAME="AEN4025">6.54.5.40. rename</A></H3><P>rename renames files.</P></DIV><DIVCLASS="sect3"><H3CLASS="sect3"><ANAME="AEN4028">6.54.5.41. renice</A></H3><P>renice alters priority of running processes.</P></DIV><DIVCLASS="sect3"><H3CLASS="sect3"><ANAME="AEN4031">6.54.5.42. rev</A></H3><P>rev reverses lines of a file.</P></DIV><DIVCLASS="sect3"><H3CLASS="sect3"><ANAME="AEN4034">6.54.5.43. rootflags</A></H3><P>rootflags queries and sets extra information used when mounting root.</P></DIV><DIVCLASS="sect3"><H3CLASS="sect3"><ANAME="AEN4037">6.54.5.44. script</A></H3><P>script makes typescript of terminal session.</P></DIV><DIVCLASS="sect3"><H3CLASS="sect3"><ANAME="AEN4040">6.54.5.45. setfdprm</A></H3><P>setfdprm sets user-provides floppy disk parameters.</P></DIV><DIVCLASS="sect3"><H3CLASS="sect3"><ANAME="AEN4043">6.54.5.46. setsid</A></H3><P>setsid runs programs in a new session.</P></DIV><DIVCLASS="sect3"><H3CLASS="sect3"><ANAME="AEN4046">6.54.5.47. setterm</A></H3><P>setterm sets terminal attributes.</P></DIV><DIVCLASS="sect3"><H3CLASS="sect3"><ANAME="AEN4049">6.54.5.48. sfdisk</A></H3><P>sfdisk is a disk partition table manipulator.</P></DIV><DIVCLASS="sect3"><H3CLASS="sect3"><ANAME="AEN4052">6.54.5.49. swapdev</A></H3><P>swapdev queries and sets swap device.</P></DIV><DIVCLASS="sect3"><H3CLASS="sect3"><ANAME="AEN4055">6.54.5.50. swapoff</A></H3><P>swapoff disables devices and files for paging and swapping.</P></DIV><DIVCLASS="sect3"><H3CLASS="sect3"><ANAME="AEN4058">6.54.5.51. swapon</A></H3><P>swapon enables devices and files for paging and swapping.</P></DIV><DIVCLASS="sect3"><H3CLASS="sect3"><ANAME="AEN4061">6.54.5.52. tunelp</A></H3><P>tunelp sets various parameters for the LP device.</P></DIV><DIVCLASS="sect3"><H3CLASS="sect3"><ANAME="AEN4064">6.54.5.53. ul</A></H3><P>ul reads a file and translates occurrences of underscores to the sequencewhich indicates underlining for the terminal in use.</P></DIV><DIVCLASS="sect3"><H3CLASS="sect3"><ANAME="AEN4067">6.54.5.54. vidmode</A></H3><P>vidmode queries and sets the video mode.</P></DIV><DIVCLASS="sect3"><H3CLASS="sect3"><ANAME="AEN4070">6.54.5.55. whereis</A></H3><P>whereis locates a binary, source and manual page for a command.</P></DIV><DIVCLASS="sect3"><H3CLASS="sect3"><ANAME="AEN4073">6.54.5.56. write</A></H3><P>write sends a message to another user.</P></DIV></DIV><DIVCLASS="sect2"><H2CLASS="sect2"><ANAME="AEN4076">6.54.6. Dependencies</A></H2><P>Util-linux-2.11h needs the following to be installed:</P><PCLASS="literallayout"><br>sh&nbsp;from&nbsp;the&nbsp;bash&nbsp;package<br><br>as&nbsp;from&nbsp;the&nbsp;binutils&nbsp;package<br>ld&nbsp;from&nbsp;the&nbsp;binutils&nbsp;package<br><br>chgrp&nbsp;from&nbsp;the&nbsp;fileutils&nbsp;package<br>chmod&nbsp;from&nbsp;the&nbsp;fileutils&nbsp;package<br>cp&nbsp;from&nbsp;the&nbsp;fileutils&nbsp;package<br>install	from&nbsp;the&nbsp;fileutils&nbsp;package<br>ln&nbsp;from&nbsp;the&nbsp;fileutils&nbsp;package<br>mkdir&nbsp;from&nbsp;the&nbsp;fileutils&nbsp;package<br>mv&nbsp;from&nbsp;the&nbsp;fileutils&nbsp;package<br>rm&nbsp;from&nbsp;the&nbsp;fileutils&nbsp;package<br><br>cc&nbsp;from&nbsp;the&nbsp;gcc&nbsp;package<br>cpp&nbsp;from&nbsp;the&nbsp;gcc&nbsp;package<br><br>rpcgen&nbsp;from&nbsp;the&nbsp;glibc&nbsp;package<br><br>grep&nbsp;from&nbsp;the&nbsp;grep&nbsp;package<br><br>make&nbsp;from&nbsp;the&nbsp;make&nbsp;package<br><br>sed&nbsp;from&nbsp;the&nbsp;sed&nbsp;package<br><br>unam&nbsp;	from&nbsp;the&nbsp;sh-utils&nbsp;package<br>whoami&nbsp;from&nbsp;the&nbsp;sh-utils&nbsp;package<br><br>cat&nbsp;from&nbsp;the&nbsp;textutils&nbsp;package<br></P></DIV></DIV><DIVCLASS="NAVFOOTER"><HRALIGN="LEFT"WIDTH="100%"><TABLEWIDTH="100%"BORDER="0"CELLPADDING="0"CELLSPACING="0"><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top"><AHREF="../chapter06/textutils.html">Prev</A></TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="../index.html">Home</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top"><AHREF="../chapter06/removeoldnss.html">Next</A></TD></TR><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top">Installing Textutils-2.0</TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="../chapter06/chapter06.html">Up</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top">Removing old NSS library files</TD></TR></TABLE></DIV></BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -