Admin tabs and the default terminal (Windows)
On Windows, zterm can open admin shells as tabs, and it can be the terminal Windows uses for every program that opens a console window, such as a script you double-click or a tool that asks to run as administrator.
Both need zterm installed with its installer. A zterm you copied or built yourself runs normally, but Windows can't hand it anything.
Admin tabs
Open the menu beside + and pick one of the (Admin) entries, such as PowerShell (Admin) or CMD (Admin). Every shell zterm lists has one; shells you haven't used often are under Other Shells. Windows asks for permission with its usual UAC prompt, and the shell opens as a tab.
An admin tab wears a shield where its icon goes. It opens in a separate zterm window that runs as administrator, not in the window you started from. The rest of this page says why.
In that admin window, + and every entry in the menu open admin shells directly, without asking again: the window already runs as administrator. Running zterm itself as administrator opens the same admin window.
Make zterm the default terminal
Set default_terminal to true in Settings (the command palette's Settings, or the settings file). From then on, a program that opens a console window of its own opens as a tab in zterm instead:
- a script or program you double-click in Explorer
- a tool's installer that runs a console
- a script that asks to run as administrator (
Start-Process -Verb RunAs), which opens in the admin window once you approve it
Setting it back to false puts back whichever terminal Windows used before, such as Windows Terminal or the classic console window. Windows' own Settings page doesn't list zterm, because that list only shows terminals installed from the Microsoft Store, so this setting is the place to change it.
zterm applies the setting when it starts and whenever the setting changes. If another program makes itself the default while the setting is on, zterm takes it back the next time it starts.
Windows you meant to be hidden can appear as tabs. Some scripts and tools start PowerShell with -WindowStyle Hidden. That hides the window only after the console exists, and by then Windows has already handed it to the default terminal. So such a console appears briefly as a zterm tab. Windows Terminal does the same when it's the default. A program that starts its console hidden from the beginning is unaffected.
Why admin tabs get their own window
An admin shell can change anything on the machine, so what can type into it matters.
In an ordinary zterm window, zterm runs as you, not as administrator. If an admin shell lived there, any program running as you could reach it: by sending keystrokes to zterm's window, by reaching into zterm's process, or through zterm's control socket. None of those needs your permission, so a program you never approved could run admin commands.
The admin window runs as administrator, and Windows keeps ordinary programs out of administrator windows. They can't send them keystrokes or reach into their processes. So an admin shell is only as reachable as any other admin window on your machine.
The control socket follows the same line:
- The ordinary window's socket never touches an admin pane, whatever
pane_access_controlallows or you have approved. - The admin window has a socket of its own, and only programs running as administrator can use it. A tool or agent running in an admin tab can drive the admin window as usual, and anything else is refused.