How Do I Print a Text File in Linux?
Contents

How do I print a text file in Linux terminal?

To print a document on the default printer, just use the lp command followed by the name of the file you want to print.

How do I print the contents of a file in Linux?

Use the command line to navigate to the Desktop, and then type cat myFile. txt . This will print the contents of the file to your command line. This is the same idea as using the GUI to double-click on the text file to see its contents.

Elena Rostova

Elena Rostova

Lead Health, Wellness & Medical Journalist

Elena Rostova holds a Master's degree in Public Health Journalism. She covers groundbreaking medical research, holistic wellness trends, mental health awareness, and nutritional science.

Share this article
Twitter Facebook Pinterest