This is very simple. Open the command line and perform the following steps

First let us install the prerequisites.

sudo apt-get update

sudo apt-get install lightdm

sudo apt-get install lxsession


After successfully install the above packages, open the raspi-config. Type the following command in the commandline


sudo raspi-config


This will open up a pop up box with various options. Select “Boot Options” 

After this, you will get another list of options and select the “B1 Desktop/CLI” option.

On click of that will open up another list and here you have to select “B4 Desktop Autologin”

Here you can select any option depending upon your requirement.

Sample screenshots of the same are given below.

First Screen
After selection the Boot Options
B4 Desktop Autologin