挂载文件系统 mount
mount [-t fstype] filesystem dir ##mount /dev/sdb /data
卸载文件系统 umount
umount /dev/sdb
umount /data
显示所有块设备 lsblk
root@ubuntu:/var# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 20G 0 disk
├─sda1 8:1 0 19G 0 part /
├─sda2 8:2 0 1K 0 part
└─sda5 8:5 0 1022M 0 part [SWAP]
sr0 11:0 1 1024M 0 rom
硬盘分区或者查看磁盘使用情况 fdisk
root@ubuntu:/var# fdisk -l
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 39845887 39843840 19G 83 Linux
/dev/sda2 39847934 41940991 2093058 1022M 5 Extended
/dev/sda5 39847936 41940991 2093056 1022M 82 Linux swap / Solaris
查看磁盘空间及挂载点 df
root@ubuntu:/dev# df -h
Filesystem Size Used Avail Use% Mounted on
udev 470M 0 470M 0% /dev
tmpfs 98M 5.8M 92M 6% /run
/dev/sda1 19G 11G 7.1G 61% /
tmpfs 488M 0 488M 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 488M 0 488M 0% /sys/fs/cgroup
tmpfs 98M 0 98M 0% /run/user/1000