| < Day Day Up > |
There are a number of very useful shell commands that will give you a wealth of information about your system. These commands are useful for either a system administrator monitoring a system or any Linux
|
Command |
Purpose |
Windows Equivalent |
|---|---|---|
|
ps |
This command will list all currently running processes. Any program or daemon is a process. |
No Windows equivalent. |
|
top |
This command lists all currently running processes, whether the user started them or not. It also lists more detail on the processes. |
No Windows equivalent. |
|
ifconfig |
This will list information about network card.your |
The Windows equivalent is ipconfig . |
|
ping |
This command is used to see if you can reach a specific IP address. |
The same command works in Windows. |
|
traceroute |
This command will trace the route to a specific IP address. |
The Windows equivalent is tracert . |
|
finger |
This command is used to get information about a user. |
The same command works in Windows. |
|
who |
This command will tell you all the users currently logged in system. This is useful if your Linux to your machine is being used as a server for an office. |
There is no Windows equivalent. |
|
date |
This command will display the current date and time. |
The same command works in Windows. |
|
|
This command displays the
|
There is no Windows equivalent. |
|
whois |
This command is similar to
finger
and gives information about a
|
There is no Windows equivalent. |
|
env |
This command will list all environmental
|
There is no Windows equivalent. |
|
kill |
This command is used to stop a currently running process. |
There is no Windows equivalent. |
Three of these commands,
ps
,
top
, and
env
, are all
Figure 18.8:
The
ps
command.
The
top
command shows all the processes, even those you did not initiate. Your system starts a number of processes for you. The
top
command also
Figure 18.9:
The
top
command.
| Note |
The PID is a unique identifier for each running process. It stands for Process Identifier. In Windows, every running process is assigned a Windows handle. The Windows handle and the PID are
|
The
top
command provides a lot of information—perhaps too much. It
top > somefile.txt
Then you can
The
env
command provides you with all the current environmental variables. Environmental variables will be specific to a given user. This means that if you run the
env
command while a different user is logged in, you may get different results. Environmental variables cover many aspects of the user’s environment. The home directory, current user, and current history
The
Figure 18.10:
The
env
command.
The kill command is perhaps the simplest command of all. You enter the word kill followed by the process ID (PID). An example is kill 1045 . Be very careful with this command. If you kill a process the system requires, you could cause the system to function improperly or even crash. This is one reason why you don’t want people to log in as root. Only root can kill a system process. If a user is logged in under a user account, he cannot kill a system process.
| < Day Day Up > |