Set office as the current user's default destination without changing the system-wide default.
Which command is appropriate?
lpoptions -d destination sets the user's saved default destination.
Detailed explanation
lpoptions -d officeCorrect. lpoptions -d office stores the user's default.
Correct. lpoptions -d office stores the user's default.
lpoptions -p office -lIncorrect. -p -l lists printer options.
Incorrect. -p -l lists printer options.
lpstat -d officeIncorrect. lpstat -d displays rather than sets the default.
Incorrect. lpstat -d displays rather than sets the default.
lpr -P officeIncorrect. -P selects a destination for one job only.
Incorrect. -P selects a destination for one job only.
Try it yourself
An example you can run in a temporary verification environment.
printf '%s
' 'lpoptions -d office -> user default office'Expected result
lpoptions -d office -> user default officeKey points
- lpoptions is per-user
- -d sets default
- -P is per-job
Notes
- Environment: 設定対応表の表示のみ
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Read the scope first
Check whether the command acts on the current shell, a new process, an existing process, or a file.
Verify the observable result
Use the supplied command and compare the output with the expected result.