在ubuntu命令行下用lpadmin命令添加打印机时,其中参数-v要设定设备的位置,是添加打印机中至关重要的一步,网上也给不出了不少方法,我在man lpadmin时在帮助文档中发现另一个寻找设备的命令,lpinfo,此命令可列出可用的打印设备和驱动。现列出man lpinfo的部分内容,主要是-v和-m两个参数的使用。

 

NAME

       lpinfo - show available devices or drivers


SYNOPSIS

       lpinfo [ -E ] [ -U username ] [ -h server[:port] ] [ -l ] [ --device-id
       device-id-string ]  [  --exclude-schemes  scheme-list  ]  [  --include-
       schemes scheme-list ] [ --language locale ] [ --make-and-model name ] [
       --product name ] -m
       lpinfo [ -E ] [ -U username ] [ -h server[:port] ] [ -l ] [  --exclude-
       schemes  scheme-list  ]  [  --include-schemes scheme-list ] [ --timeout
       seconds ] -v


DESCRIPTION

lpinfo lists the available devices or drivers known to the CUPS server. The first form (-m) lists the available drivers, while the second form (-v) lists the available devices.  

 

  如在添加打印机时,可在插入打印机前输入lpinfo -v命令,待插入打印机后再次输入此命令,比较新增加的项,即可确定要添加的打印机位置。如此则可确定添加打印机时lpadmin中-v参数的内容。所以在学习linux时经常man下命令还是很有好处的。

相关文章:

  • 2021-08-16
  • 2022-12-23
  • 2021-08-12
  • 2022-01-29
  • 2021-10-03
  • 2021-12-04
  • 2021-09-24
猜你喜欢
  • 2021-07-25
  • 2021-09-21
  • 2021-08-13
  • 2021-12-03
  • 2021-11-20
  • 2021-12-24
  • 2021-12-26
相关资源
相似解决方案