r/PowerShell • • Feb 10 '26

PSMUX: Native tmux for PowerShell — split panes, sessions, detach/attach — no WSL needed

For anyone who's wanted tmux functionality in PowerShell without installing WSL:

psmux is a native Windows terminal multiplexer that works exactly like tmux. Same commands, same keybindings, zero learning curve if you already know tmux.

Why this exists:

  • Needed tmux-style session management on Windows servers
  • Didn't want WSL overhead just for terminal multiplexing
  • Wanted to SSH into Windows boxes and still have pane splitting

Quick install:

winget install psmux

or

cargo install psmux

Or: scoop install psmux | choco install psmux

What you get:

  • Ctrl+b % — split horizontal | Ctrl+b " — split vertical
  • Ctrl+b d — detach session | psmux attach — reattach
  • psmux ls — list sessions
  • psmux new-session -s work — named sessions
  • Mouse support for pane resizing
  • Copy mode with vim keybindings
  • Scriptable (send-keys, capture-pane, etc.)

The tmux command alias is included, so your muscle memory works.

Just⭐the repo if you like it and feel free to raise any issues

Repo: https://github.com/psmux/psmux

Developed and actively maintained with LOTs of ❤️ for Powershell

Anyone using terminal multiplexing on Windows? What's your current setup?

25 Upvotes

61 comments sorted by

View all comments

Show parent comment

1

u/uniquerunner Feb 11 '26

Sorry? Not AI slop. There is no drop-in-replacement for Tmux for Powershell other than psmux.

2

u/dodexahedron Feb 11 '26 edited Feb 11 '26

WT has native support for panes.

PS has session multiplexing both locally and remotely, and sessions are persistent by default already.

And openssh has single-socket session multiplexing remotely.

WT is already tmux. With either of the other 2, it is more than tmux.

The capabilities are not very discoverable, though, which I think is their biggest issue.

3

u/uniquerunner Feb 12 '26 edited Feb 12 '26

First, The purpose is different! PSMUX delivers much more for tmux use case! It's not a competitor to WT!

WT does not support Tmux customizations, tmux themes and tmux plugins.

Windows Terminal panes are GUI-only and don't work headless. No true session persistence; everything dies when the window closes.

Compare to tmux/PSMux (native PowerShell tmux alternative in Rust): Win Terminal lacks headless/SSH support (GUI-bound), detach/reattach sessions (no persistence across logouts), synchronized input across panes, and full scripting (just basic CLI launches). PSMux delivers all that natively for PowerShell without WSL headaches. You get server-side multiplexing as it should be

1

u/cherrycola1234 Feb 12 '26

"Windows Terminal panes are GUI-only and don't work headless. No true session persistence; everything dies when the window closes." -

This statement above is completely WRONG!

Windows Terninal can run headless, Windows even has a optional switch to be able to enable and run headless Windows Terminals & even the entire OS can run headless if you so choose. Windows is not bound to a desktop only view, you can easily run anything within Windows headless or even itself headless so your statement is incorrect & completely misleading.

1

u/No_Business_1696 Mar 22 '26

Can you link me to some source of how to run terminal headless?

1

u/uniquerunner Apr 04 '26 edited Apr 04 '26

https://github.com/psmux/psmux

PSMux can help you run Powershell headless.

Just do

winget install psmux

psmux new -s d "headless"

That's it! Your headless session is running! Psmux ❤️ Powershell!

1

u/No_Business_1696 Apr 06 '26

Thanks i was aware of this already. I was more so curious about what op was referring to

1

u/uniquerunner Feb 12 '26 edited Feb 12 '26

Windows Terminal is a GUI application. You agree?

Factually, it is.

PSMUX is not!

While WT supports a "headless" preview feature ("compatibility.allowHeadless": true in settings.json) to keep the process alive in the background after closing windows,for shortcuts like global hotkeys ,this still depends on the Windows GUI subsystem and fails without a display.

psmux works the same way no matter how you use it with or without a gui. it runs INSIDE the console.

As I already mentioned, PSMUX is not an alternative to powershell or WT. it is designed to work with WT/Pwsh.

1

u/dodexahedron Feb 12 '26

While I am making an assumption here, I think their point at least partially overlaps with mine, which is to say that there is significant functionality overlap.

I'll adjust my current wording here to be more along the lines of what I really wanted to get across, originally, which is less of a criticism and more just suggesting that maybe you look into leveraging the built-in facilities for some of these things, where/if possible, if you haven't already.

2

u/uniquerunner Feb 12 '26

Sure, that's how it's meant to work, together. It leverages native apis.

1

u/Eddyi0202 Apr 03 '26

If PS has sessions multiplexing, how to create, detach, switch between them like in tmux? 

3

u/dodexahedron Apr 04 '26

Create: New-PSSession if just raw PS. For window/tab management, use the various wt arguments that are similar to tmux.

Detach: exit (does not end remote OR loopback sessions by default)

Switch: (Connect|Enter|Receive)-PSSession

For an overview of a range of session handling capabilities:

Get-Help about_PSSessions

