Flylib.com

Books Software

 
 
 

16. About System Commands

 < Day Day Up > 

16. About System Commands

Before You Begin

13 Access the Command Line


There are also shell commands that can quickly provide you with information related to your computer system. For example, you can use the df command to view statistics related to your hard drive including the total amount of disk space and the free space available. Other system shell commands can list information related to your computer's memory and swap space and provide a list of processes (programs) that are currently running. Table 3.2 provides a list of some of the shell system commands.

Table 3.2. System Commands

COMMAND

PURPOSE

df

Lists the total disk space, space currently in use, and the free space ( df stands for disk free ).

du

Shows the total amount of disk space in use in the current folder.

free

Shows statistics on current memory and swap file use.

date

Shows the current system time.

ps

Displays a list of currently running processes (programs).

kill

Used to terminate a process. This is a sort of last-ditch effort to kill a program that won't shut down. The syntax is kill process ID .


The system commands provided in Table 3.2 are used to view information about the system. The only "dangerous" command is kill . kill should be used only in cases where you cannot get an application to close in NLD after you have tried all other possibilities. To use kill you must find the process ID for the offending application using the ps command.

Tip

Again, you may wonder why you need to know anything about the command line. It actually provides one of your recourses for troubleshooting when you are having problems with your system. If you are still feeling squeamish about the command line and system commands, check out the System Monitor. This desktop tool allows you to view running processes and usage statistics related to the computer's memory and processor. Select Programs, System Tools, and then System Monitor.


 < Day Day Up > 
 < Day Day Up > 

17. Use System Commands

Before You Begin

13 Access the Command Line

16 About System Commands


A number of system commands are available to the end- user such as df and and du that allow you to view the disk space currently used and the amount of disk space occupied by a particular folder, respectively. These system commands do not require you to be be logged on as root (the superuser administrator account).

Use the df Command

In the GNOME Terminal window, type df at the command line and then press Enter . This shows you the amount of disk space used (and the percentage used) and the amount of free space on the drive (drive meaning volume).

Use the du Command

Use the ls and cd commands to locate one of your folders. Type du and then press Enter . This shows the amount of disk space used in that folder.

Use the free Command

Type free at the command prompt and then press Enter . This shows you memory use and swap file statistics.

17. Use System Commands


Use the ps Command

To view currently running processes, type ps at the command line and press Enter . The number of processes listed depends on what you were running on the NLD desktop before initiating the ps command. Note that a pid or process id is supplied for each running process (process really being synonymous with program). You would use the pid with the kill command to terminate an errant process.

After you have worked with some of the system commands, you can close the terminal window. Type exit and then press Enter to return to the NLD desktop.

Note

The root account (the administrator account) has been mentioned in this chapter and the fact that some NLD settings can be changed only when you know the root password. You can also administer NLD from the command shell, and there are a large number of commands and command utilities available to root. To access the root account at the command line, type su and then press Enter . Type the root password and then press Enter again. If you are really interested in more of the administrative possibilities related to NLD, you may want to check out the book Novell Linux Desktop 9 Administrator's Handbook by Emmett Dulaney.


 < Day Day Up >