Tmux should already be installed in your system
apt install tmux
Create a file in /etc/init-wsl
#!/usr/bin/env bash
exec tmux
The file should then be user executable
sudo chmod u+x /etc/init-wsl
Go to Terminal Settings > Debian (Profiles) > Command line
If the linux distro used is the default, use this Command line
C:\Windows\system32\wsl.exe /etc/init-wsl
or just put
tmux a
at the end of whaetever command is there (tmux a
will attach to last session)my command:
C:\WINDOWS\system32\wsl.exe -d Ubuntu tmux a
you can take this further and use a program like tmuxifier to make specific work flows so you can have profiles that auto go to that workflow