Linux File System Info: View with df, du, lsblk
In Linux systems, there are several ways to view file system information.
- Use the df command: It can be used to display the disk space usage of the file system. You can view information for all file systems with the following command.
df -h
- To check the disk space usage of a specified file or directory, you can use the du command. Use the following command to view the disk space usage of the current directory.
du -h
- To utilize the lsblk command: you can display information about block devices in the system, such as disk partitions and mount points, by using the lsblk command. Use the following command to view information about all block devices.
lsblk
- To check the partition status of a disk, you can use the fdisk command. Use the following command to view the partition status of a specific disk (e.g. /dev/sda):
fdisk -l /dev/sda
The commands above can assist you in viewing the file system information on a Linux system. Choose the appropriate command based on your specific needs to view the desired information.