how to increase the swap space in linux 7

C++
# lvextend -l +100%FREE /dev/vg_main/lv_swap
Source

Also in C++: