Enable Constant Cursor Position Display in GNU Nano
Add 'set constantshow' to your nanorc file to make GNU nano continuously show line and column numbers at the bottom of the screen.
01 May 2026, 06:49 UTC

Enable the feature
To make GNU nano always show the current line and column numbers at the bottom of the screen, add the single line set constantshow to your nanorc configuration file. Once the option is loaded, nano updates the position continuously as you move the cursor, without needing any command‑line flags or special key presses.
How it works
Nano reads its configuration files (~/.nanorc for per‑user settings and /etc/nanorc for system‑wide settings) each time it starts. The set constantshow directive tells the editor to keep the status bar updated with the cursor’s line and column numbers after every movement. If the directive is absent, nano only shows this information temporarily—for example, when you press Ctrl‑C or when the status bar is refreshed for other reasons.
Example configuration
Open (or create) the user‑specific nanorc file:
# Edit or create ~/.nanorc
nano ~/.nanorc
Add the following line exactly as shown, with no leading/trailing spaces or quotation marks:
set constantshow
Save the file and exit nano (Ctrl‑O, Enter, Ctrl‑X). The next time you start nano, the line/column display will be permanent.
Verification
- Confirm nano is installed and reads nanorc:
nano --version(look for the version string). - Open any file, for example a test file:
nano test.txt. - Observe the bottom‑right corner of the screen; it should show something like
Line 1, Column 1and update as you move the cursor with arrow keys, PageUp, PageDown, etc. - To verify the setting is required, remove the line from
~/.nanorc, restart nano, and notice that the persistent display disappears, leaving only occasional updates.
Limitations and common pitfalls
- Placement matters. If you place
set constantshowinside a conditional block that never evaluates (e.g., after aset nohelpthat disables further processing), the option may be ignored. Keep it at the top level of the file. - Minimal or embedded builds. Some stripped‑down versions of nano (common in embedded Linux) are compiled without nanorc support. In those builds the option has no effect; check
nano --versionfor features or try the system‑provided full version. - $HOME misconfiguration. Nano looks for
~/.nanorcusing the$HOMEenvironment variable. If$HOMEpoints to an unexpected directory, the file won’t be read. Verify withecho $HOMEandls -la ~/.nanorc. - Terminal or multiplexer interference. Certain tmux or screen configurations can hide or overwrite the status bar, making the constant display appear missing. Ensure the terminal’s bottom line is visible (e.g., check
tmux show-options -g status). - Requires restart. Editing nanorc while a nano session is running does not affect that session; you must exit and start nano again for changes to take effect.
0 replies
A thoughtful contribution can make all the difference. Be the first to share one.