English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Linux swapon command

Linux Command大全

The Linux swapon command is used to activate the swap space in the Linux system, and the memory management of the Linux system must use swap space to establish virtual memory.

Syntax

/sbin/swapon -a [-v]
/sbin/swapon [-v] [-p priority] specialfile ...
/sbin/swapon [-s]

Parameter Description:

  • -h Please help me
  • -V to display version information
  • -s to display brief device information
  • -a to automatically start all SWAP devices
  • -p to set the priority, you can set it in the range of 0 to32767Choose a number for it. Or in /etc/Add pri=[value] ([value] is 0~ in the fstab32767Enter a number in the middle), and then you can use swapon directly with ease. -a to start them, and they have priority settings.

swapon is to enable swap.

In contrast, there is a command to turn off swap, swapoff.

Linux Command大全