You can also use the su command to switch to the root user but first, you need to set the root's password:
root@ubuntu-linux:~# passwd
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Amazing, now exit the root user:
root@ubuntu-linux:~# exit
logout
elliot@ubuntu-linux:~$ whoami
elliot
Now you can use the su root command to switch to the root user:
elliot@ubuntu-linux:~$ su root
Password:
root@ubuntu-linux:/home/elliot# whoami
root