add swapspace file on ubuntu.
https://askubuntu.com/questions/566745/allocate-swap-after-ubuntu-14-04-lts-installation
----------------------------------------------
First, to create 4,000 MB of swap space:
$ sudo dd if=/dev/zero of=/swapspace bs=1M count=4000
4000+0 records in
4000+0 records out
4194304000 bytes (4.2 GB) copied, 5.92647 s, 708 MB/s
or
$ sudo fallocate -l 4000M /swapspace
Next turn it into a usable swap file:
$ sudo mkswap /swapspace
Setting up swapspace version 1, size = 4095996 KiB
no label, UUID=7d1895e4-7ccf-42c6-979a-51ebddb49e91
Activate it:
$ sudo swapon /swapspace
Confirm active swap spaces:
$ cat /proc/swaps
Filename Type Size Used Priority
/swapspace file 4095996 0 -1
Next, add the following line to /etc/fstab to activate the new swap at boot:
/swapspace none swap defaults 0 0
See also this wiki page: https://help.ubuntu.com/community/SwapFaq
add swapspace file on ubuntu.的更多相关文章
- How To Add Swap Space on Ubuntu 16.04
Introduction One of the easiest way of increasing the responsiveness of your server and guarding aga ...
- SharePoint Client Add Folder,file to Library
public void UploadDocument(string siteURL, string documentListName, string documentListURL, string d ...
- How to install .deb file in Ubuntu
if you have a .deb file: You can install it using sudo dpkg -i /path/to/deb/file followed by sudo ap ...
- Add a file to a Document Library and update metadata properties in a single method添加文档的方法
private void AddFileToDocumentLibrary(string documentLibraryUrl, string filename, byte[] file_bytes, ...
- [百度空间] ld: add library file reference by path & file name
By default, -l option will search libraries with lib* prefix in speficied search paths. i.e. 1 ld -o ...
- Add task bar to ubuntu
http://www.howtogeek.com/189819/how-to-add-a-taskbar-to-the-desktop-in-ubuntu-14.04/ sudo apt-get in ...
- How can I add files to a Jar file? (or add a file to a zip archive)
https://stackoverflow.com/questions/12239764/how-can-i-add-files-to-a-jar-file M.java class M{ publi ...
- ubuntu add application to launcher
eg. add sublime text to launcher so as to be found by launcher, docky, etc. add a file sudo gedit /u ...
- Add a system call on Ubuntu 13.04(x64) with x86_64
We added a system call to modify idt table, then programed it in modify_idt.c 1. Put our modify_idt. ...
随机推荐
- hosts设置本地虚拟域名
C:\Windows\System32\drivers\etc hosts 需要用管理员运行
- java 之Thread线程相关yield()、sleep()、wait()、join()、run和start方法详解
1.sleep() 使当前线程(即调用该方法的线程)暂停执行一段时间,让其他线程有机会继续执行,但它并不释放对象锁.也就是说如果有synchronized同步快,其他线程仍然不能访问共享数据.注意该方 ...
- Linux磁盘与文件系统管理 之 认识EXT2系统
1 磁盘组成与分区 1.1 磁盘物理组成 (1)圆形盘片-记录数据 (2)机械手臂及磁头-读写盘片数据 (3)主轴马达-使得机械手臂成功读写数据驱动 1.2 盘片物理组成 (1)扇区-最小物理存储单位 ...
- sublime__最全面的 Sublime Text 使用指南
感谢大佬--> 原文链接 摘要(Abstract) 本文系统全面的介绍了Sublime Text,旨在成为最优秀的Sublime Text中文教程. 前言(Prologue) Sublime T ...
- 强制停止及删除(卸载)Windows服务
1. 安装服务: CMD 打开命令行窗口:C:\> 运行:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\InstallUtil.exe& ...
- 剑指offer面试题43:n个筛子的点数
题目描述: 把n个筛子扔在地上,所有筛子朝上的一面点数之和为s,输入n,打印出s的所有可能的值出线的概率. 书上给了两种解法,第一种递归的方法由于代码太乱,没有看懂=.= 第二种方法很巧妙,lz已经根 ...
- Centos 6.5升级openssh到7.5p1版本
centos6自带的ssh版本较低,存在高危漏洞,目前部分服务器需要升级到最新版本(目前是7.5p1). 注:升级ssh存在一定的危险性,一旦不成功可能无法通过远程连接到系统,因此在升级之前最好有远程 ...
- 九度oj 题目1017:还是畅通工程
题目描述: 某省调查乡村交通状况,得到的统计表中列出了任意两村庄间的距离.省政府“畅通工程”的目标是使全省任何两个村庄间都可以实现公路交通(但不一定有直接的公路相连,只要能间接通过公路可达即可 ...
- Shell脚本学习指南 [ 第三、四章 ] 查找与替换、文本处理工具
摘要:第三章讨论的是编写Shell脚本时经常用到的两个基本操作.第四章总共介绍了约30种处理文本文件的好用工具. 第三章 查找与替换 概括:本章讨论的是编写Shell脚本时经常用到的两个基本操作:文本 ...
- 【luogu】P1772物流运输(最短路+DP)
题目链接 对于本题我们设ext[i][j]计算第i个码头在前j天总共有几天不能用(其实就一前缀和),设dis[i][j]是从第i天到第j天不变运输路线的最短路径,设f[i]是前i天运输货物的最小花费. ...