Reading files

The less command

Opens the file page by page: you can move, search and quit whenever you want.

Syntax

less <archivo>Try it in the terminal →

Most useful options

-NShows line numbers

Copy-ready examples

$ less Documentos/tareas.txtRead calmly
$ less Documentos/apuntes.txtAnother file

You can try them in the browser terminal: it does not touch your computer.

Typical mistakes

  • Inside, q quits, / searches and the arrows move.

Related commands

FAQ

How do I exit less?

Pressing q. It is every beginner's number one doubt.

More Reading files commands

Learn to actually use it

The basic Linux course takes you from zero to console fluency with 24 self-grading lessons.

Start the free course