Find Version of GRUB Bootloader (Legacy or GRUB2) in Ubuntu / Linux

Planning on tweaking the settings of Grub bootloader on your machine, but you are not sure which version are you running? Yeah, it is very important to know, as commands are version specific and you may end up rendering your system unbootable if you run wrong commands. Well most recent versions of Ubuntu ship with Grub2, but Fedora has been sticking to Legacy Grub for quite a while. Anyway, here is how you can check the version, run the following command

grub-install -v

Look at the output, if it looks like this

grub-install (GRUB) 1.99~rc1-13ubuntu3

i.e. version no. is 1.xx, then you are certainly running Grub2, if the version number is 0.xx you are running legacy Grub.