0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

[Linux] プリンタ管理_lpr, lpq, lprm, lp, lpstat, cancel

Last updated at Posted at 2025-06-21

概要

機能 BSD系 System V系 (CUPS標準)
印刷 lpr lp
印刷ジョブ確認 lpq lpstat
印刷ジョブの削除 lprm cancel

lpr コマンド

$ lpr [オプション] [ファイル名]
オプション 由来 説明
default line printer request デフォルトプリンタに印刷ジョブを送信する
-# number of copies 印刷部数を指定する
例:-#3 → 3部印刷
-P printer 印刷先プリンタ名を指定
例:-P printer1

lpq コマンド

$ lpq [オプション]
オプション 由来 説明
default line printer queue 現在の印刷キューの状態を表示
-P printer 確認したいプリンタ名を指定
例:-P printer1

lprm コマンド

$ lprm [オプション] [ジョブ番号]
オプション 由来 説明
default line printer remove 自分の印刷ジョブを削除する
-P printer ジョブを削除したいプリンタ名を指定
例:-P printer1
- all 自分のすべての印刷ジョブを削除する
例:lprm - → 全ジョブ一括キャンセル

lp コマンド

$ lp [オプション] [ファイル名]
オプション 由来 説明
default line printer デフォルトプリンタに印刷ジョブを送信
-n number of copies 印刷部数を指定
例:-n 3 → 3部印刷
-d destination 印刷先プリンタを指定
例:-d printer1

lpstat コマンド

$ lpstat [オプション]
オプション 由来 説明
default line printer status 現在の印刷ジョブやプリンタの状態を表示
-a accepting jobs すべてのプリンタのジョブ受付状態を表示
例:どのプリンタが有効かを確認
-p printers プリンタの状態を表示
例:有効か、アイドルか、エラーかなど
-d default デフォルトプリンタの名前を表示

cancel コマンド

$ cancel [オプション] [ジョブIDまたはプリンタ名]
オプション 由来 説明
default cancel job 指定した印刷ジョブをキャンセルする
-a all jobs すべてのジョブをキャンセルする
例:cancel -a printer1printer1 のすべてのジョブを削除
-u ユーザ名 user jobs 特定のユーザーのジョブをキャンセル(CUPSの設定により制限あり)

Ping-t

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?