Insall it via running command sudo apt install screen
screen -S newtab
. Run whatever process you want to run in that screen.ctrl+a+d
to exist/deattach from the screen. ( The program running in screen will continue running even after you detach from the screen )screen -r -d newtab
to reattach the previous screen.screen ls
to get display the currently opened screens including those in the backgrounds.screen -XS newtab quit
to delete the screen. ( Here you can replace newtab with your screen I'd wich look something like 9066.pts-0.ip-172-31-23-158. (screen -XS (screenname) quit
)screen --help
to know more advanced commands if screen.Insall Tmux on Ubuntu and Debian via running command sudo apt-get
install tmux
tmux
or to start name session you can start by typing tmux new -s newtab
. Now you can run whatever u want to run in that new session.ctrl+b+d
to exist/deattach from the session. ( The program running in tmux will continue running even after you detach from the session )tmux ls
to get list of all session running in background.tmux attach-session -t 0
( if u didn't created named screen then see the name of running screen from tmux ls
command ) or tmux attach-session -t newtab
(if you created a names session).tmux kill-session
to terminate the last active session if no session is specified. If you want to kill specific session then type tmux kill-session -t newtab
.