How to put a terminal in the VS Code or Cursor sidebar
VS Code's built-in terminal is awkward to reposition and can't live in the sidebar. Portaterm is a free extension that gives you a real terminal you can place in the primary sidebar, the secondary sidebar, the bottom panel, or an editor tab.
1. Install Portaterm
In VS Code, search Portaterm in the Extensions view or install it from the Marketplace. In Cursor, Windsurf, Antigravity, or VSCodium, search Portaterm too — it comes from Open VSX. You need VS Code 1.105+ or Cursor 3.2.21+.
2. Open it in the sidebar
Click the Portaterm icon in the Activity Bar. The view opens in the primary sidebar and a shell session starts automatically, in your workspace folder.
3. Move it anywhere else
- Secondary sidebar: drag the Portaterm icon to the secondary sidebar, or run Portaterm: Move to Secondary Sidebar from the Command Palette and pick the destination.
- Bottom panel: Portaterm also has a view in the panel, next to the built-in terminal. Run Portaterm: Focus Panel to open it.
- Editor tab: drag the view into any editor group, or run Portaterm: New Terminal in Editor.
Each location remembers its own state, and you can drag the view between them at any time.
4. Add tabs and split panes
Use the view's title bar to add tabs or split the terminal horizontally or vertically. Splits are recursive and resizable by dragging. A few things that help in a narrow sidebar:
- Pane zoom — Cmd+Shift+Enter (Ctrl+Shift+Enter on Windows and Linux) shows one pane at the tab's full size; press it again to get the layout back.
- Tab colors and icons — right-click a tab → Change Tab Color… or Change Tab Icon… to tell tabs apart.
- Embedded file tree — browse the workspace below the terminal and drag a row into a pane to insert its path.
Common questions
Does the terminal keep running when I reload the window?
Yes. Shells stay alive across window reloads. After a full restart, scrollback, tab names, working directory, and layout are restored, though the shell process itself starts fresh. See session restore.
Which shell does it use?
The same default shell as your editor. To choose another, set portaterm.shell.macOS, portaterm.shell.linux, or portaterm.shell.windows. See settings.
Does it follow my theme?
Yes. Portaterm is WebGL rendered and follows your dark, light, or high-contrast theme. Font size and family are inherited from the editor unless you set portaterm.fontSize or portaterm.fontFamily.
Next: browse and resume your Claude Code, Codex, and OpenCode sessions from the same terminal.
Last updated October 29, 2026.