ubuntu:filesystem:determine_file_systems_type
Table of Contents
Ubuntu - Filesystem - Determine File Systems Type
Using dt
df -T /
result:
Filesystem Type 1K-blocks Used Available Use% Mounted on /dev/mapper/ubuntu--vg-root ext4 1920299296 1659133892 163549740 92% /
Using fsck
fsck -N /
result:
fsck from util-linux 2.31.1 [/sbin/fsck.ext4 (1) -- /] fsck.ext4 /dev/mapper/ubuntu--vg-root
Using lsblk
The lsblk command is used for displaying the block devices in a Linux machine. You can add the -f flag for telling lsblk to show the file system type.
lsblk -f
result:
NAME FSTYPE LABEL UUID MOUNTPOINT loop0 squashfs /snap/core/7917 loop1 squashfs /snap/gnome-characters/359 loop2 squashfs /snap/netbeans/18 loop3 squashfs /snap/pycharm-community/167 loop4 squashfs /snap/core18/1265 loop5 squashfs /snap/core/8039 loop6 squashfs /snap/gnome-3-26-1604/97 loop7 squashfs /snap/gnome-3-28-1804/91 loop8 squashfs /snap/core18/1223 loop9 squashfs /snap/gtk-common-themes/1313 loop10 squashfs /snap/gnome-calculator/536 loop11 squashfs /snap/gnome-3-28-1804/110 loop12 squashfs /snap/pycharm-community/163 loop13 squashfs /snap/gnome-characters/367 loop14 squashfs /snap/gnome-system-monitor/111 loop15 squashfs /snap/gnome-3-26-1604/98 loop16 squashfs /snap/gnome-logs/73 loop17 squashfs /snap/gtk-common-themes/1353 loop18 squashfs /snap/gnome-system-monitor/107 loop19 squashfs /snap/gnome-logs/81 loop20 squashfs /snap/netbeans/10 loop21 squashfs /snap/gnome-calculator/544 sda ├─sda1 vfat 6FE9-28C1 /boot/efi └─sda2 LVM2_member CbUWCI-RGrO-xTVQ-mrNL-YVHf-k8aq-ueMTgd ├─ubuntu--vg-root ext4 dcf9c103-2998-4698-aec6-b524aa1db1f0 / └─ubuntu--vg-swap_1 swap 618aa54e-e6f1-4c22-826d-23bd981be108 [SWAP]
Using mount
mount | grep "^/dev"
result:
/dev/mapper/ubuntu--vg-root on / type ext4 (rw,relatime,errors=remount-ro,data=ordered) /dev/sda1 on /boot/efi type vfat (rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
Using blkid
blkid /dev/sda1
result:
/dev/sda1: UUID="6FE9-28C1" TYPE="vfat" PARTUUID="8e53314c-0814-46cd-9f13-c2bb2b7a14b6"
Using file
sudo file -sL /dev/sda1
result:
/dev/sda1: DOS/MBR boot sector, code offset 0x58+2, OEM-ID "mkfs.fat", sectors/cluster 8, Media descriptor 0xf8, sectors/track 63, heads 255, hidden sectors 2048, sectors 1048576 (volumes > 32 MB), FAT (32 bit), sectors/FAT 1024, reserved 0x1, serial number 0x6fe928c1, unlabeled
Using fstab
cat /etc/fstab
result:
# /etc/fstab: static file system information. # # Use 'blkid' to print the universally unique identifier for a # device; this may be used with UUID= as a more robust way to name devices # that works even if disks are added and removed. See fstab(5). # # <file system> <mount point> <type> <options> <dump> <pass> /dev/mapper/ubuntu--vg-root / ext4 errors=remount-ro 0 1 # /boot/efi was on /dev/sda1 during installation UUID=6FE9-28C1 /boot/efi vfat umask=0077 0 1 /dev/mapper/ubuntu--vg-swap_1 none swap sw 0 0
Using parted
sudo parted -l
result:
Model: ATA CT2000MX500SSD1 (scsi) Disk /dev/sda: 2000GB Sector size (logical/physical): 512B/4096B Partition Table: gpt Disk Flags: Number Start End Size File system Name Flags 1 1049kB 538MB 537MB fat32 boot, esp 2 538MB 2000GB 2000GB lvm Model: Linux device-mapper (linear) (dm) Disk /dev/mapper/ubuntu--vg-swap_1: 1023MB Sector size (logical/physical): 512B/4096B Partition Table: loop Disk Flags: Number Start End Size File system Flags 1 0.00B 1023MB 1023MB linux-swap(v1) Model: Linux device-mapper (linear) (dm) Disk /dev/mapper/ubuntu--vg-root: 1999GB Sector size (logical/physical): 512B/4096B Partition Table: loop Disk Flags: Number Start End Size File system Flags 1 0.00B 1999GB 1999GB ext4
Using mtab
cat /etc/mtab | grep "/dev/sd*"
result:
tmpfs /dev/shm tmpfs rw,nosuid,nodev 0 0 /dev/sda1 /boot/efi vfat rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro 0 0
ubuntu/filesystem/determine_file_systems_type.txt · Last modified: 2020/07/15 09:30 by 127.0.0.1