How to check if swap is encrypted in Ubuntu

Start up a terminal window and then enter the commands as shown in italics below. The following command will tell you if your swap is encrypted in Ubuntu 12.04.

$ swapon --summary <enter>

Filename				Type		Size	Used	Priority
/dev/mapper/cryptswap1                  partition	3904508	0	-1

Above indicates swap is encrypted. If it returned nothing except the heading, then swap is either non-existent or not encrypted.

$ sudo blkid | grep swap <enter>

If it returns something like:
/dev/mapper/cryptswap1: UUID=”a42948452-111a-4235-b24a-54752c21ecfe6″ TYPE=”swap”
then the swap partition is encrypted.

You can also check with:
$ cat /etc/crypttab <enter>
It would return a line as:
cryptswap1 /dev/sda10 none luks

This also indicates that the swap partition is encrypted.
$ sudo cryptsetup status cryptswap1 <enter>
This returns:
/dev/mapper/cryptswap1 is active and is in use.
type: LUKS1
cipher: aes-xts-plain64
keysize: 256 bits
device: /dev/sda10

indicating that the swap is encrypted and is on partition /dev/sda10.

If you need to encrypt your swap partition after installation, then see how to encrypt swap partition.