Ubuntu添加swap
1 | # create a file named `swap`, size of 1024b*2000000=2G |
dd
https://www.runoob.com/linux/linux-comm-dd.html
read, convert, or output datas. be used to create a file.
| param | description | default |
|---|---|---|
| if | input filename | stdin |
| of | output filename | stdout |
| bs1 | block size | byte |
| count2 | bs count | 1 |
- bs: set ibs(in block size) and obs(out block size) at same time, default as
byte. appendkormto set unit - count: copy
bscounttimes, so the size ofofiscount*bs
mkswap
https://www.runoob.com/linux/linux-comm-mkswap.html
make a swap partition
| param | description | default |
|---|---|---|
| f | for SPARK Architecture | |
| c | check file blocks is damaged |
swapon
https://www.runoob.com/linux/linux-comm-swapon.html
enable swap partition. disable this use swapoff.
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 AlMirai!