After some research in the try of solving a problem with sound in Ubuntu 18.04, I found some answers involving editing of the file
/etc/default/grub. After playing with this file and rebooting, surprisingly, Ubuntu booted in terminal mode instead of graphical.
Then, I did some search on how to get back to GUI from CLI, but every solution I found just didn't work (I tried
startx command so as to start GUI, but it holds for some time and then times out saying "time out in locking authority file").
Also I tried
init 5 but this also shows GUI for a blink of an eye and then gets back into the terminal. I tried the Alt + Ctrl + F7 combination, but it appears that it does nothing.
I tried to reinstall
ubuntu-desktop, but it faced broken packaged and failed to do so; afterward I got to know that
aptitude could possibly solve this issue automatically, but it didn't.
I'm new to Ubuntu and any measure I take at this step seem to worsen the situation!! Any help would be appreciated.