# Tabs (/docs/v0.1/using/tabs)



A tab owns one pane layout. Each client chooses which tab it is viewing.

## Create and close [#create-and-close]

| Keys                           | Result                           |
| ------------------------------ | -------------------------------- |
| <kbd>\<C-t></kbd> <kbd>n</kbd> | Create a tab with one shell pane |
| <kbd>\<C-t></kbd> <kbd>x</kbd> | Close the current tab            |

```bash
koshi new-tab
koshi close-tab --tab <TAB_ID>
koshi close-tab --tab <TAB_ID> --force
```

`new-tab` prints the new tab id, then its root pane id. Inside koshi, an omitted
session means the current one. Outside koshi, pass `--session` unless exactly
one session is running.

Closing a tab closes every pane and process inside it.

## Switch [#switch]

| Keys                 | Result       |
| -------------------- | ------------ |
| <kbd>Tab</kbd>       | Next tab     |
| <kbd>Shift+Tab</kbd> | Previous tab |

```bash
koshi next-tab
koshi previous-tab
koshi focus-tab --index 0
koshi focus-tab --tab <TAB_ID>
```

Tab indexes are zero-based. Focus is per client; pass `--client` when choosing
which attached terminal to move.

## Reorder [#reorder]

```bash
koshi move-tab --tab <TAB_ID> --index 0
```

`move-tab` changes session order without changing the tab's pane layout.
