On the first boot the system is almost completely unconfigured so there are some tasks you will need to do first.

The very first thing you need to do is to change the default root password by running:

passwd

Then, you will have to configure the locales. You can do this by running the following command:

dpkg-reconfigure locales

Go ahead and select all the en_US locales by using the space bar plus any other locales you want. When you are done hit Enter. Lastly, select the en_US.UTF-8 as the default locale and hit Enter.

Next you will need to configure the timezone. To do this run the following command:

dpkg-reconfigure tzdata

At this point it's a good idea to do some updates:

apt-get update apt-get upgrade apt-get dist-upgrade

Next thing you need to do, is to install a text editor in order to be able to edit configuration files. One of the easiest to use terminal text editors is nano:

apt-get install nano

When you are done editing a file using nano hit Ctrl-X to exit, type y and finally hit Enter to save the changes.

Next you need to create a normal user to use instead of root to make the system more secure and also reduce the risk of human error:

useradd raspcam passwd raspcam mkdir /home/raspcam chown raspcam:raspcam /home/raspcam

And to change the default shell to bash run:

nano /etc/passwd

And replace /bin/sh with /bin/bash on the line that starts with raspcam.

Now you need to give that user the ability to do things that require root access so you need to install sudo:

apt-get install sudo

Then to give your user the ability to use sudo run:

visudo

And right after the line:

root ALL=(ALL:ALL) ALL

put the following line:

raspcam ALL=(ALL:ALL) ALL

Finally, run:

su - raspcam

From now on you will use that user for anything you want to do and when you need root access you will use sudo.

Next to make the system a little more secure it's a good idea to prevent root login through SSH. So, run:

sudo nano /etc/ssh/sshd_config

And on the line:

PermitRootLogin yes

Change the yes to no.

Next, install the raspi-copies-and-fills package for improved memory management performance:

sudo apt-get install raspi-copies-and-fills

Now it's a good time to give your Pi a static IP so you won't have to search what IP address it has all the time. To do so you need to edit the /etc/network/interfaces configuration file:

sudo nano /etc/network/interfaces

Your /etc/network/interfaces needs to have the following format:

auto lo iface lo inet loopback auto eth0 iface eth0 inet static address x.x.x.x netmask y.y.y.y gateway z.z.z.z

In order for the Raspberry Pi to be able to communicate with the rest of the network (including your own computer) you need to make sure that the netmask, and the gateway fields are exactly the same with your own computer. The address can be any valid IP address as long as it belongs to the same network with your own computer and does not conflict with another one, that has been already allocated from the DHCP server of your router to another device.

To figure out what to use for the address, the netmask, and the gateway, you need to check the network configuration of your own computer.

If you are using Linux run the following command as root:

ifconfig

And you will get an output similar to the following:

eth0 Link encap:Ethernet HWaddr 11:22:33:aa:bb:cc inet addr:192.168.1.4 Bcast:192.168.1.255 Mask:255.255.255.0 inet6 addr: fe80::2a10:7bff:fec5:6bc4/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:1917143 errors:0 dropped:1 overruns:0 frame:0 TX packets:2092796 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:642211523 (612.4 MiB) TX bytes:1122273820 (1.0 GiB) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:72892 errors:0 dropped:0 overruns:0 frame:0 TX packets:72892 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:11713024 (11.1 MiB) TX bytes:11713024 (11.1 MiB)

As you can see in this example this particular machine has the IP address 192.168.1.4, the broadcast address of the current network is 192.168.1.255 and the network mask is 255.255.255.0. From that information you already know what to use for the netmask field.

Now to find out the gateway IP address (which is the IP address of your router) you can run the following command as root:

route -n

This will give you an output similar to the following:

Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 192.168.1.1 0.0.0.0 UG 1024 0 0 eth0 192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0

The gateway is the IP address that has as its destination the IP address 0.0.0.0. In this example the gateway IP is 192.168.1.1.

Lastly, for the address field you can use any IP address between 192.168.1.1 and 192.168.1.254 as long as it's not the gateway address and it does not conflict with the IP of another device on the network. I suggest using an IP address like for example 192.168.1.100 so the risk of conflict will be very small. Furthermore, an IP address like this will be easier to remember.

If you want to be extra sure that the IP of the Pi will never conflict with the IP address of another device, you will need to configure the DHCP server of your router to exclude that IP from its address pool. Unfortunately, I cannot describe how to do that since every router is different.

If you are using Windows you can find out what address, netmask, and gateway to use in the same way by running the following command on the command line:

ipconfig /all

So, for our example the /etc/network/interfaces would look like the following:

auto lo iface lo inet loopback auto eth0 iface eth0 inet static address 192.168.1.100 netmask 255.255.255.0 gateway 192.168.1.1

Next you need to set the nameservers. To do that run:

sudo nano /etc/resolv.conf

Typically, the primary nameserver will be your router, for the secondary nameserver you can use the Google Public DNS which is 8.8.8.8. To add the Google Public DNS as the secondary nameserver, at the end of the config file add the following line:

nameserver 8.8.8.8

Finally, for the changes to take effect you need to restart the networking service:

sudo /etc/init.d/networking restart

After restarting the networking service the SSH session is going to hang, because the IP of the Raspberry Pi has now changed so you will have to reconnect, but this time using the new user you created instead of root.

After reconnecting to your Pi you need to enable the camera module. To do so first you need to install raspi-config:

sudo apt-get install raspi-config

And run it as root:

sudo raspi-config

Select the Enable Camera option and then select Enable. Finally, answer yes to the question if you want to restart the Raspberry Pi now. After the reboot reconnect to it through SSH.