不见春山
骑马倚斜桥,满楼红袖招。
Home
Categories
Archives
Tags
About
Home
Linux 创建 Swap 分区
Linux 创建 Swap 分区
取消
Linux 创建 Swap 分区
由
ctaoist
发布于 2019-02-15
·
最后更新:2021-12-07
1
a.创建交换文件 ```sh fallocate -l 4G /swapfile # or dd if=/dev/zero of=/swapfile bs=1M count=4096 ``` b.设置可访问权限 ```sh chmod 600 /swapfile ``` c.格式化文件 ```bash mkswap /swapfile ``` d.激活swap空间 ```sh swapon /swapfile ``` f.开机自动启用swap空间 编辑/etc/fstab,添加下面这一句: ```sh /swapfile none swap default 0 0 ``` 或者在 /etc/rc.local 中添加: ```sh swapon /swapfile ``` > ArchLinux 中默认没有 `rc.local` 服务,需要自己创建.
Linux
Linux
该博客文章由作者通过
CC BY 4.0
进行授权。
分享
最近更新
群晖升级 ARPL 笔记
本地部署大语言模型
WireGuard 搭建组网教程
LVM 管理
HK1 RBOX X4 电视盒子折腾笔记
热门标签
机器学习
Tensorflow
Linux
VPN
虚拟组网
Router
ROS
嵌入式
C++
C
文章目录
MDK(Keil) 分散加载
Zerotier 之 Moon搭建