Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

Linux Network Commands

Displays all network interfaces and


ip addr show
their information.

ip address add 192.168.0.1/24 Assigns IP address 192.168.0.1 to


dev eth0 interface eth0.

Shows network interfaces and their


ifconfig
configuration.

Sends ICMP packets, measures round-


ping host
trip time to "host".

Retrieves and displays domain's


whois domain
registration information.

Queries DNS, provides domain's DNS


dig domain
information.

Resolves IP address to hostname,


dig -x host
shows DNS information.

Performs an IP lookup for the domain


host google.com
name

wget file_path Downloads file from specified path.

netstat Displays various network-related


information and statistics.

Compression/Archives Commands
tar -cf backup.tar Creates a tar archive of /home/ubuntu
/home/ubuntu directory.

tar -xf backup.tar Extracts files from "backup.tar" archive.

tar -zcvf backup.tar.gz Creates compressed "backup.tar.gz"


/home/ubuntu archive of "/home/ubuntu"

Compresses "file1" into "file1.gz", original


gzip file1
is removed.

You might also like