~2 min read · Updated Nov 4, 2026

Introduction


In Linux, many system files, such as configuration files and scripts, are stored as plain text. The less command offers an effective and safe way to view these files in the terminal without editing or running them.


Using the less command


The less command displays a text file one page at a time and is easier to navigate than older tools.


less filename

Example: viewing user account information:


less /etc/passwd

To quit, simply press q.


What is a text file?


Text files have a simple structure: each character maps to a specific number (such as an ASCII code). These files contain no formatting, only characters, spaces, tabs and line breaks. This simplicity is what makes reading and editing system settings in Linux so easy.


Navigating with less


Useful shortcuts while using less:


CommandAction
Page Up / bScroll back one page
Page Down / SpaceScroll forward one page
↑Move up one line
↓Move down one line
GJump to the end of the file
1G / gJump to the beginning of the file
/textSearch for a phrase
nFind the next match of the previous search
hShow the help screen
qQuit less

Why is less better than more?


The less command was designed as a replacement for more, which could only move forward. Besides moving in both directions, less provides searching, built-in help and better handling of large files. These features inspired the famous Unix saying:


"Less is more!"


Conclusion


The less command is an essential Linux tool for viewing text files, especially system configuration files. With smooth navigation, search and a user-friendly design, it has outpaced the traditional tools and is the pager of choice for experienced terminal users.


Written & researched by Dr. Shahin Siami

Related Articles