I have the latest Debian:
Distributor ID: Debian
Description: Debian GNU/Linux 11 (bullseye)
Release: 11
Codename: bullseye
I have tried following code from this website:
sudo dd if=/dev/zero of=/swapfile count=4096 bs=1MiB
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
sudo swapon --show
After swapon /swapfile
I get this error:
swapon: /swapfile: swapon failed: Invalid argument
-v
option.