Skip to content

Instantly share code, notes, and snippets.

@selfboot
Last active May 29, 2017 03:14
Show Gist options
  • Save selfboot/f955dc89973298a90ba05772ebe56daa to your computer and use it in GitHub Desktop.
Save selfboot/f955dc89973298a90ba05772ebe56daa to your computer and use it in GitHub Desktop.
Linux commands often used.

Kernel Version

If you want kernel version information, use uname(1). For example:

$ uname -a
Linux cheapss 3.10.0-514.2.2.el7.x86_64 #1 SMP Tue Dec 6 23:06:41 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

Distribution Version

To find out what version of Linux (distro) you are running, enter the following command at the shell prompt:

$ cat /etc/*release
CentOS Linux release 7.3.1611 (Core)
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"

CentOS Linux release 7.3.1611 (Core)
CentOS Linux release 7.3.1611 (Core)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment