Linux
Command
Library
Basics
Tips
Commands
Network
External IP
$
curl
ifconfig.me
$
dig
+short myip.opendns.com @resolver1.opendns.com
$
netcat
icanhazip.com 80 <<< $'GET / HTTP/1.1\nHost: icanhazip.com\n' |
tail
-n1
Get WiFi password
$
cat
/etc/NetworkManager/system-connections/[SSID] |
grep
psk=
List network interfaces
$
lspci
|
egrep
-i --color 'network|ethernet'
$
ifconfig
-a
$
ip
link show
$
lshw
-class network
$
cat
/proc/net/dev
$
nmcli
device status
Download file
$
wget
[url]
$
curl
-O [url]
$
aria2c
[url]
$
axel
[url]
Get information about domain
$
whois
[ip]
Ping another device
$
ping
[ip]
$
mtr
[ip]
Configure network interface
$
ifconfig
Show the hostname of your box
$
hostname
$
hostnamectl
Trace the path that a packet takes to its destination
$
traceroute
[ip]
$
tracepath
[ip]
Telnet connection
$
telnet
[ip] [port]
DNS lookup and display server answer
$
dig
[ip]
$
nslookup
[ip]
$
host
[ip]
Release IP and get a new one from DHCP
$
dhclient
-r
List open sockets
$
netstat
-l
$
lsof
-i
$
ss
-l
Show routing table
$
ip
route
$
route
Show open ports
$
ss
-tuln
$
netstat
-tuln
Test port connectivity
$
nc
-zv [host] [port]
Show bandwidth usage
$
iftop
$
nethogs
$
vnstat
$
bmon
$
nload
> TERMINAL_GEAR
Curated for the Linux community
Copied to clipboard
> TERMINAL_GEAR
Curated for the Linux community