<p>linux 查看文件系统类型</p><p>Linux 查看文件系统的方式有多种,列举如下:</p><p></p><p>1. mount</p><pre class="brush:bash;toolbar:false">:~$mount
/dev/sda1on/typeext4(rw,errors=remount-ro,user_xattr)
procon/proctypeproc(rw,noexec,nosuid,nodev)
noneon/systypesysfs(rw,noexec,nosuid,nodev)
noneon/sys/fs/fuse/connectionstypefusectl(rw)
noneon/sys/kernel/debugtypedebugfs(rw)
noneon/sys/kernel/securitytypesecurityfs(rw)
noneon/devtypedevtmpfs(rw,mode=0755)
noneon/dev/ptstypedevpts(rw,noexec,nosuid,gid=5,mode=0620)
noneon/dev/shmtypetmpfs(rw,nosuid,nodev)
noneon/var/runtypetmpfs(rw,nosuid,mode=0755)
noneon/var/locktypetmpfs(rw,noexec,nosuid,nodev)
noneon/lib/init/rwtypetmpfs(rw,nosuid,mode=0755)
noneon/var/lib/ureadahead/debugfstypedebugfs(rw,relatime)
noneon/proc/fs/vmblock/mountPointtypevmblock(rw)
binfmt_miscon/proc/sys/fs/binfmt_misctypebinfmt_misc(rw,noexec,nosuid,nodev)
gvfs-fuse-daemonon/home/kysnail/.gvfstypefuse.gvfs-fuse-daemon(rw,nosuid,nodev,user=kysnail)
:~$</pre><p>2. df</p><pre class="brush:bash;toolbar:false">:~$df-lhT
文件系统类型容量已用可用已用%挂载点
/dev/sda1ext419G11G7.8G57%/
nonedevtmpfs498M248K497M1%/dev
nonetmpfs502M252K501M1%/dev/shm
nonetmpfs502M96K502M1%/var/run
nonetmpfs502M0502M0%/var/lock
nonetmpfs502M0502M0%/lib/init/rw
nonedebugfs19G11G7.8G57%/var/lib/ureadahead/debugfs
:~$</pre><p>3. fdisk</p><pre class="brush:bash;toolbar:false">:~$sudofdisk/dev/sda
WARNING:DOS-compatiblemodeisdeprecated.It'sstronglyrecommendedto
switchoffthemode(command'c')andchangedisplayunitsto
sectors(command'u').
Command(mforhelp):c
DOSCompatibilityflagisnotset
Command(mforhelp):u
Changingdisplay/entryunitstosectors
Command(mforhelp):p
Disk/dev/sda:21.5GB,21474836480bytes
255heads,63sectors/track,2610cylinders,total41943040sectors
Units=sectorsof1*512=512bytes
Sectorsize(logical/physical):512bytes/512bytes
I/Osize(minimum/optimal):512bytes/512bytes
Diskidentifier:0x00077544
DeviceBootStartEndBlocksIdSystem
/dev/sda1*2048401059832005196883Linux
/dev/sda240108030419409919164815Extended
/dev/sda5401080324194099191648082Linuxswap/Solaris
Command(mforhelp):q</pre><p>4. file</p><pre class="brush:bash;toolbar:false">:~$sudofile-s/dev/sda
/dev/sda:x86bootsector;partition1:ID=0x83,active,starthead32,startsector2048,40103936sectors;partition2:ID=0x5,starthead254,startsector40108030,1832962sectors,codeoffset0x63
kysnail@ubunkysnail:~$sudofile-s/dev/sda1
/dev/sda1:Linuxrev1.0ext4filesystemdata,UUID=4942da40-8a49-4bfd-9dc2-45c906d48413(needsjournalrecovery)(extents)(largefiles)(hugefiles)
:~$</pre><p>5. parted</p><pre class="brush:bash;toolbar:false">:~$sudoparted
GNUParted2.2
使用/dev/sda
欢迎使用GNUParted!输入'help'可获得命令列表.
(parted)p
Model:VMware,VMwareVirtualS(scsi)
磁盘/dev/sda:21.5GB
Sectorsize(logical/physical):512B/512B
分区表:msdos
数字开始:End大小类型文件系统标志
11049kB20.5GB20.5GBprimaryext4启动
220.5GB21.5GB938MBextended
520.5GB21.5GB938MBlogicallinux-swap(v1)
(parted)</pre><p>6. 查看 fstab</p><pre class="brush:bash;toolbar:false">#/etc/fstab:staticfilesysteminformation.
#
#Use'blkid-ovalue-sUUID'toprinttheuniversallyuniqueidentifier
#foradevice;thismaybeusedwithUUID=asamorerobustwaytoname
#devicesthatworksevenifdisksareaddedandremoved.Seefstab(5).
#
#<filesystem><mountpoint><type><options><dump><pass>
proc/procprocnodev,noexec,nosuid00
#/wason/dev/sda1duringinstallation
UUID=4942da40-8a49-4bfd-9dc2-45c906d48413/ext4errors=remount-ro,user_xattr01
#swapwason/dev/sda5duringinstallation
UUID=935fb95d-771f-448e-9d23-4820106e1783noneswapsw00
/dev/fd0/media/floppy0autorw,user,noauto,exec,utf800</pre>