--- title: "tmux plus screen" date: 2020-08-17T14:19:16+02:00 draft: false snippet_types: - screen - tmux --- Recently I was sshed into my home pi server trying to sftp some big files from a remote server. Some of the transfers are huge, 30gb+. On our internet that will take a while. Not wanting to leave the shh terminal session open that whole time I used [screen](https://linux.die.net/man/1/screen) on the pi. Idea was to create a screen session start the transfer detach and comeback few hours later. Detaching was a bit tricky. is the default detach command for both tmux running on my mac and screen running on the pi. So when I tried to detach from the screen session tmux would detach instead. 😡 After messing with configs and some searching turns out if you press the tmux prefix key twice it sends it once to the child shell. So eventually I was able to detach from the screen session with: ** **!! sources: - [stackoverflow](https://stackoverflow.com/questions/8518815/how-to-send-commands-when-opening-a-tmux-session-inside-another-tmux-session) - [screen basics](https://www.howtogeek.com/662422/how-to-use-linuxs-screen-command)