# libtmux.common._query_version

- **Module:** libtmux.common
- **Package:** libtmux
- **Language:** Python
- **Kind:** function
- **Source:** https://github.com/tmux-python/libtmux/blob/036c521c4b83ce6e434eb50afe2a0d08a6a05e46/src/libtmux/common.py#L400
- **Page:** https://libtmux.org/reference/py/libtmux-common-_query_version/

```
libtmux.common._query_version(tmux_bin: str | None = None) -> str
```

Return the raw ``tmux -V`` version token, letter suffix intact.

Runs ``tmux -V`` and extracts the version token (e.g. ``"3.7a"``,
``"master"``, ``"next-3.8"``). Not memoized -- :func:`get_version` and
:func:`get_version_str` each cache their own result on top of this query.

## Parameters

- `tmux_bin` (str | None) — Path to tmux binary. If *None*, uses the system tmux.

## Returns

str
    Raw version token from ``tmux -V``.

## Raises

- `_TmuxVersionUnavailable` — tmux predates the ``-V`` flag; callers apply
:func:`_no_version_flag_fallback`.
- `VersionTooLow` — tmux reported another error on ``-V``.
