Search the Catalog
Learning Debian GNU/Linux

Learning Debian GNU/Linux

By Bill McCarty
1st Edition September 1999
1-56592-705-2, Order Number: 7052
360 pages, $34.95 , Includes CD-ROM

Previous: 4.4 Working with Devices Chapter 4
Issuing Linux Commands
Next: 5. Installing and Configuring the X Window System
 

4.5 Useful Linux Programs

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.

4.5.1 Viewing System Information

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

Command

Function

df

Shows the amount of free disk space (in 1K blocks) on each mounted filesystem.

du

Shows the amount of disk space (in 1K blocks) used by the working directory and its subdirectories.

free

Shows memory usage statistics, including total free memory, memory used, physical memory, swap memory, shared memory, and buffers used by the kernel.

ps

Shows the active processes (instances of running programs) associated with this login session. Use the -a option to list all processes.

top

Shows a continually updated display of active processes, and the resources they are using. Type the q key to exit.

uptime

Shows the current time, the amount of time logged in, the number of users logged in, and system load averages.

users

Shows each login session.

w

Shows a summary of system usage, currently logged-in users, and active processes.

who

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).

4.5.2 Using the ae Editor

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# 

ae mydata

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, ^X denotes 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

Figure 4.7: The ae editor

Figure 4.7
Table 4.8: Summary of ae Commands

Command

Description

Ctrl+X I

Read a file into the editor.

Ctrl+X Ctrl+S

Write the current file.

Ctrl+X Ctrl+C

Save current file and exit.

Ctrl+Q

Quit without saving current file.

Ctrl+L

Redraw the screen.


Previous: 4.4 Working with Devices Learning Debian GNU/Linux Next: 5. Installing and Configuring the X Window System
4.4 Working with Devices Book Index 5. Installing and Configuring the X Window System

Back to: Learning Debian GNU/Linux


oreilly.com Home | O'Reilly Bookstores | How to Order | O'Reilly Contacts
International | About O'Reilly | Affiliated Companies | Privacy Policy

© 2001, O'Reilly & Associates, Inc.