Shell Background 실행 과 Service

Published by onesixx on

Shell명령을 실행하면, 기본적으로 Foreground로 실행되기 때문에,  완료가 되어야 프롬프트가 나타난다.
Background로 실행하기 위해서는 맨 마지막에 “&”를 붙이면된다. 
결과로 pid를 보여주고, 완료되면 메세지를 출력한다.

 

Shell명령을 기본적으로 Background로 실행하도록 만들어 놓은것이 Service다. 
일반적으로 이런 Service는 스크립트로 만들어, /etc/init.d/ 폴더에 둔다.
현재 서비스 목록 보기 

⇒  service --status-all

 프로세스 찾기

⇒  ps aux | grep nginx 

죽이기
-pid

⇒  kill -9 6661

– 이름

⇒  killall httpd

 

 

 

Categories: Ubuntu

onesixx

Blog Owner

Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x