nerdexam
Linux_Foundation

LFCS · Question #486

Which of the following lines is an example of a correct setting for the DISPLAY environment variable?

The correct answer is B. hostname:displaynumber. The DISPLAY environment variable specifies the X server for graphical applications using the format hostname:displaynumber.screennumber, where displaynumber is essential.

Submitted by priya_blr· Apr 18, 2026Operation of Running Systems

Question

Which of the following lines is an example of a correct setting for the DISPLAY environment variable?

Options

  • Ahostname:displayname
  • Bhostname:displaynumber
  • Chostname/displayname
  • Dhostname/displaynumber
  • Ehostname

How the community answered

(31 responses)
  • B
    87% (27)
  • C
    3% (1)
  • D
    6% (2)
  • E
    3% (1)

Why each option

The `DISPLAY` environment variable specifies the X server for graphical applications using the format `hostname:displaynumber.screennumber`, where `displaynumber` is essential.

Ahostname:displayname

The component after the colon should be a numeric display number, not a generic "displayname".

Bhostname:displaynumberCorrect

The `DISPLAY` environment variable is used in X Window System to specify the X server where graphical applications should send their output. The correct format is `[hostname]:displaynumber[.screennumber]`, making `hostname:displaynumber` a valid example.

Chostname/displayname

The separator between the hostname and the display identifier is a colon (`:`) not a forward slash (`/`).

Dhostname/displaynumber

The separator is incorrect, and "displaynumber" is the correct term, but the format with `/` is wrong.

Ehostname

Specifying only the `hostname` is insufficient; the `displaynumber` is also required to identify the specific display on that host.

Concept tested: X Window System DISPLAY variable format

Topics

#DISPLAY environment variable#X Window System#Environment variables#Remote display

Community Discussion

No community discussion yet for this question.

Full LFCS Practice