deepin设置一个swap分区
Tofloor
poster avatar
91******86@qq.com
deepin
2016-06-04 02:12
Author
本帖最后由 devinme 于 2016-6-5 11:51 编辑

相信有人在安装deepin时没有设置swap分区,分享一个简单的方法设置一个swap分区


1.建立一个linux  swap分区(不熟悉linux分区,可在windows\pe系统下建立)

2.使用sudo blkid命令查看分区,找到建立的linux swap分区

3.使用在 root权限下mkswap命令设置交换分区

            mkswap /dev/sdb4


4.swapon 激活swap分区

        swapon /dev/sdb4

file:///tmp/WizNote/c78e9388-d36b-4e57-b1a4-c2a15f3b0566.png


5.设置系统启动时自动挂载。编辑/etc/fstab配置文件。

    可用 gedit  /etc/fstab命令;或直接去文件夹下改 (root权限进行)

在文件末尾增加:

/dev/sda4               swap                    swap    defaults        0 0


file:///tmp/WizNote/1838113987.png


[attach]20880[/attach]

6.查看swap状态free或cat /proc/swaps

[attach]20879[/attach]

[attach]20878[/attach]


file:///tmp/WizNote/2009896466.png

file:///tmp/WizNote/1918827294.png

file:///tmp/WizNote/2009896466.png

file:///tmp/WizNote/1918827294.png



Reply Favorite View the author
All Replies
avatar
Feng Yu
deepin
2016-06-04 03:09
#1
大开眼界,这么多年了,居然还能在论坛上看到经典的硬盘图
Reply View the author
avatar
MattD
deepin
2016-06-04 03:33
#2
大开眼界,C-c,C-v粘贴了两遍不说,前后还不一致,一会sda4一会sda5。
求删除此贴。
Reply View the author