Published multiple files
All checks were successful
Build and Deploy Quartz / build (push) Successful in 26s
All checks were successful
Build and Deploy Quartz / build (push) Successful in 26s
This commit is contained in:
95
content/10-19 LIFE/13 TECH SETUP/13.13 OS SETUP/Printing.md
Normal file
95
content/10-19 LIFE/13 TECH SETUP/13.13 OS SETUP/Printing.md
Normal file
@@ -0,0 +1,95 @@
|
||||
---
|
||||
publish: true
|
||||
permalink: /10-19 LIFE/13 TECH SETUP/13.13 OS SETUP/Printing.md
|
||||
title: Printing
|
||||
created: 2026-02-05T08:52:25.911-07:00
|
||||
modified: 2026-02-05T09:21:21.426-07:00
|
||||
tags:
|
||||
- printing
|
||||
- cups
|
||||
cssclasses: ""
|
||||
---
|
||||
|
||||
CUPS printing setup for Arch Linux.
|
||||
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
sudo pacman -S cups cups-pdf
|
||||
```
|
||||
|
||||
## Enable Services
|
||||
|
||||
```bash
|
||||
sudo systemctl enable --now cups
|
||||
sudo systemctl enable --now avahi-daemon
|
||||
```
|
||||
|
||||
Avahi enables automatic network printer discovery.
|
||||
|
||||
## Configuration
|
||||
|
||||
### Web interface
|
||||
|
||||
Access CUPS admin at: http://localhost:631
|
||||
|
||||
### Add printer via CLI
|
||||
|
||||
```bash
|
||||
# List available printers
|
||||
lpinfo -v
|
||||
|
||||
# Add a printer
|
||||
lpadmin -p PrinterName -E -v "uri" -m "driver.ppd"
|
||||
|
||||
# Set default printer
|
||||
lpoptions -d PrinterName
|
||||
```
|
||||
|
||||
### Network printers (auto-discovery)
|
||||
|
||||
With Avahi running, network printers should appear automatically. If not:
|
||||
|
||||
```bash
|
||||
# Install nss-mdns for .local hostname resolution
|
||||
sudo pacman -S nss-mdns
|
||||
|
||||
# Edit /etc/nsswitch.conf, add mdns_minimal before resolve:
|
||||
hosts: mymachines mdns_minimal [NOTFOUND=return] resolve [!UNAVAIL=return] files myhostname dns
|
||||
```
|
||||
|
||||
## Print to PDF
|
||||
|
||||
The `cups-pdf` package creates a virtual PDF printer:
|
||||
|
||||
```bash
|
||||
# Print to PDF (outputs to ~/PDF/)
|
||||
lp -d cups-pdf document.txt
|
||||
```
|
||||
|
||||
## Useful Commands
|
||||
|
||||
```bash
|
||||
lpstat -p # List printers
|
||||
lpstat -t # Full status
|
||||
lp -d PrinterName file # Print file
|
||||
cancel <job-id> # Cancel print job
|
||||
lprm <job-id> # Remove print job
|
||||
```
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
```bash
|
||||
# Check CUPS status
|
||||
systemctl status cups
|
||||
|
||||
# View logs
|
||||
journalctl -u cups -f
|
||||
|
||||
# Restart CUPS
|
||||
sudo systemctl restart cups
|
||||
```
|
||||
|
||||
## Resources
|
||||
|
||||
- Arch Wiki: https://wiki.archlinux.org/title/CUPS
|
||||
Reference in New Issue
Block a user