Download
Raspbian is a free Debian-based operating system, optimized for the Raspberry Pi, and can be downloaded from the official Raspberry Pi website or just by clicking here.
We will be using the lite version because it uses less resources and will be handy in future projects I’m planing to do.
Write the disc image
The disc image, that you just downloaded, is compressed so you’ll need to unzip it. Next, you need a microSD card in order to write the disc image.
The process of writing the image depends on the software you are using. I used Etcher and it is pretty straight forward, just select your image (Raspbian), the destination (microSD card) and hit the button to write.
Power Up
Once the disc image has been written to the microSD card you are ready to go. Boot your device and the first thing you’ll see is the login window. Default credentials are username pi and password raspberry.
Before you start, make sure your Raspberry Pi is up to date, and if not, update it by running the commands
sudo apt-get update
sudo apt-get upgrade
For security reasons, I will remove the default user and create another one with the same privileges
sudo useradd -m hasan -G sudo
sudo passwd hasan
sudo chsh -s /bin/bash hasan
And on the first login, with the new user, you can remove pi account.
sudo userdel --remove pi
To enable remote command line access to your Pi you’ll need to enter
sudo raspi-config
and then enable SSH inside interface options.
That’s all folks, in the next guide I’m going to cover how to set up your very own web server.