bash tmux screen nohup - ghdrako/doc_snipets GitHub Wiki
By default,nohup appends all output to a file named nohup.out.
# Run a command with nohup and send its output to a file
nohup python3 long_running_script.py &
# Run a command with nohup, discarding both stdout and stderr
nohup python3 long_running_script.py > /dev/null 2>&1 &
All commands in tmux are triggered by a prefix key followed by a command key
<C-b> - <ctrl> + b press - press at the same time
| Command | Description |
|---|---|
<C-b> % |
split your single pane into a left and a right pane(horizontally) - release C-b prefix key and press commnd key b |
<C-b> " |
Split the window into two panes vertically. |
<C-b> <arrow key> |
navigate pane |
Ctrl-d or exit |
closing pane |
<C-b> c |
new window |
<C-b> p |
switch to previous window |
<C-b> n |
switch to next window |
<C-b> 0 (1,2...) |
Move to a specific window by number. |
<C-b> d |
detatch current session |
<C-b> D |
detatch choosing session |
<C-b> ? |
list avaliable command |
<C-b> z |
make a pane go full screen. Hit C-b z again to shrink it back to its previous size |
<C-b> C <arrow key> |
Resize pane in direction of 4 |
<C-b> , |
Rename the current window |
-
tmux ls- List the currently running sessions -
tmux attach -t 0- attach to session 0 -
tmux new -s database- create new session with name tmux rename-session -t 0 database