MKSWAP(8) mkswap - mkswap [] [] mkswap [] [] mkswap . ( /dev/sdb7) . , 82 (LINUX_SWAP) . (: . .) . ( 1024- . mkswap . - .) , swapon(8) . /etc/fstab swapon -a . . , . . mkswap, ,,mkfs" , . , mkswap (SUN, BSD, ...). -c, --check ( ) . , . -F, --file . -f, --force . . , , mkswap . -q, --quiet . -L, --label , swapon(8). --lock[=mode] . yes (), no () ( 1 0) nonblock (_). , "yes" (). $LOCK_BLOCK_DEVICE. , systemd-udevd(8) . -p, --pagesize ( ) . ; mkswap . -U, --uuid . . - , : ,,c1b9d5a2-f162-11cf-9ece-0020afc76f16". : clear random time -e, --endianness , native, little big. native. -o, --offset . -s, --size : KiB (=1024), MiB (=1024*1024), GiB, TiB, PiB, EiB, ZiB YiB (,,iB" , ., ,,K" ,,KiB"). , . --file. -v, --swapversion 1 . ( , -v 0 -v 1. v0 2.5.22 ( 2002.). v1 2.1.117 ( 1998.).) --verbose . mkswap . -h, --help . -V, --version Display version and exit. LIBBLKID_DEBUG= ,,libblkid" . LOCK_BLOCK_DEVICE=<> . 1 0. --lock . . 4294967295 (32- ). . , 32 . /proc/swaps. mkswap 10 . , getconf PAGESIZE. Aside from mkswap --file, it is also possible to create the swapfile manually before initializing it with mkswap, e.g. using a command like Since version 2.41, mkswap --file sets the nocow attribute for newly created files to support swapfiles on Btrfs. # dd if=/dev/zero of=swapfile bs=1MiB count=$((8*1024)) 8GiB . In such a case, please read notes from swapon(8) about the swap file use restrictions (holes, preallocation and copy-on-write issues). fdisk(8), swapon(8) For bug reports, use the issue tracker . mkswap ,,util-linux" . util-linux 2.41 2025-03-29 MKSWAP(8)