linux一般怎麼分區
產品型號:Thinkpad E15
系統版本:centos8
案例:在sdb盤上建一個分區,大小爲1G
在虛擬機上添加一塊硬盤
例:對sdb這塊盤劃分一個100M的分區出來
[root@xuegod63 ~]# fdisk /dev/sdb
...
Command (m for help): m
Command action
a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
d delete a partition 刪除分區
g create a new empty GPT partition table
G create an IRIX (SGI) partition table
l list known partition types 顯示分區類型
m print this menu 打印幫助菜單
n add a new partition 添加新的分區
o create a new empty DOS partition table
p print the partition table 顯示分區表
q quit without saving changes 不保存,退出
s create a new empty Sun disklabel
t change a partition's system id 改變分區類型
u change display/entry units
v verify the partition table
w write table to disk and exit 寫分區表信息到硬盤,保存操作並退出
x extra functionality (experts only)
Command (m for help): p -----打印分區表
Command (m for help): n ----新建一個分區
Partition type:
p primary (2 primary, 0 extended, 2 free) p:主分區
e extended e:擴展分區
Select (default p): --#直接默認
Using default response p
Partition number (1,4, default 1): ---#直接默認
First sector (1230848-41943039, default 1230848): ---#直接默認
Using default value 1230848
Last sector, +sectors or +size{K,M,G} (1230848-41943039, default 41943039): +1G
#輸入分區大小
Partition 3 of type Linux and of size 1 GiB is set
Command (m for help): w #保存退出
格式化並創建文件系統
[root@xuegod63 ~]# mkfs.xfs /dev/sdb1
注:-f 參數可以對已經存在文件系統的分區,強制格式化
[root@xuegod63 ~]# mkdir /sdb1 #創建掛載點
[root@xuegod63 ~]# mount /dev/sdb1 /sdb1/#掛載
[root@xuegod63 ~]# df -h #查看
總結:
1. 添加硬盤
2. fdisk /dev/sdb創建分區
3. mkfs.xfs /dev/sdb1格式化並創建文件系統
4. 創建掛載目錄/sdb1
5. 掛載/dev/sdb1到/sdb1
-
微博怎麼顯示手機型號,微博如何顯示手機型號
微博怎麼顯示手機型號:1、首先需要點擊手機桌面中的微博。2、然後再點擊屏幕右下方的我的。3、然後再點擊屏幕上方的設置圖標。4、然後再點擊會員專屬設置。5、然後再點擊微博來源。6、最後選擇想要顯示的手機型號就可以了。...
-
qq空間無訪問權限怎麼進入
如果你的qq好友設置了qq空間權限,那麼是沒有辦法強制進入對方的空間的,只能通過正當方式訪問,得到空間權限主人許可後進入;或者是通過回答問題,只要回答正確即可進入空間。QQ空間就像我們的日記本一樣,我們可以自由地在裏面記錄自己的心情,也可以把具有紀念意義的照片...
-
清潔手機的方法
1、準備溼紙巾、手機清潔劑、細小的清潔毛刷、清潔布(或像眼鏡布這類超細纖維材質的布)、吸塵貼紙。2、溼紙巾用於簡單清潔手機表面的污垢和灰塵;手機清潔劑用於對手機外殼一些頑固的污垢進行清理;毛刷可以用於對耳機孔、充電口或者機身一些縫隙進行灰塵清理;清潔布...
-
微信羣裏怎麼拍一拍,具體操作步驟
1、操作步驟:首先打開手機上的【微信】。2、打開微信之後,我們點擊打開羣好友【聊天窗口】。3、打開聊天窗口後,我們快速雙擊【好友的頭像】。4、雙擊好友後,對方就收到消息【拍了拍你】雙方的聊天窗口都會有提示。...