标签:roo bsp 挂载 desktop das ls -l boot 设备信息 host
分区——>格式化——>挂载
[root@localhost ~]# ls -l /dev/sd*
分区:
[root@localhost ~]# fdisk /dev/sdb
[root@localhost ~]# ls -l /dev/sdb*
[root@localhost ~]# partprobe (同步分区信息)
格式化:
[root@localhost ~]# mkfs 两次Tab键
[root@localhost ~]# mkfs.xfs /dev/sdb1
挂载:
[root@localhost ~]# mkdir /haha
[root@localhost ~]# mount /dev/sdb1 /haha
[root@localhost ~]# df –h (查看设备信息)
永久挂载:
[root@localhost ~]# vim /etc/fstab
/dev/sdb1 /haha xfs defaults 0 0
[root@localhost ~]# mount -a
[root@localhost ~]# df –h
[root@localhost ~]# reboot
[root@localhost ~]# blkid (查看设备对应的文件系统的格式是什么)
[root@localhost ~]# df –h
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
交换分区:
[root@localhost ~]# free –m
分区:
[root@localhost ~]# fdisk /dev/sdb
[root@localhost ~]# ls -l /dev/sdb*
[root@localhost ~]# partprobe
[root@localhost ~]# ls -l /dev/sdb*
格式化:
[root@localhost ~]# mkswap /dev/sdb3 (格式化交换分区)
挂载:
[root@localhost ~]# free -m
[root@localhost ~]# swapon /dev/sdb3 (启动交换分区)
[root@localhost ~]# free -m
永久挂载:
[root@localhost ~]# vim /etc/fstab
/dev/sdb3 swap swap defaults 0 0
[root@localhost ~]# reboot
[root@localhost Desktop]# free –m
[root@localhost Desktop]# tail -2 /etc/fstab (查看文件尾部信息)
[root@localhost Desktop]# lsblk (查看硬盘信息)
标签:roo bsp 挂载 desktop das ls -l boot 设备信息 host
原文地址:https://www.cnblogs.com/dinghailong128/p/12178430.html