To view line numbers from Default view enter
:set number
To hide line numbers
:set nonumber
There is also a shortcut for above. nu is same as number.
nu
number
:set nonu
To hide line numbers, we can also use
:set nu!