Command Line Networking Tools

I’ve been using a pair of Raspberry Pi credit card sized computers to set up a basic Network Attached Storage device (NAS) and an XBMC media centre. I bought my Pi’s and cases from ModMyPi.

One Pi is running the standard Raspbian Wheezy Debian image with a large externally powered USB drive connected to it. This forms the NAS storage device. It has some Samba SMB shares set up on it. This means the shares are acessible from other computers on the same network. I can therefore back up to the USB drive on the NAS Pi and transfer media files to it.

The other Pi, the XBMC Pi, which is running Xbian, can access the Samba shares as media sources. Xbian is a stripped-down distro that boots straight to XBMC.

There are any number of tutorials on the web on how to do all of this, so I’m not going to rehash what has already been done elsewhere. But, because the XBMC Pi is connected to a wireless dongle (both systems are running headless, and I ssh onto them) I had to track down a few CLI networking commands to help me sort all of this out. I had a feeling that they might prove useful to others.

Of course, everyone knows about ifconfig. This enumerates the network interfaces and prints out a set of useful information about each one.

ifconfig

ifconfig

Another similar command is iwconfig. This concentrates on the wireless network interfaces and provides a different set of information.

iwconfig

iwconfig

To find your IP address quickly use ip addr.

ip addr

ip_addr

Another useful command to have up your sleeve is findsmb. This enumerates Samba shares on your network. The screenshot below was taken from my laptop in a public library, so there is not much information displayed in it. More details of this command can be found at the Samba.org website. It also shows example output.

findsmb

findsmb

Tags : , ,

One thought on “Command Line Networking Tools”

Leave a Reply

Your email address will not be published. Required fields are marked *