Inspect MIT-MAGIC-COOKIE-style X11 authentication entries held by the current user.
Which command is appropriate?
xauth list displays entries from the Xauthority database; it is separate from xhost's host allow list.
Detailed explanation
xhostIncorrect. xhost manages host-based access control.
Incorrect. xhost manages host-based access control.
xauth listCorrect. xauth list displays X11 authentication entries.
Correct. xauth list displays X11 authentication entries.
X -listIncorrect. X is not invoked this way to list cookies.
Incorrect. X is not invoked this way to list cookies.
DISPLAY=listIncorrect. DISPLAY is only an environment-variable assignment.
Incorrect. DISPLAY is only an environment-variable assignment.
Try it yourself
An example you can run in a temporary verification environment.
command -v xauth >/dev/null && xauth list 2>/dev/null || printf '%s\n' 'xauth or authority data unavailable'Expected result
利用可能なら認証エントリ。X環境がなければ案内文Key points
- xauth manages cookies
- list is read-only
- Usually ~/.Xauthority
Notes
- Environment: Linux / xauthがある場合は読取のみ
- 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.