Displays TurnKey Linux version information https://www.turnkeylinux.org
Find a file
Marcos Méndez 21d5d1173f
All checks were successful
security / security (push) Successful in 1m24s
package / build (push) Successful in 4m11s
Merge pull request 'ci: Forgejo workflows for git.pop.coop' (#4) from ci/forgejo-workflows into keel/trixie
2026-10-14 20:05:01 -03:00
.forgejo/workflows ci: Forgejo workflows for git.pop.coop 2026-10-14 22:34:53 +00:00
.github/workflows ci: actions/checkout v4 to v7, Node 24 2026-10-07 21:08:25 +00:00
debian chore: Keel Linux maintainers in debian/control 2026-10-07 14:16:03 +00:00
release_notes Move new release notes to proper location & proper file ext (doh!) 2026-07-27 11:02:31 +10:00
sysversion debian: 1.1.3+keel1, the version string comes from /etc/keel_version 2026-10-02 17:42:06 +00:00
.gitignore Update gitignore to ignore common build assets and cache files 2026-06-09 07:39:53 +10:00
pyproject.toml Temporarily allow missing copyright notice from code files 2026-07-27 11:02:31 +10:00
README.md readme spelling fix 2026-06-11 10:21:57 +10:00
RelNotes-1.1.3.txt Add release notes (note new format - needs more testing) 2026-07-27 09:17:26 +10:00
turnkey-version Handle both malformed string and invalid file 2026-07-23 12:17:34 +10:00

TurnKey version tool and basic system info python library

turnkey-version is a tool to read and/or parse TurnKey version info.

sysversion is a python library that backs turnkey-version and also gathers basic system information (used by TurnKey custom MOTD generation).


turnkey-version usage

usage: turnkey-version [-h] [-f PATH_TO_FILE] [-s TKL_VER_STR] [-n] [-t] [-c]
                       [-r] [-a] [-j] [-d]
                       [rootfs]

TurnKey Linux Version information

positional arguments:
  rootfs                Path to root filesystem, defaults to '/'. Will read
                        file 'ROOTFS/etc/turnkey_version'.

optional arguments:
  -h, --help            show this help message and exit
  -f PATH_TO_FILE, --file PATH_TO_FILE
                        Absolute (i.e. leading /) or relative (to current;
                        i.e. no leading /) path to file containing turnkey
                        version string. NOTE: conflicts with -s|--string.
  -s TKL_VER_STR, --string TKL_VER_STR
                        Process a string, instead of reading from a
                        file.('turnkey-' prefix optional). NOTE: Conflicts
                        with -f|--file.

Output options:
  Return space separated values, or all values in json format. NOTE: If
  multiple elements returned, the order will always be: 'NAME VERSION
  CODENAME ARCH' (regardless of switch order).

  -n, --name            Return TurnKey appliance name. E.g. core.
  -t, --tklversion      Return TurnKey version number. E.g. 16.0.
  -c, --codename        Return relevant Debian codename. E.g. buster.
  -r, --arch            Return relevant architecture. E.g. amd64
  -a, --all             Return space separated name, version, codename & arch.
                        (Same as -ntcr).
  -j, --json            Return all name info in json format (conflicts with
                        other output options).

Additional output options:
  Return additional values. If no other output options specified, these will
  be the only output. Otherwise, these values will be appended after any
  other results returned, either space separated, or if -j|--json, as
  additional key, value pairs.

  -d, --debian-codename
                        Return system's reported Debian codename (not TurnKey
                        version codename). If rootfs set, then return codename
                        of chroot.