lpoptions(1)

πŸ“¦
version 2.4.19 Β· 5 versions
, in alpine 3.22, alpine 3.23, alpine 3.24, centos-stream 10, debian trixie, fedora 43, fedora 44, nixpkgs unstable, opensuse-leap 16.0, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’… lpoptions β€” display or set printer options and defaults ✨

okay bestie, welcome to lpoptions, the OpenPrinting girlie of section 1 πŸŽ€. she's the one who holds all your printer vibes β€” every option, every default, every little instance β€” and she keeps receipts. let's get into it 🫢


🌸 NAME 🌸

lpoptions β€” display or set printer options and defaults πŸ’–


πŸ¦‹ SYNOPSIS πŸ¦‹

lpoptions [ -h server[:port] ] [ -E ] -d destination[/instance] [ -l ]
lpoptions [ -h server[:port] ] [ -E ] [ -p destination[/instance] ] -o
option[=value] ...
lpoptions [ -h server[:port] ] [ -E ] [ -p destination[/instance] ] -r
option
lpoptions [ -h server[:port] ] [ -E ] -x destination[/instance]

πŸ‘‘ DESCRIPTION πŸ‘‘

so like. lpoptions displays or sets printer options and defaults. that's the whole job. she's the options manager, the default-keeper, the main character of your print config πŸ’…

if you don't name a printer with the -p option, she just uses the default printer β€” exactly as described in lp(1). no printer drama, she knows who the default is.

if you don't pass -l, -o, or -r? then she just reports the current options on the standard output. a little show-and-tell, no edits, we're just looking ✨

the options you set with the lpoptions command are the ones that lp(1) and lpr(1) reach for when they submit jobs. so like, whatever you set here? that's what actually gets used. no cap πŸ”₯

and here's the big one β€” who you are changes where your stuff lives:

  • run it as root and she gets and sets default options and instances for all users in the /etc/cups/lpoptions file. everybody's defaults, one file, iconic πŸ‘‘
  • run it as literally anyone else and your per-user defaults get managed in ~/.cups/lpoptions. your file, your rules πŸŽ€

⭐ OPTIONS ⭐

lpoptions supports the following options, bestie β€” all of them, no skipping, we don't gatekeep:

  • -E β€” Enables encryption when communicating with the CUPS server πŸ”’βœ¨
  • -d destination[/instance] β€” Sets the user default printer to destination. If instance is supplied then that particular instance is used. this one overrides the system default printer for the current user β€” yeah, she can do that πŸ’…
  • -h server[:port] β€” Uses an alternate server. ⚠️ Note: this option must occur before all others. like, she's gotta be first in line, she's the opening act 🎀
  • -l β€” Lists the printer specific options and their current settings. the full tour, the whole menu πŸ“
  • -o option[=value] β€” Specifies a new option for the named destination. set it, queen πŸ‘‘
  • -p destination[/instance] β€” Sets the destination and instance, if specified, for any options that follow. If the named instance does not exist then it is created. but heads up β€” destinations can only be created using the lpadmin(8) program. so she'll make the instance, but she will NOT make the destination, that's not her department 😭
  • -r option β€” Removes the specified option from the named destination. bye bestie πŸ‘‹
  • -x destination[/instance] β€” Removes the options for the named destination and instance, if specified. If the named instance does not exist then this does nothing β€” no error, no drama, just silence πŸ™ˆ. and again: destinations can only be removed using the lpadmin(8) command.

πŸŽ€ FILES πŸŽ€

  • ~/.cups/lpoptions β€” user defaults and instances created by non-root users. your personal lil corner of the filesystem 🫢
  • /etc/cups/lpoptions β€” system-wide defaults and instances created by the root user. the communal one, handle with care πŸ’œ

🌈 CONFORMING TO 🌈

The lpoptions command is unique to CUPS. she's one of a kind, no copycats, periodt ✨


πŸ’– SEE ALSO πŸ’–

go read them, they're all part of the same friend group πŸ¦‹


Copyright © 2020-2024 by OpenPrinting. 🫢


ok that's the whole page bestie, you ate that πŸ’…βœ¨

so yeah β€” that's lpoptions from the OpenPrinting CUPS crew, and this lil guide was dated 2022-05-02, brought to you by CUPS. now go set some defaults, you gorgeous genius πŸŽ€πŸ‘‘πŸŒˆ

πŸ“¦ where this page comes from