리눅스 프로세스 명령어(linux process command) 1. Environment
1. startup file
1-1 PATH
- setting CWD(current working directory)
PATH=$PATH:.
* .: current working directory
- print path
echo $PATH
1-2 startup file details
-
when bash starts, it reads configuration scripts ‘startup file’
-
Login shell session startup file
| /etc/profile | global configuration |
| ~/.bash_profile | user's configuration |
| ~/.bash_login | when ~/.bash_profile not found |
| ~/.profile | when ~/.bash_profile, ~/.bash_login not found |
- Non-login shell session startup file
| /etc/bash.bashrc | global configuration |
| ~/.bashrc | user's configuration |
1-3 alias
-
command for nickname(alias)
-
invalid when logout -> set in login configuration file
-
both command, pathname can be set
alias nickname="target"
1-4 source
-
changing config file cannot affect right now until restart shell
-
forcing to affect right now
source configfile
2. process command
2-1 terminologies
| process | active entity |
| task | single or multiple process |
| job | collections of job |
therefore, process $\in$ task $\in$ job
- foreground
current task
- background
running behind the scene
if write & in end of command, running in background process
sub-shell: no stdin(keyboard)
to prevent print on the screen: redirect to file
2-2 keystroke with ctrl
| ctrl + c | interrupting |
| ctrl + d | EOF |
| ctrl + h | backspace |
| ctrl + z | stop foreground process and place in background |
2-3 process

ps
usually pipelined with |
* option
| -a | all user process |
| -u | user info |
| -x | all process whether not attached in shell |
| -e | include all running process |
| -f | full string |
| -l | long list |
2-4 top

top
viewing process dynamically
press q to quit
2-5 job

job
showing job ID
2-6 kill
- to kill process
kill PID
- to kill job
kill %jobID
Leave a comment