Tmux , Screen, Nohup, – Run command in background

Why?
– Run process in background
– Run database backup in background

Tmux:

#List
tmux ls

#Start session
tmux new -s mysession

#Reconnect  
tmux a -t session_name

#Disconnect
ctrl + b + D


#Reconnect to 0 session
tmux a -t 0

More : https://tmuxcheatsheet.com

Screen :

#List
screen -ls

#Named session
screen -A -m -d -S session_name command

#Reconnect to named session
screen -r session_name 

#Disconnect
CTRL + a + d

https://gist.github.com/jctosta/af918e1618682638aa82

Nohup:

Nohup command &

It’s create nohup.out file in same directory with all command logs

https://www.thegeekdiary.com/nohup-command-examples-runs-a-command-that-keeps-running-after-you-log-out/

Jobs:

jobs
fg
bg

https://tldp.org/LDP/abs/html/x9644.html