
一、df -lh 命令
df 是来自于coreutils 软件包,系统安装时,就自带的;我们通过这个命令可以查看磁盘的使用情况以及文件系统被挂载的位置;
[root@localhost ~]# df -l
文件系统 容量 已用 可用 已用% 挂载点
/dev/sda3 4956316 3565088 1135396 76% /
tmpfs 241320 12 241308 1% /dev/shm
/dev/sda6 4806904 2523708 2039012 56% /media/disk
/dev/sda1 4956284 3529796 1170656 76% /media/_
/dev/sda5 4845056 2581484 2019388 57% /media/disk-1
可以看到系统挂在sda3上,另外还挂了sda6/sda1/sda5三个系统。
二、fdisk -l 命令
fdisk 是一款强大的磁盘操作工具,来自util-linux软件包,我们在这里只说他如何查看磁盘分区表及分区结构;通过-l 参数,能获得机器中所有的硬盘的分区情况;
[root@localhost ~]# fdisk -l
Disk /dev/sda: 40.0 GB, 40000000000 bytes
255 heads, 63 sectors/track, 4863 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x62a9f8d0
Device Boot Start End Blocks Id System
/dev/sda1 * 1 637 5116671 83 Linux
/dev/sda2 638 891 2040255 82 Linux swap / Solaris
/dev/sda3 892 1528 5116702+ 83 Linux
/dev/sda4 1529 2744 9767520 5 Extended
/dev/sda5 1529 2136 4883728+ 83 Linux
/dev/sda6 2137 2744 4883728+ 83 Linux
============ 欢迎各位老板打赏~ ===========


与本文相关的文章
- · 单台服务器应用不中断服务热部署滚动更新方案
- · docker安装code-server
- · centos8安装源
- · SSL 证书免费,自动续期的web服务器Caddy
- · centos安装node18
- · nginx日志按天分割
- · 解决Linux实例磁盘空间满问题
- · centos yum安装Python3.8(史上最简单)
- · linux查看端口占用 netstat -tln|grep 8080
- · 解决jenkins git@github.com: Permission denied (publickey)
- · centos安装chrome+chromedriver
- · 修改FRP默认的http404页面后自行编译