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!

Byobu Autostart

Byobu is a great terminal multiplexer.

You can usually get it on a debian system via:

    • apt install byobu

After it’s installed, just invoke it from the cli:

    • byobu

Now that it’s open, here some common navigation tips:

  • F1 – Brings up the Help and Configuration page
  • F2 – Opens another terminal.  This is indicated at the bottom via: 2:–
  • F3 – Change focus,/go FORWARD one screen.
  • F4 – Change focus/go BACK one screen.

At any time you may look at bottom to see which session you are in:   1:–, 2:–, 3:–, etc

Those commands are the most used and will get you goign in a jiffy, however there are many other options you can read about on the Help page, which can be accessed via F1.

One thing we get alot is, “How do you set it to auto start when I log in?

Easy, just type:

    • byobu-enable

Don’t want it to autostart anymore?  Type:

byobu-disable

That’s it!

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

USB Speeds

Here are current USB speeds for easy comparison.

USB SPEEDS

Speeds are theoretical under ideal conditions.  Real-world speeds vary and are usually slightly less than advertised..

  • USB 1.0   12Mbps or 1.5 MBps
  • USB 2.0   480 Mbps or 60 MBps
  • USB 3.0   5Gbps or 625 MBps
  • USB 3.1   10Gbps or 1.25 GBps
  • USB 3.2    20 Gbps or 2.5GBps

Acronym and Definitions

  • Mbps = Mega bits per second
  • MBps = Mega BYTES per second
  • Gbps = Giga bits per second
  • GBps = Gig BYTES per second
  • One byte = eight bits (1Byte = 8bits)
  • Kilo = Thousand
  • Mega = Million
  • Giga = Billion
  • Tera = Trillion