David Stilson

  Linux Administration

Ubuntu Server How-To's

The top program provides a dynamic real-time view of a running system i.e. actual process activity. By default, it displays the most CPU-intensive tasks running on the server and updates the list every five seconds.

The uptime command can be used to see how long the server has been running. The current time, how long the system has been running, how many users are currently logged on, and the system load averages for the past 1, 5, and 15 minutes.s the list every five seconds.

The uname -a command displays system information including the kernel version.

The ps command will report a snapshot of the current processes. Common switches:

-a -- select all with a tty except session leaders

a -- select all processes on a terminal, including those of other users

-e -- lists information about every process now running

u -- select by effective user ID (supports names)

x -- select processes without controlling ttys

Example: ps aux:

The w command displays information about the users currently on the machine, and their processes.

The free command displays the total amount of free physical,swap memory, and the buffers used by the kernel.

The df command displays information file on disk space usage. The -ah switch is commonly used with the df command.

The iptraf command is a console-based network statistics utility for Linux. It gathers a variety of figures such as TCP connection packet and byte counts, interface statistics and activity indicators, TCP/UDP traffic breakdowns, and LAN station packet and byte counts.

System Monitor
This example is for Ubuntu. However, all Linux distributions have a simular app. Ubuntu's System Monitor displays information on the System, Processes, Resources and the File System.To run type: System Monitor, in dash.

Common Linux file commands

cd -- Change directory

cat -- View the contents of a file

chgrp -- Change group ownership

chmod -- Change file permissions

chown -- Change file ownership

cp -- Copy files

find -- Locate Files

gunzip -- Uncompress files

gzip -- Compress files (GNU zip)

head -- View the first lines of a file

less -- Page through a file

ls -- List files

mkdir -- Create directory

mv -- Rename files

pwd -- Print current directory

rm -- Remove file

rmdir -- Remove directory

which -- Locate commands

zip -- Compress/uncompress files