List of handy network tools for UNIX-like systems

September 26, 2011

Lately i was tinkering a bit on my local area network. These are the commands i used (they will work on Mac OSX as well as on GNU/Linux):

ifconfig
– to see/edit network interface settings

ping http://www.example.com
– to see if a host is reachable, and with how much latency. http://www.example.com can also be replaced by an ip address.

traceroute http://www.example.com
– to see which and how many hops are between you and the server you’re pinging.

netstat
– show network status (initiated connections)

lsof -i
– show open network sockets

tcpdump -i en0 -w capturefile.pcap -s0
– capture all network traffic on the en0 interface, save in capturefile.pcap. without the -w option, you can monitor the data live.

arp -a
– list all hosts on the local network, currently seen by your client, with ip and MAC addresses

nslookup http://www.example.com
– do a dns request for http://www.example.com

ssh user@hostname
– login to a remote host via a secure shell

scp user@hostname:/home/user/example.txt /home/me/Desktop/
scp /home/me/Desktop/example2.txt user@hostname:/home/user/
– copy the file example.txt on the remote host to my desktop on the local client over ssh.
– copy the file example2.txt on the local machine to the remote host over ssh.

that’s it for now 🙂
Toon

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: