Check file systems with df -T
In this step, you will learn how to check the file systems on your Linux system using the df
command. The df
command is used to display the amount of disk space available on the file systems.
File systems are the way that data is organized and stored on a storage device, like a hard drive or SSD. Different file systems have different features and are used for different purposes.
To see the disk space usage and the type of file system, we will use the df
command with the -T
option. The -T
option tells df
to include the file system type in the output.
Open your terminal if it's not already open. Type the following command and press Enter:
df -T
You will see output similar to this:
Filesystem Type 1K-blocks Used Available Use% Mounted on
overlay overlay XXXXXXXX XXXXXXXX XXXXXXXX XX% /
tmpfs tmpfs XXXXXXXX XXXXXXXX XXXXXXXX XX% /dev
tmpfs tmpfs XXXXXXXX XXXXXXXX XXXXXXXX XX% /sys/fs/cgroup
/dev/vda1 ext4 XXXXXXXX XXXXXXXX XXXXXXXX XX% /etc/hosts
shm tmpfs XXXXXXXX XXXXXXXX XXXXXXXX XX% /dev/shm
tmpfs tmpfs XXXXXXXX XXXXXXXX XXXXXXXX XX% /run/secrets
tmpfs tmpfs XXXXXXXX XXXXXXXX XXXXXXXX XX% /proc/scsi
tmpfs tmpfs XXXXXXXX XXXXXXXX XXXXXXXX XX% /sys/firmware
/dev/vda1 ext4 XXXXXXXX XXXXXXXX XXXXXXXX XX% /home/labex/project
Let's break down the output:
Filesystem
: The name of the file system.
Type
: The type of the file system (e.g., overlay
, tmpfs
, ext4
).
1K-blocks
: The total size of the file system in 1K blocks.
Used
: The amount of space used on the file system.
Available
: The amount of free space available.
Use%
: The percentage of space used.
Mounted on
: The directory where the file system is mounted (attached) to the file system hierarchy.
You can see different file system types like overlay
, tmpfs
, and ext4
. ext4
is a common journaling file system for Linux. tmpfs
is a temporary file system that resides in memory. overlay
is often used in container environments like Docker.
Understanding file systems and how to check their usage is a fundamental skill in Linux system administration.
Click Continue to proceed to the next step.