Hey! I'm available for hire (and I appreciate tips)  



Here ya go:

#!/usr/bin/env sh
#/usr/local/bin/version
echo `head -n 1 /etc/apt/sources.list | cut -d' ' -f 3` `cat /etc/issue | cut -d' ' -f 1-2`

Go ahead and put that in /usr/local/bin/version to call at your goodwill and pleasure.

By Name: head -n 1 /etc/apt/sources.list | cut -d' ' -f 3
By Number: cat /etc/issue
By Kernel: uname -r

Other methods:
lsb_release -a
cat /etc/lsb-release

Appendix A:
http://ubuntu-tutorials.com/2007/01/27/how-to-find-your-ubuntu-or-kernel-version/

By AJ ONeal

Was this useful to you? Share it!

Also, you can give me a tip or hire me.


Published

2010-3-12

Categories


Tags