# libtmux.common.get_version_str

- **Module:** libtmux.common
- **Package:** libtmux
- **Language:** Python
- **Kind:** function
- **Source:** https://github.com/tmux-python/libtmux/blob/38e368c11117fb4aeb2f082d552cd4f210eae06a/src/libtmux/common.py#L435
- **Page:** https://libtmux.org/en/py/stable/reference/libtmux-common-get_version_str/

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

Return the tmux version string verbatim, preserving letter suffixes.

:func:`get_version` normalizes point releases for numeric comparison
(``"3.7a"`` becomes ``LooseVersion("3.7")``). This helper keeps the raw
suffix, so callers can distinguish patch releases whose behavior differs
-- for example the tmux 3.7 [break-pane](/en/tmux/latest/manual/break-pane/) crash, reverted in 3.7a.

### Notes

Memoized via :func:`functools.cache`, keyed on *tmux_bin*, independently of
:func:`get_version`. Call ``get_version_str.cache_clear()`` after swapping
the tmux binary.

## Examples

```python
>>> isinstance(get_version_str(), str)
True
```

## Parameters

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

## Returns

str
    Raw tmux version, e.g. ``"3.7a"``. Git builds return ``"master"``;
    OpenBSD base tmux returns ``"<max>-openbsd"``.
