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?

  • 1
    What do you mean with signals? Nov 24, 2012 at 14:43
  • I've updated the question now.
    – john-jones
    Nov 24, 2012 at 14:58

2 Answers 2


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 &


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 &.

  • That works when I type it directly but not when I run it through Perl's system() command.
    – john-jones
    Nov 24, 2012 at 16:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .