Line numbers in GNU Emacs

Emacs icon

In my quest to finally give GNU Emacs a try, the first thing I encountered was a lack of line numbers. Easiest way to have them appear persistently is to add this to your ~/.emacs:

(global-linum-mode t)

Alternatively, you can load linum-mode at runtime:

M-x linum-mode

The EmacsWiki has a ridiculously exhaustive list of other options, including more Emacs lisp that I'd care to throw a stick at.


This is one of about 5000 posts on Rubénerd. View the home page for the latest, or related posts also tagged with:

If you liked this post, feel free to buy me a coffee, leave me a comment on Twitter, or email me at Thanks :).