Server Fault is a question and answer site for system and network administrators. 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 have access to some Linux Workstations on which I run my C++ executable files from my Laptop but the problem is that each time I run a job from the terminal in my laptop I have to keep a terminal window for each job ... I need a way to submit the job to the Linux machine and see the result once only after the execution finishes ... I know that this can be done in FORTRAN executable by adding & at the end only and I tried it with: mpirun -np 20 ./a 200 1000000& and mpirun -np 20 ./a 200 1000000 & but non of them is working ...

Is there anyway to do the same in Linux ??

share|improve this question

How about using the screen command?

share|improve this answer

as other have said you can run them in screen or tmux. You can also look at nohup

  nohup mpirun -np 20 ./a 200 1000000 &  > output.log 2>&1   

Since without something like nohup you cannot exit the sessions with jobs running in the background, or they will stop running when the Shell sends a HUP signal.

share|improve this answer

Use tmux or the older screen to maintain a terminal session on the remote server, to which you can attach and detach at will. Check the documentation for each command for specifics.

share|improve this answer

I assume you have a lot of jobs and would like to have a queue onto which jobs can be placed. I would recommend using something like redis, but the screen/tmux method is pretty solid too.

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.