Line numbers in GNU Emacs

Software

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.

Author bio and support

Me!

Ruben Schade is a technical writer and IaaS engineer in Sydney, Australia who refers to himself in the third person in bios. Wait, not BIOS… my brain should be EFI by now.

The site is powered by Hugo, FreeBSD, and OpenZFS on OrionVM, everyone’s favourite cloud infrastructure provider.

If you found this post helpful or entertaining, you can shout me a coffee or buy some silly merch. Thanks!