import subprocess subprocess.run(['cat', '/etc/os-release']) ↓ ... VERSION="18.04.4 LTS (Bionic Beaver)" ...