Chapter 2. System and Network Administration OverviewContents:
Common Commands 2.1. Common CommandsFollowing are lists of commonly used system administration commands. 2.1.1. Clocks
2.1.2. Daemons
2.1.3. Hardware
2.1.4. Host Information
2.1.5. Installation
2.1.6. Mail
2.1.7. Managing FilesystemsTo Unix systems, a filesystem is a device (such as a partition) that is formatted to store files. Filesystems can be found on hard drives, floppies, CD-ROMs, or other storage media that permit random access. The exact format and means by which the files are stored are not important; the system provides a common interface for all filesystem types that it recognizes. Under Linux, filesystem types include the Second Extended (ext2) Filesystem, which you probably use to store Linux files. This filesystem was developed primarily for Linux and supports 256-character filenames and 4-terabyte maximum filesystem size. (It is "second" because it is the successor to the extended filesystem type.) Other common filesystem types include the MS-DOS filesystem, which allows files on MS-DOS partitions and floppies to be accessed under Linux, and the ISO 9660 filesystem used by CD-ROMs. The 2.4 kernel adds optional support for an enhanced version of the ext2 filesystem, the Third Extended (ext3) Filesystem. Many Linux distributions ship kernels with this support preconfigured. The ext3 filesystem is essentially an ext2 filesystem with an added journal. Since it is in all other ways identical to the ext2 system, it is both forward and backward compatible with ext2—all ext2 utilities work with ext3 filesystems. When the kernel interacts with an ext3 filesystem, writes to disk are first written to a log or journal before they are written to disk. This slows down writes to the filesystem, but reduces the risk of data corruption in the event of a power outage. It also speeds up reboots after a system unexpectedly loses power. When rebooting with an ext2 filesystem, the fsck utility scans the entire disk to ensure that all data blocks are listed as either used or free, that each data block is claimed by only one file or directory, and that all files are available in the directory tree. When rebooting an ext3 filesystem using a supported kernel, it need only check the journal and complete any tasks that were left uncompleted. To change an ext2 filesystem into an ext3 filesystem, simply add a journal using the tune2fs utility with the -j option on the unmounted device. If the filesystem is listed in /etc/fstab, change its specified filesystem from ext2 to ext3, or auto (mountd will automatically detect the right system). You can specify the level of journaling the kernel should use in the mount options field (or using mount -o). There are three data options:
The last field in the /etc/fstab entry specifies at what point in the boot process the filesystem should be verified with fsck. It should never need to be checked because journaling ensures filesystem integrity. You can set this field to 0. You can also turn off the automatic check of the filesystem that normally occurs every 20th time the system is mounted using tune2fs -i 0 -c 0. Although not covered in this edition of Linux in a Nutshell, Linux supports three other open source journaling filesystems: IBM's Journaled Filesystem (JFS), SGI's Extensible Filesystem (XFS), and the Naming System Venture's Reiser Filesystem (ReiserFS). In some situations these can be faster than ext3. Some Linux distributions use these alternative filesystems by default.
2.1.8. Managing the Kernel
2.1.9. Networking
2.1.10. Printing
2.1.11. Security and System Integrity
2.1.12. Starting and Stopping the System
2.1.13. System Activity and Process ManagementA number of additional commands in Chapter 3 are particularly useful in controlling processes, including kill, killall, killall5, pidof, ps, and who.
2.1.14. Users
2.1.15. Miscellaneous
Copyright © 2003 O'Reilly & Associates. All rights reserved. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|