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

What is the faster way to launch any GUI program from the terminal without waiting for its completion and stdout / stderr logging? Now I'm using

"program_name >/dev/null 2>&1 &

but it's too long to type it every time. I'm new to the Linux world but I think that it's should resolved via small bash script, right?

share|improve this question
up vote 3 down vote accepted

You can create following script:

"$@" >/dev/null 2>&1 &

Save as for example 'gui'. Next, allow to execute:

chmod +x gui

Copy to /usr/bin

# cp gui /usr/local/bin

Be happy of typing

gui program_name


share|improve this answer
Thanks a lot, man! – FrozenHeart Feb 1 '14 at 12:38
You should use eval "$@" ..., this is safer than "$@" on its own (see stackoverflow.com/questions/11079342/…). Also /usr/local/bin` is a safer place than /usr/bin. – Graeme Feb 1 '14 at 15:58
If you use install instead of cp, this will add 755 permissions by default, no need for chmod. – Graeme Feb 1 '14 at 16:01

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.