linux 查看文件系统类型

左手的ㄟ右手 2023-10-18 09:58 218阅读 0赞

linux 查看文件系统类型
Linux 查看文件系统的方式有多种,列举如下:

  1. mount

    1. :~$ mount
    2. /dev/sda1 on / type ext4 (rw,errors=remount-ro,user_xattr)
    3. proc on /proc type proc (rw,noexec,nosuid,nodev)
    4. none on /sys type sysfs (rw,noexec,nosuid,nodev)
    5. none on /sys/fs/fuse/connections type fusectl (rw)
    6. none on /sys/kernel/debug type debugfs (rw)
    7. none on /sys/kernel/security type securityfs (rw)
    8. none on /dev type devtmpfs (rw,mode=0755)
    9. none on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
    10. none on /dev/shm type tmpfs (rw,nosuid,nodev)
    11. none on /var/run type tmpfs (rw,nosuid,mode=0755)
    12. none on /var/lock type tmpfs (rw,noexec,nosuid,nodev)
    13. none on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
    14. none on /var/lib/ureadahead/debugfs type debugfs (rw,relatime)
    15. none on /proc/fs/vmblock/mountPoint type vmblock (rw)
    16. binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
    17. gvfs-fuse-daemon on /home/kysnail/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=kysnail)
    18. :~$
  2. df

    1. :~$ df -lhT
    2. 文件系统 类型 容量 已用 可用 已用% 挂载点
    3. /dev/sda1 ext4 19G 11G 7.8G 57% /
    4. none devtmpfs 498M 248K 497M 1% /dev
    5. none tmpfs 502M 252K 501M 1% /dev/shm
    6. none tmpfs 502M 96K 502M 1% /var/run
    7. none tmpfs 502M 0 502M 0% /var/lock
    8. none tmpfs 502M 0 502M 0% /lib/init/rw
    9. none debugfs 19G 11G 7.8G 57% /var/lib/ureadahead/debugfs
    10. :~$
  3. fdisk

    1. :~$ sudo fdisk /dev/sda
    2. WARNING: DOS-compatible mode is deprecated. It"s strongly recommended to
    3. switch off the mode (command "c") and change display units to
    4. sectors (command "u").
    5. Command (m for help): c
    6. DOS Compatibility flag is not set
    7. Command (m for help): u
    8. Changing display/entry units to sectors
    9. Command (m for help): p
    10. Disk /dev/sda: 21.5 GB, 21474836480 bytes
    11. 255 heads, 63 sectors/track, 2610 cylinders, total 41943040 sectors
    12. Units = sectors of 1 * 512 = 512 bytes
    13. Sector size (logical/physical): 512 bytes / 512 bytes
    14. I/O size (minimum/optimal): 512 bytes / 512 bytes
    15. Disk identifier: 0x00077544
    16. Device Boot Start End Blocks Id System
    17. /dev/sda1 * 2048 40105983 20051968 83 Linux
    18. /dev/sda2 40108030 41940991 916481 5 Extended
    19. /dev/sda5 40108032 41940991 916480 82 Linux swap / Solaris
    20. Command (m for help): q
  4. file

    1. :~$ sudo file -s /dev/sda
    2. /dev/sda: x86 boot sector; partition 1: ID=0x83, active, starthead 32, startsector 2048, 40103936 sectors; partition 2: ID=0x5, starthead 254, startsector 40108030, 1832962 sectors, code offset 0x63
    3. kysnail@ubunkysnail:~$ sudo file -s /dev/sda1
    4. /dev/sda1: Linux rev 1.0 ext4 filesystem data, UUID=4942da40-8a49-4bfd-9dc2-45c906d48413 (needs journal recovery) (extents) (large files) (huge files)
    5. :~$
  5. parted

    1. :~$ sudo parted
    2. GNU Parted 2.2
    3. 使用 /dev/sda
    4. 欢迎使用 GNU Parted! 输入 "help"可获得命令列表.
    5. (parted) p
    6. Model: VMware, VMware Virtual S (scsi)
    7. 磁盘 /dev/sda: 21.5GB
    8. Sector size (logical/physical): 512B/512B
    9. 分区表:msdos
    10. 数字 开始: End 大小 类型 文件系统 标志
    11. 1 1049kB 20.5GB 20.5GB primary ext4 启动
    12. 2 20.5GB 21.5GB 938MB extended
    13. 5 20.5GB 21.5GB 938MB logical linux-swap(v1)
    14. (parted)
  6. 查看 fstab

    1. # /etc/fstab: static file system information.
    2. #
    3. # Use "blkid -o value -s UUID" to print the universally unique identifier
    4. # for a device; this may be used with UUID= as a more robust way to name
    5. # devices that works even if disks are added and removed. See fstab(5).
    6. #
    7. # <file system> <mount point> <type> <options> <dump> <pass>
    8. proc /proc proc nodev,noexec,nosuid 0 0
    9. # / was on /dev/sda1 during installation
    10. UUID=4942da40-8a49-4bfd-9dc2-45c906d48413 / ext4 errors=remount-ro,user_xattr 0 1
    11. # swap was on /dev/sda5 during installation
    12. UUID=935fb95d-771f-448e-9d23-4820106e1783 none swap sw 0 0
    13. /dev/fd0 /media/floppy0 auto rw,user,noauto,exec,utf8 0 0

发表评论

表情:
评论列表 (有 0 条评论,218人围观)

还没有评论,来说两句吧...

相关阅读