Skip to content

Linux pr Guide

Mattscreative edited this page Nov 20, 2025 · 2 revisions

📄 Linux pr Guide

Complete beginner-friendly guide to pr on Linux, covering Arch Linux, CachyOS, and other distributions including text formatting, pagination, and print preparation.


📋 Table of Contents

  1. pr Basics
  2. Page Formatting
  3. Column Formatting
  4. Headers and Footers
  5. Troubleshooting

📄 pr Basics

Format for Printing

Basic usage:

# Format for printing
pr file.txt

# Formats with headers and page breaks

Simple Format

Basic format:

# Simple format
pr file.txt

# Adds headers and pagination

📊 Page Formatting

Page Length

Set page length:

# Page length
pr -l 50 file.txt

# -l = length (50 lines per page)

Page Width

Set width:

# Page width
pr -w 80 file.txt

# -w = width (80 characters)

📑 Column Formatting

Multiple Columns

Column format:

# Multiple columns
pr -2 file.txt

# -2 = 2 columns

Column Width

Column width:

# Column width
pr -2 -w 40 file.txt

# 2 columns, 40 chars each

📋 Headers and Footers

Custom Header

Set header:

# Custom header
pr -h "My Document" file.txt

# -h = header (custom header text)

No Header

Remove header:

# No header
pr -t file.txt

# -t = no header/footer

🔧 Troubleshooting

pr Not Found

Check installation:

# pr is part of coreutils
# Usually pre-installed

# Check pr
which pr

📝 Summary

This guide covered pr usage, text formatting, and print preparation for Arch Linux, CachyOS, and other distributions.


🔗 Next Steps


This guide covers Arch Linux, CachyOS, and other Linux distributions. For distribution-specific details, refer to your distribution's documentation.

Clone this wiki locally