Answer:
Following are the answers of the question.
Explanation:
Firstly we have to generate the swap partition on the following directory then we have the following command for the swap partition that is :
mkswap /dev/sdb2
Then, we have to activate the following swap partition after generating the swap partition by using the following commands that is :
swapon /dev/sdb2
So, the following commands is correct for creating or activating the swap partition according to the following scenario.