본문 바로가기

10 Netstat Command Examples

http://www.thegeekstuff.com/2010/03/netstat-command-examples/


내가 찾고자 한 건 9번째 팁!!

- netstat 로 현재 동작을 하고 있는 포트숫자 혹은 process 알아보기

- 특정 포트를 쓰고 있는 프로세스 찾기

http://www.thegeekstuff.com/2010/03/netstat-command-examples/


9. Find out on which port a program is running

# netstat -ap | grep ssh

(Not all processes could be identified, non-owned process info

 will not be shown, you would have to be root to see it all.)

tcp        1      0 dev-db:ssh           101.174.100.22:39213        CLOSE_WAIT  -

tcp        1      0 dev-db:ssh           101.174.100.22:57643        CLOSE_WAIT  -



Find out which process is using a particular port:

# netstat -an | grep ':80'


B로그0간

개발 관련 글과 유용한 정보를 공유하는 공간입니다.