Get Ubuntu Version Number Or Codename From Terminal

Posted By Weston Ganger

Sometimes you need to know what the codename or release number is for your Ubuntu computer. Heres how to simply get them from the terminal.

# to get all release information
lsb_release -a
# No LSB modules are available.
# Distributor ID:   Ubuntu
# Description:  Ubuntu 14.04.4 LTS
# Release:  14.04
# Codename: trusty

# to get only the release number
lsb_release --release | cut -f2
# 14.04

# to get only the codename
lsb_release --codename | cut -f2
# trusty

Related External Links:

Article Topic:Software Development - Linux

Date:June 21, 2016