To check whether SWAP space is available on Ubuntu machine the below commands can be utilized

sudo swapon -show

If there is no output of the above commands then it means there is no SWAP available.

In case of SWAP available the commands shows below output.

swapon show output

The above screenshot shows the following information

  1. Location of Swap space
  2. Type of Swap space
  3. Total Size
  4. Utilized Size
  5. Priority set for Swap utilization