redhat

How To Check Running Version of Linux

Share on LinkedIn

To check the version of Linux your system is running, simply run the following command:

cat /etc/*-release

 

Your output will look similar to this:

CentOS Linux release 7.0.1406 (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 Linux release 7.0.1406 (Core)
CentOS Linux release 7.0.1406 (Core)

Check Free Disk Space In CentOS and Linux

Both Linux and Unix offer commands to check free disk space.

Check disk usage and free disk space

df -h

or

df -k

 

View how much space one or more files or directories is using

du -sh

-s option summarize the space a directory is using and -h option provides “Human-readable” output

 

Examples of these commands being used and the outputs:

Linux df command

 

 

 

 

 

 

To display the size of files in a given directory:

du -sh *

or

du -csh *