Linux Command Line Check Physical Disk Size

I am going to show you how to get the physical disk size for every disk in your system.

First, open a shell so you can access the command line (CLI). If you are on a server, you should already be there, unless you installed a GUI.

With the CLI ready, there two great commands you can use. They are:

df -HT

fdisk -l | grep Disk

Use either or both of those commands to get the disk sizes. If you get a “permission denied” message, just put sudo front of the command.

I hope that helps!

Find Your Linux Version

The CLI commands to find your Linux version are easy as pie, but they are also easy as pie to forget.  Let this post be your goto reminder.  To use these commands, simply open a terminal shell. Then type in any of the commans below.  Don’t type the dollar sign that’s preceding each command;  It just represents the shell prompt.

My Favorite Way

hostnamectl

KERNEL INFO

All Kernel Information

$ uname -a

Abbreviated Kernel Version

$ uname -r

DISTRIBUTION AND VERSION

$ lsb_release -a

or…

$ cat /etc/lsb-release

or…

$ cat/etc/issue.net

Also try…

Ubuntu

$ lsb_release -a

Debian

$ cat /etc/debian_version

CentOS

$ cat /etc/centos-release