process
:
Process Types
:
Interactive process
:Batch process
:Daemon
:Threads
:Kernel threads
:Process ID = PID
: OS에서 부여한 Unique ID of a process
Parent Process ID = PPID
: ID of a parent that started this process.
Thread ID = TID
: each thread has a unique TID.
ps
: provides information about running processes
ps
: displays all processes running
ps -ef
: displays all process in the system
ps -eLf
: more info about thread
현재 몇개의 process가 실행되고 있는지 확인하기
pstree
: displays the processes in the form of a tree diagramtop
: kill
: to terminate a process
kill을 test해보기 위해, process 중간에 sleep을 하는 program을 생성하고
sleep하는 동안 kill로 해당 process를 종료시켜볼 것이다.
In Linux, a job
is a command launched from a terminal window(=shell)
Foreground job
: runs directly from the shell.
Background job
:
jobs
: displays all jobs running in the both foreground and background.
fg
and bg
: command to run a job in the background and foreground, repectively.
Managing jobs example :
In Linux(Unix), "Everything is a file".
Filesystem is structured like a tree.
mount
: command is used to attach a filesystem somewhere within the filesystem tree.diff
: is used to compare files and directoriesrsync
: gzip
: The most frequently used Linux compression utilitybzip2
: Produces files significantly smaller than those produced by gzipzip
: Often requried to decompress archives from Windowstar
: is often used to group files in an archive and then compress the whole archive at once