본문 바로가기

Engineering/__00. Linux

open 된 서비스 찾기 (lsof)

(펌) https://devconnected.com/how-to-flush-dns-cache-on-linux/

 

Finding your local DNS resolver

On most Linux systems, the DNS resolver is either “systemd-resolved” or dnsmasq. In order to know if you are dealing with one or another, you can execute the following command

$ sudo lsof -i :53 -S

Note : so why are we running this command? As DNS runs on port 53, we are looking for the commands associated with the service running on port 53, which is your local DNS resolver or “stub”.

As you can see, on a recent Ubuntu 20.04 distribution, the service listening on port 53 is systemd-resolved. However, if you were to execute this command on Ubuntu 14.04, you would get a different output.

'Engineering > __00. Linux' 카테고리의 다른 글

DISK 검사와 read only mount 조치 법  (0) 2023.03.07
[터미널 단축기]  (0) 2022.10.26
[Sendmail/Postfix]  (0) 2021.08.31
삭제된 파일 복구하기  (0) 2020.06.22
Ubuntu apt 패키지 의존성 문제  (0) 2020.06.22