And if running from windows terminal, here's full help for all pssession cmdlets, each in its own tab in the current window named for the command help being displayed:

get-command -Noun PSSession |% { wt -w 0 nt --title $_.Name -- pwsh -NoLogo -c "Get-Help -Full $($_.Name)" }

Also of note for things that don't need interactivity, be sure to check out about_Jobs and related topics.

And if you are working on remote systems and using PowerShell remoting over SSH, all you have to do is use -Options with New-PSSession or your ssh_config file to use ssh native multiplexing to the remote host over a single socket, on top of it all.

2

u/MiserableTear8705 Apr 04 '26

It’s always funny when people are limited by the way things work in the Linux space when Powershell is an EXTREMELY powerful and versatile shell. To me, inarguably more advanced than Bash at this point. Especially considering you can do remote object passing natively……at that point, what Shell? 😂

2

u/dodexahedron Apr 04 '26

For real. PowerShell is amazing. I love me my linux machines, but they ALL have powershell.

csh or a php shell or a perl shell or a python shell all come close-ish, but none does as much as nor does it as well as powershell.

Plus there's the entire .net ecosystem behind it, if you need anything that isn't already available in a module in the first place. It's like Perl + CPAN but modern and just...better.

And...

You can always use tmux, this project, or whatever else you want on top of, underneath, or beside powershell, if doing so makes your workflow easier in some way.(which is OP's stated goal, in fairness).

I just think that last point is even more redundant with PS than with other shells, since the learning curve is so much shallower AND the first-party documentation on precisely that functionality is both existent and easily accessible online or offline, and in text mode or in a Windows XAML-based GUI with extra bells and whistles.

And the pull-based, object-aware pipeline as its own concept in parallel with stdout/stderr, all on its own, blows just about every other shell out of the water.

1

u/uniquerunner Apr 04 '26

Totally agree! I seriously love Powershell and that's what led me to build Tmux dedicated to Powershell.

Until now, people thought they needed Linux for running htop or tmux but now all these are just available in Powershell 🤷‍♂️

winget install pstop

winget install psmux

→ More replies (5)

1

u/Eddyi0202 Apr 04 '26

What do you mean limited? You can't replicate tmux functionality with pwsh. Yes, powershell is powerful, I find it more please to write scripts as a dotnet dev but as a daily shell it has its issues mainly with performance.  Usually I don't need all those fancy features pwsh is giving

1

u/Eddyi0202 Apr 04 '26

Thanks for this, I didn't new about it, will check it out!

But still with just WT and Powershell you can't achieve tmux like workspace/session management. 

For example currently I am creating new tmux session for each project I am working on, each of that session has usually 2-3 windows and I am switching between them with fzf. 

Ideally WT should handle such case, similarly to Wezterm or Kitty. Maybe they will implement it some day

2

u/dodexahedron Apr 04 '26 edited Apr 04 '26

Well, it does, in combination with pwsh.

It's just a different separation than you're used to, and partially inverted if you're comparing to the terminal + bash + tmux model, where bash is the shell and only a shell, tmux is a windowing and session multiplexer, and the terminal is just a host for it all, sometimes with extra features.

So, first, remember that wt and powershell are completely independent things. WT is a terminal emulator with windowing, tabs, panes, layouts, etc., much like konsole.

Powershell is, all at once, almost an entire text/object mode operating system/virtual environment, combining a full CLR implementation, a shell, and a session, job, task, and event manager.

The beauty of it is that you can still use it like the old way, and that's perfectly fine. Or you can use shims to make it feel like you're used to (like psmux), which is also perfectly cool. Or you can do it the native way, which is simply different.

If all you do is treat pwsh as a replacement for bash in the same hierarchy, then yeah - it doesn't do what you want, because you're using it as only a shell.

So instead of konsole (or just a raw vt) hosting bash, which is hosting tmux, which is hosting multiple bash instances, you instead can have wt hosting multiple ps instances. Done.

If things like psmux - whether they also embrace that paradigm or just treat pwsh as a drop-in for another shell - make your life even a teensy bit better, then awesome! I'm not gonna yuk your yum. But any assertion that the built-in tools with wt + pwsh can't replicate bash + tmux + bash + pwsh (or other arrangements) are simply a product of lack of exposure to what it can very intentionally do (as in not just because it's Turing complete or something like that - actual targeted features for real use cases, just from a fresh PoV).

What things like psmux could bring to the table that I'd love to see is easing the integration of other stuff, like ssh multiplexing, marrying that with everything else. That's something that tmux doesn't do and that otherwise requires the use of either configuration of ssh (which is simple but not default, nor documented terribly well) or command line parameters to ssh (or pwsh, since it passes it through) and consistent usage of them to achieve, no matter the shell.

I'd love it if tmux, psmux, and/or pwsh itself, in addition to what they already do on the remote end, also paid attention from the client side of things when ssh is involved and opportunistically used things which already exist. Again using ssh multiplexing as the example, pretty simple use of that can enable a lot more than just multiple consoles on that one socket (think x, rdp, nfs/cifs/etc mounts, remote UDS use, and more, and all without port forwarding), but it just goes unused by default. Exposing THAT kind of functionality with simple key binds rather than manual commands and configuration or using that multiplexing to keep the client up to date on all windows in the session, rather than only the visible ones in the active screen buffer, would be awesome and a marked advancement over the status quo.

1

u/uniquerunner Apr 04 '26

PSMUX supports SSH Multiplexing

Yes Ofcourse, It does exactly what you need. Psmux supports creating multiple sessions over ssh, detaching and attaching even if you disconnect, reconnect and come back.

Server Side possible?

I am able to use Windows 11 remotely via ssh, run multiple psmux sessions, disconnect ssh, reconnect ssh, come back and attach to it.

If you mean using multiple ssh sessions on the client side, that is also possible.

Whatever you're saying is part of Psmux. That's what I have been working hard to bring to Windows for the past 90+ days!

Client side possible?

Ofcourse! one command

bind-key C new-window "ssh user@yourserver.example.com"

Tell me a specific scenario if you're working with any specific tool and I will try to provide you a solution to your problem using PSMUX. I am confident because I have developed it from the ground up. It's based on over 20+ years of my experience in using Linux and Windows. I've used shells and Powershell definitely is unique and valuable which obviously led me in this path to support Windows Powershell exclusively.

Note that PSMUX is for Windows. It's not crossplatform , not for Linux. That part is already taken care of by Tmux, the inspiration to create this.

1

u/Eddyi0202 Apr 04 '26

Yeah, I don't argue about powershell well..power and I admit that I feel that using is just as a shell feels wasteful but the issue is that that basically there is no real alternative on windows. Cmd, git bash, cmder and other things are limited. 

There is nushell which embrace similar concept of treating command output as objects as opposed to just text but it's relatively new. 

I get that WT is not tied in any way to pwsh, I use it with WSL a lot and must say that it's currently the best terminal emulator for windows. 

As for sessions, I only use them on my local machine, no remote ones. Maybe I am missing something but AFAIU from your answer it's still not possible to replicate tmux workflow with just pwsh(any other shell) + WT since WT does not support such concept as workspace/session (meaning a group of tabs/windows tied together) and ability to switch between them. 

One way would be to utilize window manager/virtual desktops altough it's not very efficient. 

Kinda off-topic but I guess agentic AI workflows might motivate terminal emulator creators to implement such concept since it's very usefull for organizing parallel work. 

2

u/uniquerunner Apr 04 '26

Claude Code Agent Teams works fantastically on Windows because of PSMUX!

Quite a few projects on github use PSMUX for Agentic use.

1

u/Eddyi0202 Apr 04 '26

Btw what's your goal with this project long term?
Are you going to just keep in sync with upstream or it will diverge in terms of features?

2

u/uniquerunner Apr 04 '26

It's aimed to only bringing Tmux on Windows. I think Tmux was a missing piece. I myself needed Tmux so badly on Windows and that's how this came about.

This project is limited to scope to only that. Slight corners maybe a bit better here and there, for example mouse support by default, the popup view for switching panes,etc Tmux in Linux needs a plugin to enable mouse support.

But, overall, it's aimed at making the existing Tmux cross platform by implementing an exact clone with different technologies for Windows. This doesn't use any part of the original Tmux source. It rebuilds everything again in Rust from the foundation all the way up.

Non Tmux features is left to Plugin creators and others who make use of Tmux/Psmux or create plugins for it.

1

u/Sirios_ Aug 21 '26

oh sure, right. Now I'm going to go connect to WT via SSH (sarcasm) 🤦. Saying that WT is already there is like saying that you already have shoes on and don't need socks.

1

u/dodexahedron Aug 22 '26

WT is already there on every supported windows desktop release out there right now. WS2022, yeah, you need to install it manually. But only if you're literally using WT on that server - which you're not unless you're already in an rdp session to it.

WT is not what you connect to via ssh. It is a terminal emulator - not a shell. You can't ssh to wt. It is client-side. You also can't ssh to tmux (except as a login shell, in which case the comparison switches to powershell instead - and novody uses tmux as their login shell).

You ssh to the ssh server, which invokes whatever shell is default for the user or whatever subsystem it is told to invoke on connect (a well-documented one-liner to add pwsh to it if you don't have it in there already, such as on a Linux system).

WT is windows' answer to konsole, gnome terminal, etc.. PowerShell has the "server" features that tmux/screen are often used for. Enter-pssession is similar to tmux attach-session - just on a per-pane basis, because the UI layout layer is in WT itself already.
Or you can use runspaces to have multiple powershell runspaces in the same powershell session, which is like a more advanced form of bash job control (ps also has jobs, for a simpler and more bash-like job system).

Regardless...
Any argument that consists of a sarcastic "oh right like I'll connect to/install/etc [First party solution that is probably already present anyway on the workstation you're sitting at]" when the implied alternative is that you'll install a third-party solution instead is a pretty self-contradictory argument.

This is not about tmux. It is about a thing that replicates its behavior locally - which WT and PS already do just fine.

→ More replies (1)