Setting up a Headless Raspberry Pi:Part 2

So, now you have connected your pi to either your router, network or computer. Plug in the power supply and turn it on. You now have a working Raspberry Pi (HEADLESS!!) Let’s configure it. The first thing that we need to do is find the IP address of the raspberry pi.
Depending on how you connected the pi to your network , 3 cases may arise.
1.) Pi connected to computer :
You need to check the log of the computer to find the address assigned to the raspberry pi.In your terminal type:
tail /var/log/syslog

This command shows the last 10 lines of the log file.Look for a line which says dnsmasq-dhcp.If you don’t find it try typing :
grep dnsmasq-dhcp /var/log/syslog
This will search for dnsmasq-dhcp in the system log and return the results.The most recent connection made would be the raspberry pi.The IP address followed by the mac address of the raspberry pi will be printed.
2.)Pi connected to router :
This is simple.Just log into your router’s system setting and look for the routing table where the router registers the IP and mac addresses of the connections it has made.
3.)Pi attached to a network :
Install zenmap:
sudo apt-get install zenmap
Run zenmap as root:
sudo zenmap
Find out your IP range. We are interested in the interface that is connected to the same network as the pi. For example since I connected my raspberry to the router and my router has a netmask of, and my system IP is, so the router will give out IP address in the range
For this case enter 192.168.0.* in the target box of zenmap and let it scan. The zenmap will scan the network and return the IP address alongside the mac address of the pi.

Leave a Reply

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

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

Google photo

You are commenting using your Google 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 )

Connecting to %s