IPv4 Client Connecting...
IP Address: Searching... (home)
Reverse DNS: -
Provider / ASN: -
IPv6 Client Connecting...
IP Address: Searching... (home)
Reverse DNS: -
Provider / ASN: -
Connection & Security HTTPS
SSL / TLS: Searching...
Protocol: HTTP/1.1
⬅ Back to Notes
/

CLI Commands & Oneliners

📅 Published: 2026-11-15
#cli #bash #terminal #oneliners

CLI Commands & Oneliners

Samling af praktiske terminal-kommandoer og oneliners lige til at kopiere.


Flush DNS Cache

macOS

Ryd lokal DNS-cache og genindlæs mDNSResponder:

BASH
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder

Windows

Kør i Command Prompt (cmd) eller PowerShell:

POWERSHELL
ipconfig /flushdns

Linux (afhængigt af distribution og DNS-service)

#### 1. Ubuntu / Debian (systemd-resolved)
Klassisk kommando:

BASH
sudo systemd-resolve --flush-caches

Nyere Ubuntu (22.04 / 24.04 / 26.04 med resolvectl):

BASH
sudo resolvectl flush-caches

#### 2. NSCD (Name Service Cache Daemon)

BASH
sudo /etc/init.d/nscd restart

#### 3. Dnsmasq

BASH
sudo /etc/init.d/dnsmasq restart

#### 4. BIND (named)

BASH
sudo /etc/init.d/named restart
Copied: