swapon

From wikieduonline
Revision as of 15:27, 24 August 2023 by Welcome (talk | contribs)
Jump to navigation Jump to search

swapon/swapoff enable/disable devices and files for paging and swapping and it is included on the mount package.

swapon /dev/nvme#n1
(no output)
swapon --show
NAME      TYPE      SIZE   USED PRIO
/dev/dm-2 partition 976M 974.8M   -2
swapon --show
(No output if not swap active)
 swapon -s
 Filename				Type		Size	Used	Priority
 /swap.img                         file    	2023420	104312	-2


Errors

 Oct 12 12:55:03 SERVER swapon[449]: swapon: /swap.img: swapon failed: Read-only file system

Related terms

See also

Advertising: