All technological notes.
disk in RHEL can be carved up into several partitions.partition information
MBR or GPTMBR/ GPT job:
Master Boot Record (MBR)
2TBMBR allows the creation of three types of partition:
Globally Unique Identifiers (GUID) Partition Table (GPT)
UEFI firmware| Command | Description |
|---|---|
lsblk |
List information about block devices. |
lsblk -l |
Shows a list-style output (each block device on one line). |
lsblk -f |
Displays information about block devices, including filesystem type |
lsblk -o NAME,SIZE,TYPE,MOUNTPOINT |
Customizes output columns (e.g., name, size, type, mountpoint). |
lsblk -d |
Displays information about block devices but excludes their partitions. |
lsblk -r |
Excludes devices that are removable (e.g., USB drives). |
lsblk --output NAME,FSTYPE,UUID |
Displays specified columns (name, filesystem type, and UUID). |
sudo blkid |
Display all block devices attributes. |
sudo blkid /dev/nvme0n1p1 |
Display a specific block device. |


| CMD | DESC |
|---|---|
smartctl -a /dev/sda1 |
Display SMART health information for the disk /dev/sda1. |
fdisk -l |
List partition tables of all disks |
fdisk device_name |
Start editing a specific disk |
df
df
# Filesystem 1K-blocks Used Available Use% Mounted on
# devtmpfs 1830312 0 1830312 0% /dev
# tmpfs 1860416 0 1860416 0% /dev/shm
# tmpfs 1860416 9768 1850648 1% /run
# tmpfs 1860416 0 1860416 0% /sys/fs/cgroup
# /dev/mapper/rhel_rhelhost-root 27245572 7114196 20131376 27% /
# /dev/nvme0n1p1 1038336 278688 759648 27% /boot
# tmpfs 372080 12 372068 1% /run/user/42
# tmpfs 372080 4 372076 1% /run/user/1000
| Col | Desc |
|---|---|
| Filesystem | The file system or disk partition in use. |
| 1K-blocks | Total space in 1K blocks for the file system. |
| Used | The space currently used (in 1K blocks). |
| Available | The space available for use (in 1K blocks). |
| Use% | The percentage of space used. |
| Mounted on | The mount point where the file system is attached in the directory tree. |
| Filesystem Name | Type | Purpose | Mounted on |
|---|---|---|---|
/dev/mapper/rhel_rhelhost-root |
ext4 (or LVM) |
The root file system where the operating system and user files reside. | / |
/dev/nvme0n1p1 |
ext4 |
To store boot files like the kernel and initramfs. | /boot |
devtmpfs |
devtmpfs |
for device files created by the kernel. | /dev |
tmpfs |
tmpfs |
shared memory (RAM-based). | /dev/shm |
tmpfs |
tmpfs |
for runtime data like logs and PID files. | /run |
tmpfs |
tmpfs |
for managing control groups (cgroups). | /sys/fs/cgroup |
tmpfs |
tmpfs |
for user-specific runtime data (for user ID 42). | /run/user/42 |
tmpfs |
tmpfs |
for user-specific runtime data (for user ID 1000). | /run/user/1000 |
tmpfs
temporary file systemFeatures:
/dev/shm:
/run:
/run/user/[user_id]:
/sys/fs/cgroup
devtmpfs
device nodes (special files representing hardware devices like disks, USB devices, network interfaces, etc.), which are used to interact with hardware components.kernel, which speeds up device initialization and simplifies the process of device node creation.Purpose:
devtmpfs creates the corresponding device node automatically in the /dev directory./dev/sdb or /dev/ttyUSB0 for it.devtmpfs provides the initial set of device nodes needed for the system to access devices like the root file system, essential hardware drivers, and other kernel components.udev:
devtmpfs provides the initial device nodes, the udev daemon takes over after the system boot to handle additional device events and rules for device node creation, removal, and management.Common Example:
/dev: the path that devtmpfs is mounted on and where device files are stored
/dev/null, /dev/zero: Special files used by applications for reading/writing./dev/sda, /dev/sdb: Disk devices./dev/tty0, /dev/ttyUSB0: Terminal devices./dev/random, /dev/urandom: Random number generators./dev/mapper/rhel_rhelhost-root
LVM (Logical Volume Manager) in Linux.logical volume (LV)that
volume group (VG)root file system (/) of the operating system.Breakdown:
/dev/mapper/:
LVM (Logical Volume Manager).mapper directory contains device files for logical volumes (LVM, encrypted devices, etc.).mapper is a virtual device that represents logical volumes, RAID volumes, and other block-level devices.rhel_rhelhost:
Volume Group (VG) that contains the logical volume.Volume Group
physical volumes (PVs) from which logical volumes (LVs) are created.rhel_rhelhost:
Volume Group that was created during the system installation (likely associated with a Red Hat Enterprise Linux (RHEL) system).root:
Logical Volume (LV) within the Volume Group.logical volume represents a virtualized partition or file system.logical volume named root typically contains the root file system (/), where the operating system files and user data are stored./dev/nvme0n1p1 at /boot
mounted to the /boot directory, indicating its purpose to store files necessary for the system to boot.
| Command | Description |
|---|---|
df |
Report file system disk usage. |
df -a |
show all disk space usage |
df -h |
Display disk usage in human-readable format. |
df -BM |
Display disk usage in MB size |
df -T |
Include file system type in the output. |
df -h \| sort -k5 -r |
sort disk usage by use% |
| Command | Description |
|---|---|
du |
Display space usage of the current directory. |
du --max-depth=num |
Display space usage only for num depth |
du target_dir |
Display space usage of the target directory. |
du -sh target_dir |
Summarize size of target directory in human-readable format. |
du target_file |
Display space usage of the target file. |
du -h target_file |
Display space usage of the target file in human-readable format |