2

I was wondering if there is a way to execute a command to start a client in the background, with no output on the screen.

I want to run multiple clients in the background of my screen.

Thank you

1 Answers1

8

Yes. Just add an ampersand (&) at the end of command.

You'll also be able to redirect standard output using > and standard error with 2>.

ex:

ls &                                 # will background the LS command (you'll have a ready prompt) but will show standard output and standard error
ls > /dev/null &                     # will do LS in background showing only standard error
ls > /dev/null 2>&1 &                # will execute the LS command discarding any output        
ls > ls_output.txt &                 # will background LS and store the output in ls_output.txt while error still on video
ls > ls_output.txt 2>ls_error.log &  # will put LS output in ls_output.txt and errors in ls_error.log
ls > ls_output_all.txt 2>&1 &        # will put both LS standard error and standard output to same output_all.txt
DDS
  • 759