Learning Debian GNU/LinuxBy Bill McCarty
1st Edition September 1999
1-56592-705-2, Order Number: 7052
360 pages, $34.95 , Includes CD-ROM
This section presents several programs you may find helpful in working with your Linux system. You'll learn several commands that report system status and you'll learn how to use pico, a simple text editor.
Linux provides a number of commands that report system status. The most commonly used commands are shown in Table 4.7. These commands can help you troubleshoot system problems and identify resource bottlenecks. Although each command can be used without options or arguments, each supports options and arguments that let you customize operation and output; consult the appropriate manual page for details.
Table 4.7: Useful System Commands
Shows the amount of free disk space (in 1K blocks) on each mounted filesystem.
Shows the amount of disk space (in 1K blocks) used by the working directory and its subdirectories.
Shows memory usage statistics, including total free memory, memory used, physical memory, swap memory, shared memory, and buffers used by the kernel.
Shows the active processes (instances of running programs) associated with this login session. Use the -a option to list all processes.
Shows a continually updated display of active processes, and the resources they are using. Type the q key to exit.
Shows the current time, the amount of time logged in, the number of users logged in, and system load averages.
Shows each login session.
Shows a summary of system usage, currently logged-in users, and active processes.
Shows the names of users currently logged in, the terminal each is using, the time each has been logged in, and the name of the host from which each logged in (if any).
The ae editor is a simple text editor that you can think of as the Linux equivalent of the Microsoft Windows Notepad accessory. To start ae, simply type ae at the shell prompt; or, if you want to edit a particular file, type ae followed by the name of the file (or the file's path, if the file is not in the working directory). For example, to edit the file mydata, type:root@desktop:/root#
Figure 4.7 shows ae's standard display. At the top of the display is a status line, which shows the name of the file being edited and the current size of the file. If the file has been modified, the status line includes the word Modified. The top half of the display lists the available editing commands. Most of the commands require you to type a control character, so that commands can be distinguished from characters you want to add to the buffer. For example,
^Xdenotes a Ctrl+X. To save the current file, you type a Ctrl+X followed by a Ctrl+S. Typing an ordinary character inserts it at the current cursor position. You can use the cursor keys to move around the display; you can use the delete or backspace key to erase unwanted characters. Table 4.8 summarizes ae's most useful commands
Table 4.8: Summary of ae Commands
Read a file into the editor.
Write the current file.
Save current file and exit.
Quit without saving current file.
Redraw the screen.
Back to: Learning Debian GNU/Linux
© 2001, O'Reilly & Associates, Inc.