Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using Ubuntu, but I think this applies to all Linux.

What's the command to set DISPLAY to be undefined in the shell?

share|improve this question
up vote 9 down vote accepted

You want the unset command: unset DISPLAY

share|improve this answer
Thanks That was very helpful... – User007 Jun 14 '12 at 0:38
You can also disable it temporarily for a single command: DISPLAY= emacs (though emacs -nw is easier — and indeed most applications with both X and terminal interfaces already have an option to disable their X versions). – Alexios Jun 19 '12 at 9:58

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.