Mac os 10.11(El Capitan) Switch to root account

In Mac os 10.11(El Capitan) , using the follow command to switch root account

sudo -i
//enter login user's password