linux show file contents code example

Example 1: linux command to view file

cat command.
less command.
more command.
"gnome-open command" or "xdg-open command" (generic version) or "kde-open command" (kde version) – Linux gnome/kde desktop command to open any file.
open command – OS X specific command to open any file.

Example 2: how to show contents of a file in linux

cat file_name.txt (or any other file extension)

Example 3: view file linux command line

cat filename #for short files
less filename #for longer files