명령어 설명 예제
ps aux 현재 실행 중인 모든 프로세스 목록 출력 ps aux
ps aux grep <프로세스명> 특정 프로세스 검색
top 실시간 CPU/메모리 사용량과 프로세스 모니터링 top
htop top보다 보기 쉬운 대화형 프로세스 모니터링 (별도 설치 필요) sudo apt install htop htop
kill <PID> 지정한 프로세스 종료 (부드럽게 종료) kill 1234
kill -9 <PID> 지정한 프로세스 강제 종료 (즉시 종료) kill -9 1234
pkill <프로세스명> 이름으로 프로세스 종료 pkill nginx
killall <프로세스명> 같은 이름 프로세스 모두 종료 killall nginx

⚙️ 서비스 관리 (systemctl) 명령어

명령어 설명 예제
sudo systemctl start <서비스명> 서비스 시작 sudo systemctl start nginx
sudo systemctl stop <서비스명> 서비스 중지 sudo systemctl stop nginx
sudo systemctl restart <서비스명> 서비스 재시작 sudo systemctl restart nginx
sudo systemctl reload <서비스명> 서비스 설정 재적용 (재시작 없이) sudo systemctl reload nginx
sudo systemctl status <서비스명> 서비스 상태 및 최근 로그 확인 sudo systemctl status nginx
sudo systemctl enable <서비스명> 부팅 시 자동 시작 설정 sudo systemctl enable nginx
sudo systemctl disable <서비스명> 부팅 시 자동 시작 해제 sudo systemctl disable nginx
sudo systemctl is-active <서비스명> 서비스 활성화 여부 확인 sudo systemctl is-active nginx
sudo systemctl list-units --type=service 실행 중인 서비스 목록 확인 sudo systemctl list-units --type=service

🔍 추가 팁