Each user is assigned a default printer.

When you send a job to print, the default printer is used unless you specify otherwise. To find out which printer is your default, try looking at the PRINTER environment variable:

% echo $PRINTER
opal

In this case, you are using the printer named opal.

If the PRINTER environment variable isn’t set, then you’re using the system default. On a BSD-based system, the default is whatever printer is named lp. lp is often “aliased” to another printer name; to find out which printer it’s linked to on your site, look in the file /etc/printcap for a line containing lp surrounded by vertical bars:

emu|emu_ps|lp|ruby_ps|AppleLaserWriterIIg via EtherTalk:\
        :lp=/usr/spool/lpd/emu/emu:\
        :sd=/usr/spool/lpd/emu:pl#72:pw#85:mx#0:\
        :lf=/var/adm/lpd-errs:\
        :if=/usr/local/cap/emu:\
        :of=/usr/local/cap/papof:

From the first line, you see that lp is aliased to the printer called emu.

On a System V-based system, the system default is shown when you type lpstat -d:

% lpstat -d
system default destination: emu

Get WYNTK: UNIX System Admininistrator 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.