Line numbers in emacs

Keyboard option: M-x linum-mode (or global-linum-mode),

Emacs.d option (in your ~/.emacs (or~/.emacs.d/init.el) to enable it at startup.):

(global-linum-mode t)