A Quick Guide to Essential Networking CommandsPing*
Purpose: Checks network connectivity to a specific host.
*
Syntax: ping [host]
*
Example: ping google.com
*
Output: Displays the round-trip time (RTT) for each packet sent to the host.
Whois*
Purpose: Provides information about a domain name, such as the owner, registrar, and creation date.
*
Syntax: whois [domain]
*
Example: whois google.com
*
Output: Displays detailed information about the domain.
Dig*
Purpose: A flexible DNS lookup tool that can perform various DNS queries.
*
Syntax: dig [domain]
*
Example: dig google.com
*
Output: Shows DNS records for the domain, including A, MX, NS, and CNAME records.
Reverse Lookup*
Purpose: Determines the hostname associated with an IP address.
*
Syntax: dig -x [IP address]
*
Example: dig -x 8.8.8.8
*
Output: Displays the hostname associated with the IP address.
Wget*
Purpose: Downloads files from the internet.
*
Syntax: wget [URL]
*
Example: wget
https://example.com/file.zip*
Output: Downloads the file to the current directory.
Wget-c*
Purpose: Resumes a stopped download.
*
Syntax: wget -c [URL]
*
Example: wget -c
https://example.com/large_file.iso*
Output: Resumes downloading the file from the point where it was interrupted.
Wget-r*
Purpose: Recursively downloads files from a URL, including all linked files.
*
Syntax: wget -r [URL]
*
Example: wget -r
https://example.com/*
Output: Downloads all files and subdirectories from the specified URL.
Curl*
Purpose: A versatile tool for transferring data using various protocols.
*
Syntax: curl [URL]
*
Example: curl
https://example.com*
Output: Displays the web page content in the terminal.
Curl-o*
Purpose: Saves the output of a curl command to a file.
*
Syntax: curl -o [filename] [URL]
*
Example: curl -o index.html
https://example.com*
Output: Saves the web page content to the specified file.
SSH*
Purpose: Securely connects to a remote host.
*
Syntax: ssh [user]@[host]
*
Example: ssh john@example.com
*
Output: Connects to the remote host as the specified user.
SSH-p*
Purpose: Specifies a different port for the SSH connection.
*
Syntax: ssh -p [port] [user]@[host]
*
Example: ssh -p 2222 john@example.com
*
Output: Connects to the remote host using the specified port.
SSH-D*
Purpose: Sets up a local SOCKS proxy for tunneling traffic through the SSH connection.
*
Syntax: ssh -D [port] [user]@[host]
*
Example: ssh -D 1080 john@example.com
*
Output: Sets up a local SOCKS proxy on the specified port.