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 can play music in my music collection by typing:

'vlc somefile.mp3 &'

Which works great except that I always start receiving some signals from the execution of playing that song.

In the following image the signals I dont want to be receiving is the heapload of information that starts running down the screen after the "play_all" command has been run here:

I don't want to receive those signals, they are irrelevant.

I have already tried adding > /dev/null at the end of the command which I thought would redirect the STDOUT away, but to no avail.

How do I stop receiving signals when running music from the terminal?

share|improve this question
What do you mean with signals? – Ulrich Dangel Nov 24 '12 at 14:43
I've updated the question now. – Hermann Ingjaldsson Nov 24 '12 at 14:58
up vote 1 down vote accepted

You can stop receiving the HUP (hang up) signal by using nohup before your execution command, or you can use bash disown command to disable HUP effect for currently running job.

nohup vlc somefile.mp3 &

share|improve this answer

As nohup will always generate a file with the output to stdout/stderr you should combine it with output redirection.

The output you see in the terminal is the output to stderr.

When you use vlc somefile.mp3 > /dev/null & you only redirect the output of stdout, so you still see the stderr output in the terminal.

To redirect both stdout and stderr and have no file written by nohup you can use nohup vlc somefile.mp3 &> /dev/null &.

share|improve this answer
That works when I type it directly but not when I run it through Perl's system() command. – Hermann Ingjaldsson Nov 24 '12 at 16:32

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.