# libtmux.common.get_version

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

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

Return tmux version.

If tmux is built from git master, the version returned will be the latest
version appended with -master, e.g. ``2.4-master``.

If using OpenBSD's base system tmux, the version will have ``-openbsd``
appended to the latest version, e.g. ``2.4-openbsd``.

## Parameters

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

## Returns

:class:`distutils.version.LooseVersion`
    tmux version according to *tmux_bin* if provided, otherwise the
    system tmux from :func:`shutil.which`
