Skip to content

Networking CLI

Here’s a solid list of commonly used networking commands that IT pros rely on for troubleshooting:

Basic Connectivity & IP Info

  • ping – Test if a host is reachable and measure response time.
  • ipconfig (Windows) / ifconfig (Linux/macOS, older) / ip addr (Linux, newer) – View or configure IP addresses.
  • ipconfig /all – Show detailed network configuration (DNS, MAC, DHCP, etc.).
  • hostname – Show the system’s hostname.

Routing & Path

  • tracert (Windows) / traceroute (Linux/macOS) – Trace the path packets take to a destination.
  • route print (Windows) / netstat -r or ip route (Linux/macOS) – View routing tables.

DNS & Name Resolution

Windows

  • nslookup <domain> – Query DNS records (A, MX, etc.).
  • nslookup <domain> <DNS-server> – Test against a specific DNS server.
  • ipconfig /displaydns – Show contents of the local DNS resolver cache.
  • ipconfig /flushdns – Clear the DNS cache.
  • ping <hostname> – Quick check to confirm if DNS resolves to an IP.
  • tracert <hostname> – Trace the route and confirm resolution.
  • Resolve-DnsName <domain> (PowerShell) – Modern replacement for nslookup, gives detailed record info.

Linux

  • dig <domain> – Query DNS records.
  • dig <domain> @<DNS-server> – Query against a specific DNS server.
  • dig +short <domain> – Compact output (useful for scripts).
  • host <domain> – Simple tool to resolve hostnames to IPs and vice versa.
  • nslookup <domain> – Available on most distros (but less detailed than dig).
  • systemd-resolve <domain> (on systems using systemd) – Query name resolution status.
  • resolvectl query <domain> (newer systemd command) – Check which DNS server was used.
  • ping <hostname> – Verify resolution.

macOS

(macOS shares most commands with Linux, but with some differences.)

  • dig <domain> – Standard DNS queries.
  • host <domain> – Simple resolver.
  • nslookup <domain> – Still available.
  • scutil --dns – Show detailed DNS configuration (servers, search domains).
  • dscacheutil -q host -a name <hostname> – Query macOS DNS and cache.
  • sudo killall -HUP mDNSResponder – Flush DNS cache.
  • ping <hostname> – Confirm resolution.

Active Connections & Ports

  • netstat – Show active connections, listening ports, and routing.
  • ss (Linux, newer) – Faster replacement for netstat to see sockets.
  • lsof -i (Linux/macOS) – List processes using network ports.

Packet Capture & Analysis

  • tcpdump (Linux/macOS) – Capture and analyze network traffic.
  • wireshark (GUI tool, multi-platform) – More detailed traffic analysis.

Other Useful Commands

  • arp -a – Show ARP table (IP-to-MAC mappings).
  • nbtstat (Windows) – Display NetBIOS over TCP/IP info.
  • telnet <host> <port> – Check connectivity to a specific port (simple test).
  • curl or wget – Test HTTP/HTTPS requests, APIs, and web server availability.
  • powershell Test-NetConnection <host> -Port <number> (Windows) – Advanced ping and port testing.

Do you want me to group these into a step-by-step troubleshooting workflow (like “start with ping, then check DNS, then routing”), or just keep them as a reference list?

Bangla News

কী কী স্থানে নিষেধ: পার্ক, সৈকত ও পাবলিক বাগান

স্কুল, শিশু পার্ক, লাইব্রেরি, সুইমিং পুল–এর আশেপাশ

বাস স্টপ, বাস শেল্টার

খেলাধুলা এবং বিনোদন কেন্দ্র

ধূমপান নিষিদ্ধ থাকবে এমন জোনগুলোতে—বিশেষ করে যেখানে শিশুদের যুক্ত হওয়ার সম্ভাবনা আছে ।

উদ্দেশ্য: জনস্বাস্থ্য সুরক্ষা ও দ্বিতীয় ধূমপানের ক্ষতি থেকে রক্ষা

ধূমপানকে “সাধারণ” থেকে “অস্বাভাবিক” হিসেবে অবস্থান করানো

ভবিষ্যতে সুস্থ প্রজন্ম গঠনে সহায়তা

প্রবলেম ফোকাস: ফ্রান্সে এখনও ৩০% প্রাপ্তবয়স্ক এবং ১৫% ১৭‑বছর বয়সী কিশোর-কিশোরী প্রতিদিন ধূমপান করে apnews.com।

মৃত্যুর পরিসংখ্যান: প্রতিদিন প্রায় ২০০ জন, বা বছরে ৭৫,০০০ লোক ধূমপায়ী রোগে প্রাণ হারান ncbi.nlm.nih.gov।

এক্সেপশন: