发布于 2023-11-07 14:48:38 来源:衡天主机 作者:衡天编辑组
<pstyle="box-sizing:inherit;margin-top:0px;margin-bottom:16px;white-space-collapse:preserve;color:#606468;font-family:-apple-system,BlinkMacSystemFont,'SegoeUI','NotoSans',Helvetica,Arial,sans-serif,'AppleColorEmoji','SegoeUIEmoji';font-size:16px;background-color:#f7f7f8;">在Linux系统中,可以使用以下命令来查看分区信息:
<codestyle="box-sizing:inherit;font-family:ui-monospace,SFMono-Regular,'SFMono',Menlo,Consolas,'LiberationMono',monospace;font-size:13.6px;padding:0.2em0.4em;margin:0px;white-space-collapse:break-spaces;background-color:var(--color-neutral-muted);border-radius:6px;">fdisk-l:此命令会显示所有磁盘及其分区的详细信息,包括分区类型、大小、起始扇区等。<pstyle="box-sizing:inherit;margin-top:0px;margin-bottom:16px;white-space-collapse:preserve;color:#606468;font-family:-apple-system,BlinkMacSystemFont,'SegoeUI','NotoSans',Helvetica,Arial,sans-serif,'AppleColorEmoji','SegoeUIEmoji';font-size:16px;background-color:#f7f7f8;">示例输出:<prestyle="box-sizing:inherit;font-family:ui-monospace,SFMono-Regular,'SFMono',Menlo,Consolas,'LiberationMono',monospace;font-size:13.6px;margin-top:16px;margin-bottom:16px;overflow-wrap:normal;padding:16px;overflow:auto;line-height:1.45;background:#e6e7e9;border-radius:6px;transition:background0.1sease-in-out0s;color:#606468;"><codestyle="box-sizing:inherit;font-family:ui-monospace,SFMono-Regular,'SFMono',Menlo,Consolas,'LiberationMono',monospace;font-size:16px;padding:0px;margin:0px;background:transparent;border-radius:6px;word-break:normal;border:0px;display:inline;overflow:visible;line-height:1.6;overflow-wrap:normal;">Disk/dev/sda:100GiB,107374182400bytes,209715200sectorsDiskmodel:VirtualDiskUnits:sectorsof1512=512bytesSectorsize(logical/physical):512bytes/512bytesI/Osize(minimum/optimal):512bytes/512bytesDisklabeltype:dosDiskidentifier:0xdeadbeefDeviceBootStartEndSectorsSizeIdType/dev/sda1204810239991021952499M83Linux/dev/sda2102400020971519920869120099G83Linux<codestyle="box-sizing:inherit;font-family:ui-monospace,SFMono-Regular,'SFMono',Menlo,Consolas,'LiberationMono',monospace;font-size:13.6px;padding:0.2em0.4em;margin:0px;white-space-collapse:break-spaces;background-color:var(--color-neutral-muted);border-radius:6px;">lsblk:这个命令可以以树状结构显示磁盘和分区的信息,包括挂载点、大小、文件系统类型等。<pstyle="box-sizing:inherit;margin-top:0px;margin-bottom:16px;white-space-collapse:preserve;color:#606468;font-family:-apple-system,BlinkMacSystemFont,'SegoeUI','NotoSans',Helvetica,Arial,sans-serif,'AppleColorEmoji','SegoeUIEmoji';font-size:16px;background-color:#f7f7f8;">示例输出:<prestyle="box-sizing:inherit;font-family:ui-monospace,SFMono-Regular,'SFMono',Menlo,Consolas,'LiberationMono',monospace;font-size:13.6px;margin-top:16px;margin-bottom:16px;overflow-wrap:normal;padding:16px;overflow:auto;line-height:1.45;background:#e6e7e9;border-radius:6px;transition:background0.1sease-in-out0s;color:#606468;"><codestyle="box-sizing:inherit;font-family:ui-monospace,SFMono-Regular,'SFMono',Menlo,Consolas,'LiberationMono',monospace;font-size:16px;padding:0px;margin:0px;background:transparent;border-radius:6px;word-break:normal;border:0px;display:inline;overflow:visible;line-height:1.6;overflow-wrap:normal;">NAMEMAJ:MINRMSIZEROTYPEMOUNTPOINTsda8:00100G0disk├─sda18:10499M0part/boot└─sda28:2099G0part/<codestyle="box-sizing:inherit;font-family:ui-monospace,SFMono-Regular,'SFMono',Menlo,Consolas,'LiberationMono',monospace;font-size:13.6px;padding:0.2em0.4em;margin:0px;white-space-collapse:break-spaces;background-color:var(--color-neutral-muted);border-radius:6px;">parted-l:类似于<codestyle="box-sizing:inherit;font-family:ui-monospace,SFMono-Regular,'SFMono',Menlo,Consolas,'LiberationMono',monospace;font-size:13.6px;padding:0.2em0.4em;margin:0px;white-space-collapse:break-spaces;background-color:var(--color-neutral-muted);border-radius:6px;">fdisk-l,显示磁盘和分区的详细信息。<pstyle="box-sizing:inherit;margin-top:0px;margin-bottom:16px;white-space-collapse:preserve;color:#606468;font-family:-apple-system,BlinkMacSystemFont,'SegoeUI','NotoSans',Helvetica,Arial,sans-serif,'AppleColorEmoji','SegoeUIEmoji';font-size:16px;background-color:#f7f7f8;">示例输出:<prestyle="box-sizing:inherit;font-family:ui-monospace,SFMono-Regular,'SFMono',Menlo,Consolas,'LiberationMono',monospace;font-size:13.6px;margin-top:16px;margin-bottom:16px;overflow-wrap:normal;padding:16px;overflow:auto;line-height:1.45;background:#e6e7e9;border-radius:6px;transition:background0.1sease-in-out0s;color:#606468;"><codestyle="box-sizing:inherit;font-family:ui-monospace,SFMono-Regular,'SFMono',Menlo,Consolas,'LiberationMono',monospace;font-size:16px;padding:0px;margin:0px;background:transparent;border-radius:6px;word-break:normal;border:0px;display:inline;overflow:visible;line-height:1.6;overflow-wrap:normal;">Model:VirtualDisk(scsi)Disk/dev/sda:107GBSectorsize(logical/physical):512B/512BPartitionTable:msdosDiskFlags:NumberStartEndSizeTypeFilesystemFlags11049kB525MB524MBprimaryext4boot2525MB107GB106GBprimaryext4<pstyle="box-sizing:inherit;margin-top:0px;margin-bottom:0px;white-space-collapse:preserve;color:#606468;font-family:-apple-system,BlinkMacSystemFont,'SegoeUI','NotoSans',Helvetica,Arial,sans-serif,'AppleColorEmoji','SegoeUIEmoji';font-size:16px;background-color:#f7f7f8;">通过这些命令,可以方便地查看和了解Linux系统中的分区信息。