# Killport - 특정 포트 에서 실행중인 프로세스를 죽이는 CLI툴

> Clean Markdown view of GeekNews topic #9118. Use the original source for factual precision when an external source URL is present.

## Metadata

- GeekNews HTML: [https://news.hada.io/topic?id=9118](https://news.hada.io/topic?id=9118)
- GeekNews Markdown: [https://news.hada.io/topic/9118.md](https://news.hada.io/topic/9118.md)
- Type: news
- Author: [xguru](https://news.hada.io/@xguru)
- Published: 2023-05-06T10:36:02+09:00
- Updated: 2023-05-06T10:36:02+09:00
- Original source: [github.com/jkfran](https://github.com/jkfran/killport)
- Points: 26
- Comments: 7

## Topic Body

- 특정 포트에서 리스닝 하고 있는 프로세스를 찾아서 죽여주는 도구   
- Linux/macOS 지원   
- 여러개의 포트에 대해서 동시 실행 가능 `killport 8045 8046 8080`  
- Rust 오픈소스

## Comments



### Comment 16116

- Author: zungta
- Created: 2023-05-17T15:40:02+09:00
- Points: 1

직관적인 명령어로 간단히 할 수 있다는 게 좋은 것 같네요.

### Comment 15981

- Author: kayws426
- Created: 2023-05-08T18:13:39+09:00
- Points: 1

RIIR 에 의미가 있는것이 아닐까 추정합니다...

### Comment 15973

- Author: eususu
- Created: 2023-05-08T15:10:47+09:00
- Points: 1

터미널을 잘 안쓰시는 사람이 많아지는구나 라는 생각이 드네요.

### Comment 15950

- Author: ikkoz
- Created: 2023-05-08T00:20:48+09:00
- Points: 2

~/.bashrc 마지막에 이런걸 만들어주면 굳이 설치하지 않아도...  
  
```  
killport() {  
  if [ $# -ne 0 ]; then  
    for port in "$@"; do  
      pids=$(lsof -ti ":$port")  
      if [ -n "$pids" ]; then  
        echo "Processes listening on port $port: $pids"  
        echo "$pids" | xargs kill -9 >/dev/null 2>&1  
        echo "Processes listening on port $port have been terminated"  
      else  
        echo "No process found listening on port $port"  
      fi  
    done  
  else  
    echo "No arguments provided"  
  fi  
}  
```

### Comment 15946

- Author: yongjin0802
- Created: 2023-05-06T22:54:17+09:00
- Points: 1

`lsof -t -i TCP:8080 | xargs kill -9`  
  
가끔 VS Code 터미널에 켜둔 웹팩 서버가 안 꺼질 때가 있어서  
위의 쉘 명령어 입력해서 프로세스 종료하는데요  
  
이런 유틸도 있었군요 😮

### Comment 15945

- Author: p6tth7sg6ixkajsg3mic
- Created: 2023-05-06T20:44:28+09:00
- Points: 1

와우 너무 좋네요 !!!

### Comment 15943

- Author: roxie
- Created: 2023-05-06T14:45:02+09:00
- Points: 1

솔직히 왜 1.1k stars 인지 모르겠어요
