-
-
Notifications
You must be signed in to change notification settings - Fork 2
Linux pr Guide
Mattscreative edited this page Dec 5, 2025
·
2 revisions
Complete beginner-friendly guide to pr on Linux, covering Arch Linux, CachyOS, and other distributions including text formatting, pagination, and print preparation.
Basic usage:
# Format for printing
pr file.txt
# Formats with headers and page breaksBasic format:
# Simple format
pr file.txt
# Adds headers and paginationSet page length:
# Page length
pr -l 50 file.txt
# -l = length (50 lines per page)Set width:
# Page width
pr -w 80 file.txt
# -w = width (80 characters)Column format:
# Multiple columns
pr -2 file.txt
# -2 = 2 columnsColumn width:
# Column width
pr -2 -w 40 file.txt
# 2 columns, 40 chars eachSet header:
# Custom header
pr -h "My Document" file.txt
# -h = header (custom header text)Remove header:
# No header
pr -t file.txt
# -t = no header/footerCheck installation:
# pr is part of coreutils
# Usually pre-installed
# Check pr
which prThis guide covered pr usage, text formatting, and print preparation for Arch Linux, CachyOS, and other distributions.
- fmt Guide - Text formatting
- fold Guide - Line wrapping
- Text Processing - Text manipulation
-
pr Documentation:
man pr
This guide covers Arch Linux, CachyOS, and other Linux distributions. For distribution-specific details, refer to your distribution's documentation.