ubuntu增加swap空间
来源:互联网 发布:淘宝服装店起名字大全 编辑:程序博客网 时间:2024/05/18 03:34
matthew@matthew:/$ sudo mkdir swap
mkdir: 无法创建目录"swap": 文件已存在
matthew@matthew:/$ cd swap/
matthew@matthew:/swap$ ls
matthew@matthew:/swap$ sudo dd if=/dev/zero of=swapfile bs=1024 count=8000000
记录了8000000+0 的读入
记录了8000000+0 的写出
8192000000字节(8.2 GB)已复制,63.6394 秒,129 MB/秒
matthew@matthew:/swap$ sudo swapon swap
swapon: swap:stat 失败: 没有那个文件或目录
matthew@matthew:/swap$ sudo mkswap -f swapfile
正在设置交换空间版本 1,大小 = 7999996 KiB
无标签, UUID=e84aa9ab-ac1a-45b5-8be5-abc06133e85a
matthew@matthew:/swap$ sudo swapon swapfile
matthew@matthew:/swap$ free -m
total used free shared buffers cached
Mem: 7886 7727 158 0 7 6951
-/+ buffers/cache: 768 7117
mkdir: 无法创建目录"swap": 文件已存在
matthew@matthew:/$ cd swap/
matthew@matthew:/swap$ ls
matthew@matthew:/swap$ sudo dd if=/dev/zero of=swapfile bs=1024 count=8000000
记录了8000000+0 的读入
记录了8000000+0 的写出
8192000000字节(8.2 GB)已复制,63.6394 秒,129 MB/秒
matthew@matthew:/swap$ sudo swapon swap
swapon: swap:stat 失败: 没有那个文件或目录
matthew@matthew:/swap$ sudo mkswap -f swapfile
正在设置交换空间版本 1,大小 = 7999996 KiB
无标签, UUID=e84aa9ab-ac1a-45b5-8be5-abc06133e85a
matthew@matthew:/swap$ sudo swapon swapfile
matthew@matthew:/swap$ free -m
total used free shared buffers cached
Mem: 7886 7727 158 0 7 6951
-/+ buffers/cache: 768 7117
Swap: 11718 822 10895
补个脚本
#!/bin/bash
cd ../../../../..
cd swap/
sudo dd if=/dev/zero of=swapfile bs=1024 count=8000000
sudo mkswap -f swapfile
sudo swapon swapfile
free -m
0 0
- ubuntu增加swap空间
- ubuntu增加swap空间
- ubuntu增加swap交换空间
- Ubuntu增加swap交换空间
- Ubuntu增加Swap空间大小
- Ubuntu增加swap交换空间的步骤
- [转]Ubuntu下增加swap交换空间
- ubuntu增加swap交换空间的步骤
- Ubuntu增加swap交换空间的步骤
- Ubuntu下增加swap交换空间
- Ubuntu下增加swap交换空间
- Ubuntu增加swap交换空间的步骤
- ubuntu下增加swap空间的方法
- 临时增加swap空间
- Linux增加swap空间
- linux增加swap空间
- linux增加SWAP空间
- 增加swap空间
- spring 模糊查询,查询
- Android开发常见错误汇总
- 【android】PopWindow----还没有更完
- 经验总结
- 字符串
- ubuntu增加swap空间
- [OpenJudge-NOI]走出迷宫 Bfs
- Android开发总结笔记 ScrollView和HorizontalScrollView (滚动视图) 1-3-5
- C++ 用libcurl库进行http通讯网络编程
- C++命名空间的使用
- 数据结构与算法(C语言描述)——双向链表
- 发现CSDN的一个BUG
- Pandas.Dataframe使用小结
- 地税系统WEB打印提示未注册