mkswap writes a swap filesystem signature into the file — the formatting step that turns a plain file into usable swap. WARNING: the command erases whatever the target previously contained, so point it only at your fresh swapfile. After this, swapon activates it and swapon --show confirms the size.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.