To check the running LineageOS version from Termux, you can use standard Android shell commands. Here are the most reliable methods:
Run this command in Termux to extract the LineageOS version from the system properties:
bashgetprop ro.lineage.version
or
bashgetprop ro.modversion
This will return the LineageOS version (e.g., 18.1, 20, etc.).
If the above doesn't work, you can check the Android version, which often matches the LineageOS base:
bashgetprop ro.build.version.release
This will show the Android version (e.g., 11, 12, 13), which corresponds to LineageOS 18.1, 19, 20, etc.
For more details, use:
bashgetprop ro.build.display.id
This will show something like lineage_<device>-userdebug 11 RQ3A.211001.001 eng.<builder>.20230101.000000 dev-keys, where 11 is the Android version.
If your device has the LineageOS Updater app, you can also check its logs or run:
bashsu -c "pm list packages | grep updater"
Then inspect the updater app's version or logs for the OS version.
Note:
su) for some commands.getprop, ensure Termux has access to Android’s shell environment.