linuxubuntuprocessubuntu-serverserver-administration

Two or more active processes in Ubuntu Server


I have Ubuntu Server 18.04 LTS.

I want to run two processes, but at the same time have a "clean" command line.

For example,

process 1: ping google.com

process 2: ping facebook.com

I tried running them in the background using &:

process 1: ping google.com &

process 2: ping facebook.com &

However, the results of executing commands are displayed in the command line:

enter image description here

How can I run two processes to leave the command line "clean"?


Solution

  • I would recommend the "screen" program.

    You can create new screen with screen -S [name]. Simply said it just open a new bash where you can run your commands. If you want to exit the screen just press Ctrl + A + D

    If you want to resume the screen, just run screen -r [screen-name]

    The advantage is that you can close you terminal and the screen will continuously running in the background.

    For more information check this link out: https://www.digitalocean.com/community/tutorials/how-to-install-and-use-screen-on-an-ubuntu-cloud-server