우분투(Linux)에서 DNS 캐시를 삭제하는 명령어를 소개합니다.
1. DNS 캐시 확인
터미널에서 sudo systemd-resolve --statistics
명령어 입력 시, 현재 DNS 캐시된 크기를 알 수 있습니다.
출력 결과에서 Current Cache Size
는 현재 캐시가 얼마나 있는지를 보여줍니다. 삭제 전에 캐시가 얼마나 있는지 확인하고, 캐시 삭제 명령어 입력 후 모두 삭제되었는지 확인해보시면 됩니다.
$ sudo systemd-resolve --statistics
DNSSEC supported by current servers: no
Transactions
Current Transactions: 0
Total Transactions: 5722
Cache
Current Cache Size: 219
Cache Hits: 3506
Cache Misses: 2239
DNSSEC Verdicts
Secure: 0
Insecure: 0
Bogus: 0
Indeterminate: 0
2. DNS 캐시 삭제
터미널에서 sudo systemd-resolve --flush-caches
명령어로 캐시를 삭제할 수 있습니다.
$ sudo systemd-resolve --flush-caches
아래와 같이 statistics를 확인해보면, Current Cache Size: 0
으로 캐시가 삭제된 것을 확인할 수 있습니다.
$ sudo systemd-resolve --statistics
DNSSEC supported by current servers: no
Transactions
Current Transactions: 0
Total Transactions: 5793
Cache
Current Cache Size: 0
Cache Hits: 3548
Cache Misses: 2268
DNSSEC Verdicts
Secure: 0
Insecure: 0
Bogus: 0
Indeterminate: 0
Loading script...
Related Posts
- Ubuntu에서 draw.io 설치하는 방법
- 리눅스 deb 파일 설치
- 우분투에 VMware 설치하기
- [Ubuntu] VMware에서 Windows 11 설치
- Vi/Vim에서 1줄 또는 여러줄 삭제 방법
- Vi/Vim에서 라인 번호 표시하기
- 우분투에서 rar 압축, 압축 풀기
- Ubuntu에서 구글 드라이브 사용하기 (로컬 폴더에 마운트)
- [Ubuntu] apt-cache search, 설치 가능한 패키지 검색
- Ubuntu - DNS 캐시 삭제 방법
- Ubuntu에서 사용할 수 있는 Text Editor 소개
- 우분투(리눅스) - RAM(메모리) 크기 확인
- 우분투에서 시간대(Timezone) 변경하기
- 우분투(리눅스)에서 Atom 텍스트 에디터 설치
- 우분투(리눅스)에서 Microsoft Edge 브라우저 설치
- 우분투(리눅스)에서 Slack 설치
- 우분투(리눅스)에서 Visual Studio Code 설치
- Linux - 파일, 디렉토리 삭제 명령어(rm -rf, rmdir)
- Linux - 파일이 수정된 날짜/시간 확인 방법
- Linux - touch로 파일 생성, 파일의 날짜/시간 변경
- Linux - Node.js로 Html 파일을 로컬 서버에서 실행하기