We earn commission when you buy through affiliate links.

This does not influence our reviews or recommendations.Learn more.

Almost every file that you directly work on in the Linux terminal can be manipulated as a text file.

Article image

This tutorial will show you how to view these kinds of files in the Linux terminal.

cat

Thecatcommand is a simple and extremely useful command for viewing file contents on Linux.

Using the cat command, you could get the same result with the -e option.

Article image

TheBkey is used to go back to the previous page.

less

Less is a more modern take on more command.

Back when fewer commands were introduced in the Linux ecosystem, most commands did not support scrolling back up.

Article image

For example, thenlcommand can be used to first show the file with line numbers.

Article image

Article image