You can simply follow the below steps to create a additional swap partition on Linux.
Just create a partition with
fdisk command and change it's partition code for Linux swap partition e.g.
now use command
mkswap drive_name to create the swap signature, then use
swapon drive name command to activate the swap partition.
For example, to create swap partition type:
and to activate it
Note : I have mentioned
/dev/sdb1 for example purposes, you use the drive as per your scenario.
now mount the created swap partition on
for testing you can use below commands :-
swapon -s shows swap usage summary by device
free -m Display amount of free and used memory in the system