1. Check current programme process
$ ps
or with switchers
$ ps -ax
You will get something similar to this:
PID TTY TIME CMD
3511 pts/1 00:00:00 bash
3514 pts/1 00:00:00 ps
PID is the Process Identification Number. TTY shows which terminal. CMD stands for command.
Linux is real multi-user system, which has got 6 virtual terminals so that 6 user (actually is 7) can login in at the same time. By default, you a login in as TTY0. Press keyboard Ctrl + Alt + F1 (or F1 - F6), monitor shows a black terminal (this is TT1, if you press Ctrl + Alt + F1) asking you type username and password. Switch back to TT0, press Ctrl + Alt + F7.
2. Stop a Process
$ kill -9 3511
(3511 is the PID number)
3. Check Disk Usage
$ df
Filesystem 512-blocks Free %Used Iused %Iused Mounted on
/dev/hd1 16384 15368 7% 136 7% /home
or use du command to find out a folder size:
$ du /home (this will list all the size of files in he folder)
$ du -s /home (this will only state folder size)
if you are in the /home directory for example, the directory can be ignored:
$ du -s (same as above)
4. Check memory Usage
$ free
This shows a static memory usage
$ top
This shows a dynamic memory and CPU usage, including all the programs the system is using.
HELP FULL COMMANDs:
if you want to know about meanings of those "-ax" like swichers, type:
$ [the command] --help (very breif manul)
$ man [the command] (very detailed manul, usually has 9 sections)
$ man [section number] [the command]
eg. $ man 5 ps (ps manual section 5)


0 Comments: