SMOLNET PORTAL home about changes
+------------------------------------------+
|Cups - Command Line Printing - Cheat Sheet|
|Written by Wim Stockman - on 04 jun 2020  |
+------------------------------------------+

  ____ _   _ ____  ____  
 / ___| | | |  _ \/ ___| 
| |   | | | | |_) \___ \ 
| |___| |_| |  __/ ___) |
 \____|\___/|_|   |____/ 
                         
  ___                              _   _                 ___     _     _   _           
 / __|___ _ __  _ __  __ _ _ _  __| | | |  (_)_ _  ___| | _ \_ _(_)_ _| |_(_)_ _  __ _ 
| (__/ _ \ '  \| '  \/ _` | ' \/ _` | | |__| | ' \/ -_) )  _/ '_| | ' \  _| | ' \/ _` |
 \___\___/_|_|_|_|_|_\__,_|_||_\__,_| |____|_|_||_\___| |_| |_| |_|_||_\__|_|_||_\__, |
                                                                                 |___/ 
List available printers:
lpstat -p

View default printer:
lpstat -d

You can combine the commands:
lpstat -p -d

Setting the default printer:
lpoptions -d PRINTERNAME
This overwrites the ~/.cups/lpoptions file be carefull if you had some options in

View the options available for your printer:
lpoptions -p PRINTERNAME -l

to print with a specific options:
lp -p PRINTERNAME -o Media=A4 -o fit-to-page -o Quality=Draft

CREATING SAVED OPTIONS
So you can acces them later with an instance of your printer and don't have to retype everything.
lpoptions -p PRINTERNAME/INSTANCE1 -o Media=A4 -o fit-to-page -o Quality=Draft

then you can print with these options by specifying the instance
lp -p PRINTERNAME/INSTANCE1 file-to-print.ps
+--------------------------------------------------+
|Suggestions? gopher@yasendfile.org		   |
+--------------------------------------------------+
Response: text/plain
Original URLgopher://thinkerwim.org/0/TipTricks/cups-cmd.txt
Content-Typetext/plain; charset=utf-8