Determine your current IP address:
ifconfig
Determine your current routing table:
route -n
See which services are listening:
netstat -nlp
Ping a networked system:
ping <destination>
Trace a route:
traceroute -n <destination> # classic udp version tcptraceroute -n <destination> <port> # tcp version on given port
If you're on Fedora/RedHat, you may need to specify -p <port>, unlike on Debian.
Do DNS lookups:
nslookup <whatever> host <whatever> dig <whatever> whois <domain>
See traffic going over a network interface:
sudo tcpdump -ni eth0 # interrupt with <ctrl>-<c>
Connect to a text-oriented service using telnet. The following example illustrates an SMTP command sequence.
telnet smtp.pt.lu 25 helo pt.lu mail from: <test1@pt.lu> rcpt to: <test2@pt.lu> data Subject: test mail To: info@nsa.gov From: alquaida@world.net you won't get us . quit
Use a system via SSH:
ssh user@<remote machine> # open a shell on the remote machine scp user@<remote machine>:/path/to/file ./local/path/ # copies a file from remote to local scp -r ./local/path user@<remote machine>:/path/to/ # copies a directory with contents from local to remote ssh -X user@<remote machine> <command> # execute command on remote machine, redirect graphic display to local machine
Hint: nc or netcat is a swiss-army-knife-network tool. It can e.g. be used in many useful ways.