How to print out a plain text file with line numbers in Linux? Use the nl command:nl text-file Find options in the nl manual.Related posts:How to add a space between the line numbers and text content in Emacs? Deleting a Specific Line From a Text File in Command Line in Linux How to print a plain text file to printers from a terminal in Linux How to sort a file by hexadecimal numbers on Linux using sort command? How to calculate the average of value in lines of a text file on Linux by a script? How to convert all text from upper case to lower case on Linux? How to print the text in a web page? How to print a line to STDERR and STDOUT in Bash?