Troubleshooting

I have a printer directly connected to my computer, but when I try to print, nothing comes out. How can I find out if I'm connecting to the printer?

Because the printer is nothing more than a device to Linux, you can check to see whether you can print to it by finding a small text file (/etc/hosts is usually a good test file) and sending it directly to the printer port:

cat /etc/hosts > /dev/lp0

If this doesn't work, try /dev/lp1. When you find the correct port, make sure lp is linked to that port.

The previous operation worked and I checked the link, but lp still doesn't print.

Run checkpc as shown in the previous text. Then send your text file to the lp with the -b option. If that prints, you might have the wrong filter specified ...

Get Special Edition Using Linux®, Sixth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.