Back to the command reference

swapoff

DisksAdvanced In real Linux

Disable swap space

Name: swapoff = swap off

This command needs a real Linux system; you can practise it in real Linux mode.

Full man page

Description

swapoff disables swap, moving its contents back into RAM, so make sure enough memory is free.

Syntax

swapoff [OPTION]... [DEVICE]

Common options

-a / --allDisable all swap

Examples

  • $ sudo swapoff /dev/sda2

    Turn that swap partition off

    Explain

Related