Ubuntu 16.04 Booting to text mode

I was trying to boot a newly installed Ubuntu box into text mode.   The usual methods failed and  after googling  a little  I figured out that  Ubuntu  16,04 uses systemd  for controlling startup services.   The solution for the problem is

 

sudo systemctl enable multi-user.target
sudo systemctl set-default multi-user.target

Mapping between runlevels and systemd targets

Run Level Target
0 poweroff.target
1 rescue.target
2,3,4 multi-user.target
5 graphical.target
6 reboot.target

If you just want to change runlevel only

sudo systemctl isolate multi-user.target