# Terminal sync — the panel and the shell always agree

> cwdio keeps the file panel and the embedded terminal on the same folder both ways: navigate and the shell follows; cd and the panel moves. PowerShell, cmd, bash, WSL.

- Canonical: https://cwdio.com/features/terminal-sync/
- Updated: 2026-08-15
- Product: Cwdio File Manager (cwdio) — https://cwdio.com

Every other file manager makes you tell it where you are twice — once by clicking, once by typing. cwdio keeps
the two in step, in both directions, and that is the whole idea behind the name: `cwd` is where you are, `io`
is the work.

## What it does

- **Panel → terminal.** Navigate the active panel — double-click a folder, press <kbd>Backspace</kbd> to go
  up, jump with <kbd>Ctrl+J</kbd> — and the idle terminal bound to that pane runs a `cd` to the same folder.
  Its tab title updates to the folder's name.
- **Terminal → panel.** Type `cd src` in a focused terminal and the active panel moves to `src`. Run a script
  that ends somewhere else and the panel is there when it finishes.
- **Many terminals, one each.** Open a terminal per pane; each tracks its own folder. <kbd>Ctrl+Shift+&#96;</kbd>
  opens another session; the terminal group's `▾` picker chooses the shell.
- **Remote too.** On an SFTP connection the pane's terminal is an SSH shell on the same connection, and the
  sync works between the remote folder and the remote prompt.

## How to use it

1. Press <kbd>Ctrl+&#96;</kbd> (or <kbd>Ctrl+O</kbd>) to show the terminal. It opens in the folder the active
   panel is already showing — nobody types a path.
2. Move around in the panel; watch the prompt follow. Type `cd ..` in the terminal; watch the panel follow.
3. Need the current file in a command? <kbd>Ctrl+Enter</kbd> inserts the cursor file's name into the command
   line and <kbd>Ctrl+Shift+Enter</kbd> its full path — the Total Commander habit, kept.

There is also an always-visible **command line** under the panels (the Midnight Commander model): type a
command and it runs in the active terminal session, in the panel's folder.

## Which shells

The profile picker is not a static list. cwdio discovers the shells you actually have, the way Windows
Terminal does: **PowerShell** and **Windows PowerShell**, **Command Prompt**, **one profile per installed WSL
distribution**, **Git Bash** where Git for Windows is installed, **Visual Studio developer shells** where
Visual Studio is, and any launchable profile from Windows Terminal's own `settings.json` and fragment
extensions. Discovery is best-effort and cached; if a source is missing you simply get the base three.

The two-way sync relies on the shell reporting its directory through **OSC 7** — the same escape sequence
modern terminals use for shell integration. cwdio wires that up for PowerShell, cmd and bash automatically.
A shell that does not report (a bare `python`, say) still runs; it just cannot move the panel.

## What it deliberately does not do

- It never `cd`s a **busy** terminal. If a command is running, cwdio does not interrupt it with a `cd`;
  the sync resumes once the shell is idle again. That is what keeps a long-running job from being
  interrupted by a click, and keeps the two directions from chasing each other in a loop.
- It does not detach a terminal into a separate OS window. Terminals are dock panels — you can drag them
  beside, below or on top of the file panels, but they stay in the cwdio window.
- The terminal owns its own keys. When the terminal has focus, the shell sees your keystrokes; the file
  manager's shortcuts resume the moment focus returns to a panel.

## Related

- [Dual panes, tabs and the dockable workspace](/features/dual-pane-and-tabs/) — where terminals live in the layout.
- [Remote servers as folders](/features/remote-sftp-ftp/) — the SSH shell on an SFTP connection.
- [Keyboard shortcuts](/docs/keyboard-shortcuts/) — the full table, including the terminal chords.

## Frequently asked questions

**Which shells does the sync work with?** PowerShell (7 and Windows PowerShell), Command Prompt and bash — including Git Bash and the shells inside WSL distributions — announce their working directory to cwdio through OSC 7 shell integration, so the sync is two-way for all of them. Any other shell still runs in the terminal; it just does not report its folder, so only the panel-to-terminal direction works.

**Does the terminal follow every panel or just one?** Each terminal is bound to one pane. Open one terminal per pane and each tracks its own folder; the active terminal is the one the active panel drives.

**Can I turn the sync off?** Yes. View ▸ Sync terminal to folder toggles it; it is on by default. With it off, the terminal is an ordinary embedded terminal that stays where you left it.

**Does it work over SSH?** Yes. When an SFTP connection is open, the terminal for that pane is a real SSH shell on the same connection, and the same working-directory sync applies between the remote panel and the remote shell.
