(global-hl-line-mode t) ;; put this in your .emacs.d/init.el or .emacs file
if you want to trigger this only when you are in gui emacs then put this instead
(when window-system (global-hl-line-mode t))
you can toggle this minor mode using the command M
M-x global-hl-line-mode when
when you just want it temporarily
if you only want to trigger this in your current buffer use M-x hl-line-mode Note this is a toggle so that M-x hl-line-mode (a second time) will disable it.