Is there an alternative to tmux/screen that would work on Windows with Powershell? I'm aware of Powerscreen, but it seems dead for a long time. Cygwin wouldn't work with Powershell, would it? Console2 is very poors man solution.
Any other thought?
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.Sign up to join this community
It's not precisely analogous to tmux or screen, but PowerShell has a facility for managing remote sessions. Ed Wilson wrote a blog post about it entitled Learn How to Manage Remote PowerShell Sessions, which might help. Also see the about_PSSessions PowerShell help topic.
Can you say more about what you're trying to accomplish?
Try Cmder. It's awesome! It even bundled with git for windows. http://cmder.net/
You don't specify your requirements, so it's somewhat hard to answer your post.
You could try the free Console, which can incorporate PowerShell tabs :
Console is a Windows console window enhancement. Console features include: multiple tabs, text editor-like text selection, different background types, alpha and color-key transparency, configurable font, different window styles.
For details see this article : Console – Windows Command Prompt alternative for Windows and PowerShell.
(Note: Remember that this answer is from 2012.)
it's been a while since I've used Windows but just came across https://wezfurlong.org/wezterm/features.html which would fit my requirements quite well
among other things it has tabs and vertical/horizontal splits
Although it wasn't possible when this question was originally asked, with Windows Subsystem for Linux, it's now possible to use a "real"
tmux to manage PowerShell windows.
In a WSL instance with
tmux installed, set up your
set -g default-command "cd $(pwsh.exe -c 'Write-Host -NoNewLine \$env:userprofile' | xargs -0 wslpath); exec pwsh.exe --nologo" set-window-option -g automatic-rename off bind c new-window -n "PowerShell"
Most of the features you'd normally expect from
There are several ways to set this up, but here's how I'm doing it at the moment:
Install Windows Subsystem for Linux. You don't have to enable WSL2; just WSL v1 will work fine for this (and perhaps better than WSL2).
Install the Alpine Linux distribution. I use this as the base for the tmux feature, since it has very low overhead (less than 12MB, including
The next few steps are optional. I create a new, cloned WSL instance for PowerShell tmux. You could just use the default Alpine instance, but I like to have single-purpose WSL instances, similar to Docker containers.
mkdir $env:userprofile\Documents\WSL\instances # Or wherever you want to set this up mkdir $env:userprofile\Documents\WSL\images cd $env:userprofile\Documents\WSL wsl --export Alpine .\images\alpine_base.tar mkdir .\instances\posh_tmux wsl --import posh_tmux .\instances\posh_tmux .\images\alpine_base.tar --version 1
Launch the WSL instance as root with
wsl -d posh_tmux -u root
adduser tmux, and give it a password.
Set the default user for the instance by creating
/etc/wsl.conf with the following contents:
[user] default = tmux
apk add tmux to install
Exit the session, relaunch with
wsl ~ -d tmux (omitting the username, since it will now default to the tmux user)
~/.tmux.conf with the following:
set -g default-command "cd $(pwsh.exe -c 'Write-Host -NoNewLine \$env:userprofile' | xargs -0 wslpath); exec pwsh.exe --nologo" set-window-option -g automatic-rename off bind c new-window -n "PowerShell" # Give this tmux a "PowerShell blue" color to differentiate it set -g status-bg blue # Use UTF8 set -qg utf8 set-window-option -qg utf8 on # Recommended, to avoid the Ctrl+B finger-gymnastics # Change default prefix to Screen's unbind C-b set-option -g prefix C-a bind-key C-a send-prefix bind-key -n C-b send-prefix bind C-a last-window # Optional # split panes using - and | bind | split-window -h bind - split-window -v unbind '"' unbind % set -g history-limit 10000 set -g default-terminal "screen-256color"
~/.profile with the following:
if tmux has-session -t=posh; then exec tmux attach-session -t posh else exec tmux new-session -s posh -n PowerShell fi
Set up a
PowerShell Core tmux profile in Windows Terminal, ConEmu, or however you prefer. The launch command is simply
wsl -d tmux_posh
If you need to access the instance without entering tmux/PowerShell (for instance, to
sudo apk upgrade or to edit the config), launch instead with
wsl ~ -d tmux_posh -e sh (or
wsl ~ -d tmux_posh -u root).
You can access
tmux commands from within PowerShell by
wsl -d tmux_posh -e tmux <tmux_command. For instance,
wsl -d tmux_posh -e tmux rename-window host1. TODO: Create a
tmux wrapper PowerShell function for this.
TODO: PowerShell prompt function to set the window name dynamically to the last executed command
I am partial to Extraterm, it has plenty of advanced functinality
it supports Powershell, wls, cmd, cwgyn, and more.
I recently ran into the issue myself. I was not happy with the current solutions (making multiple ssh connections in a tabbed console).
So I made my own tool (similar to tmux).
Dead simple to use, just extract and run bin/vimux. Or preferably add that bin folder to PATH to just run 'vimux'