The Physical Hardware Interface
In Ubuntu Linux, “everything is a file.” This fundamental philosophy means that even your physical hard drives, USB flash drives, and solid-state disks are represented as files inside the operating system. These specific hardware representation files are known as “Block Devices.” They are named block devices because the operating system reads and writes data to them in massive, strictly sized chunks (blocks), rather than reading them one character at a time. If you are auditing a server to see exactly how many physical drives are currently connected to the motherboard, you cannot use a standard search; you must instruct the search engine to look specifically for these hardware files.
Using the find Command with -type b
The Linux find command utilizes the -type b flag (lowercase B for “block”) to completely ignore standard text files, directories, and symlinks, returning only the raw physical storage devices.
- Open your Terminal application (Ctrl + Alt + T) or log into your server via SSH.
- Because all hardware devices are mounted in the device directory, type the following command to scan the
/dev/folder: sudo find /dev/ -type b- Press Enter and provide your administrator password.
Identifying the Drives
The command will output a list of block device files. You will typically see entries starting with /dev/sda or /dev/nvme0n1. These represent your primary hard drives. If you plug a new USB flash drive into the server and run the command again, you will instantly see a new block device (like /dev/sdb) appear in the list, confirming that the Linux kernel has successfully recognized the new physical hardware.