how to get os version in ubuntu code example Example 1: check linux ubuntu version lsb_release -a Example 2: check ubuntu version cat /etc/os-release