Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

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 want to be able to lower all windows and show the desktop from the command line, not

share|improve this question
up vote 21 down vote accepted

There is a useful command line application called xdotool which amongst other stuff, allows you to send keystrokes.

Thus - to mimic Control+Alt+D (or Super+D, or whatever the combination is you need), you can use one of the following commands:

xdotool key ctrl+alt+d
xdotool key ctrl+super+d
xdotool key super+d

To install:

sudo apt-get install xdotool
share|improve this answer
The key combination should not be quoted. Works as a charm. Thanks! – user42882 Jan 20 '12 at 22:09

I'm not sure fossfreedom's answer truly satisfies the requirement to "not use Ctrl+Alt+D"

Thus I recommend to show desktop the command:

wmctrl -k on

To turn it off use

wmctrl -k off
share|improve this answer

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.