Disk & Partition¶
Bash
mount -t ext4 /dev/sdb1 /data
mount | column -t # 查看挂接的分区状态
fdisk # manipulate disk partition table
swapon -s # 查看所有交换分区
hdparm -i /dev/hda # 查看磁盘参数(仅适用于IDE设备)
free -m # Display amount of free and used memory in the system
df -h # report file system disk space usage
lsblk # list block devices
resize2fs # ext2/ext3/ext4 file system resizer
e2fsck # check a Linux ext2/ext3/ext4 file system
磁盘格式化分区,并开机挂载:
- 查看磁盘
- 磁盘分区
- 磁盘格式化
- 开机挂载硬盘,在 /etc/fstab 中添加
- 建立软链接
修改卷标名:
-
查看卷标
-
umount
-
修改卷标名
-
solve problem of "g++: internal compiler error: Killed (program cc1plus)"