quickreference:unix
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revisionNext revisionBoth sides next revision | ||
quickreference:unix [2019/01/29 01:18] – external edit 127.0.0.1 | quickreference:unix [2019/09/24 21:32] – rodolico | ||
---|---|---|---|
Line 2: | Line 2: | ||
This is just a location where I store various commands I found handy for Unix. | This is just a location where I store various commands I found handy for Unix. | ||
+ | |||
+ | ===== Disk Management ===== | ||
+ | |||
+ | ==== Create Swap file ==== | ||
+ | |||
+ | I generally prefer a swap //file// as opposed to a swap // | ||
+ | |||
+ | <code bash> | ||
+ | fallocate -l 1G /swapfile | ||
+ | # if no fallocate on your system, use the following | ||
+ | # dd if=/ | ||
+ | chmod 600 /swapfile | ||
+ | # use " | ||
+ | mkswap -f /swapfile | ||
+ | # save, then modify fstab | ||
+ | mv /etc/fstab / | ||
+ | echo '/ | ||
+ | # turn on swap for everything in fstab | ||
+ | swapon -a | ||
+ | # display the result | ||
+ | swapon --show | ||
+ | </ | ||
===== Shell (mainly BASH) ===== | ===== Shell (mainly BASH) ===== | ||
Line 152: | Line 174: | ||
===== References ===== | ===== References ===== | ||
* https:// | * https:// | ||
+ | * https:// | ||
quickreference/unix.txt · Last modified: 2024/03/04 15:54 by rodolico