Screen
screen -d -R your_session name
//split only the monitor screen
ctrl-a ( release the kb ), then press: | for vsplit —> need this step : ctrl-a, c ( to create a new window, otherwise just blank screen)
ctrl-a ( release the kb ), then press: shift s: for hsplit
ctrl-a , tab to switch window
https://tomlee.co/2011/10/gnu-screen-splitting/
Ctrl+acCreate a new window (with shell)Ctrl+a"List all windowCtrl+a0Switch to window 0 (by number )Ctrl+aARename the current windowCtrl+aSSplit current region horizontally into two regionsCtrl+a|Split current region vertically into two regionsCtrl+atabSwitch the input focus to the next regionCtrl+aCtrl+aToggle between the current and previous regionCtrl+aQClose all regions but the current oneCtrl+aXClose the current region
https://linuxize.com/post/how-to-use-linux-screen/
sample config: more ~/.screenrc
# Enable mouse scrolling and scroll bar history scrolling
termcapinfo xterm* ti@:te@
# This line makes Detach and Re-attach without losing the regions/windows layout
layout save default
tmux:
ctrl-b:
Ctrl+b "— split pane horizontally.Ctrl+b %— split pane vertically.Ctrl+b arrow key— switch pane.- Hold
Ctrl+b, don’t release it and hold one of the arrow keys — resize pane. Ctrl+b c— (c)reate a new window.Ctrl+b n— move to the (n)ext window.Ctrl+b p— move to the (p)revious window.
https://lukaszwrobel.pl/blog/tmux-tutorial-split-terminal-windows-easily/
https://gist.github.com/MohamedAlaa/2961058
Tmux features automatic window renaming while the Screen lacks this feature.
The Screen allows session sharing with other users while Tmux does not.
BASH fg, bg
run one command, e.g: ping -i 5 www.google.com
Ctrl-Z ( stop the current process in the bash shell )
put it into background running: bg
bring it back to foreground: fg