Linux command
lpoptions 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Show default options
lpoptions
Show printer options
lpoptions -p [printer] -l
Set default printer
lpoptions -d [printer]
Set printer option
lpoptions -p [printer] -o [option=value]
Remove option
lpoptions -p [printer] -r [option]
List options for the default printer
lpoptions -l
Remove all options for a printer instance
lpoptions -x [printer/instance]
说明
lpoptions displays or sets printer options and defaults. When run with no arguments, it shows the default printer options. User-specific settings are stored in ~/.cups/lpoptions. When run by root, system-wide defaults in /etc/cups/lpoptions are used instead. Options like paper size, media type, and print quality can be configured per printer or per instance.
参数
- -d _destination/instance_
- Set the user default printer to the named destination.
- -p _destination/instance_
- Set the destination and instance for any options that follow.
- -l
- List printer-specific options and their current settings.
- -o _option=value_
- Set a new option for the named destination.
- -r _option_
- Remove the specified option from the named destination.
- -x _destination/instance_
- Remove all options for the named destination and instance.
- -E
- Enable encryption when communicating with the CUPS server.
- -h _server:port_
- Connect to the specified server.
FAQ
What is the lpoptions command used for?
lpoptions displays or sets printer options and defaults. When run with no arguments, it shows the default printer options. User-specific settings are stored in ~/.cups/lpoptions. When run by root, system-wide defaults in /etc/cups/lpoptions are used instead. Options like paper size, media type, and print quality can be configured per printer or per instance.
How do I run a basic lpoptions example?
Run `lpoptions` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -d _destination/instance_ do in lpoptions?
Set the user default printer to the named destination.