Use fsck to check and repair a file system. The file system must be unmounted when being check and repaired to prevent corruption!
The root file system can not be unmounted and checked. Two possible options to check the system are:
sudo tune2fs -l /dev/sda1 | grep -i check
.cd /
sudo touch forcefsck
df -h
sudo fdisk -l
. (This is a disk partition command. Be careful with use.)sudo parted -l
. (This is a disk partition command, more modern than fdisk. Be careful with use.)sudo du --max-depth=1 --all -h
sudo vim /etc/fstab
. (Be careful with editing this.)sudo tune2fs -l /dev/sdX
The ‘’lsblk’’ command has a lot of information returned. The ‘’tune2fs’’ command is used by the system administrator to change/modify tunable parameters on ext2, ext3 and ext4 type filesystems. The command to display filesystem information is ‘’tune2fs -l /dev/sda2’’. The ‘’df’’ command lists current mounted disks.
lsblk
by itself give the basic drive partition and mount point information.lsblk -o NAME,MODEL,SERIAL,WWN,HCTL,MOUNTPOINT
gives more comprehensive information: lsblk –help
to list all the options