3

Linux Swap -- 创建普通文件作为swap

 2 years ago
source link: https://blogread.cn/it/article/4064?f=hot1
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
您现在的位置首页 --> 系统运维 --> Linux Swap -- 创建普通文件作为swap

Linux Swap -- 创建普通文件作为swap

浏览:2184次  出处信息
 当系统swap空间所剩不多时,可通过在本地磁盘上创建普通文件作为swap,步骤如下:

    $ dd if=/dev/zero  of=./swapfile bs=1M count=1000

    $ mkswap ./swapfile

    $ swapon ./swapfile  

    即可为系统临时增加1G的swap。

    使用完毕后执行:

    $ swapoff ./swapfile

    $ rm -f swapfile

建议继续学习:

QQ技术交流群:445447336,欢迎加入!
扫一扫订阅我的微信号:IT技术博客大学习

Recommend

  • 59

  • 10

    通过前面几节的介绍,相信朋友们都能搭建自己的 linux 开发环境了。接下来,小编决定介绍一下 linux 中 C语言程序开发中常用的一些函数,并在这一实践过程中进一步了解 linux 内核。这样不至于使学习过程太过枯燥,也能顺便积累一些开发经验。

  • 9
    • abcdxyzk.github.io 3 years ago
    • Cache

    Linux swap实现

    Linux swap实现 2015-09-18 11:16:00 http://blog.csdn.net/freas_1990/article/details/9090601 swap是现代Unix操作系统一个...

  • 5

    给已安装的Linux新增Swap交换分区Jager · 3月2日 · 2014年新增swap分区 494次已读

  • 5

    Reading Time: 4 minutes If you are a Linux user, then you have definitely heard about Linux Swap. But the reason you may be here is that either you may not know what exactly it is or how to use it. In this blog, I’ll be covering the concept...

  • 4

    经常购买 云服务器 或 VPS主机,有时候内存都会有一些偏低,为了满足系统上应用需求,可以使用多余的服务器硬盘空间来增加服务器的虚拟内存,下面教你如何在 Linux 上添加 swap 虚拟内存。什么是swap首先,虚拟内存的概念是 W...

  • 2
    • timothyqiu.com 2 years ago
    • Cache

    给 Arch 添加 Swap 文件

    自从半年前换了 Arch Linux,就一直没有设置 swap,心想最多也就编译的时候 Chrome 标签页「哦哟」一下嘛。 不过实际没有 swap 不能休眠还是有点不踏实,毕竟是台式机,又懒得接 UPS。于是以下就是这周末设置 swap 文件用于休眠的历程(内容 Arch Wiki...

  • 3
    • kuanghy.github.io 2 years ago
    • Cache

    Linux 创建交换(swap)分区

    Linux 创建交换(swap)分区 Linux | Nov 16, 2019 | linux swap

  • 3
    • zhangrr.github.io 2 years ago
    • Cache

    Kubernetes创建普通账号

    kubernetes 装好正常运行一段时间后,会出现要把研发和运维权限分开的场景: 给某个用户某一指定名称空间下的管理权限 给用户赋予集群的只读权限 非常麻烦,我们这里不讨论过多的概念,从运维的角度出发,简单实用化

  • 4
    • netcan.github.io 1 year ago
    • Cache

    使用 ZFS 作为 Linux 根文件系统

    使用 ZFS 作为 Linux 根文件系统 2023.03.12 Netcan

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK