Great question — answering as the UphillTech team:
You tried to create a hardlink to a directory root@rpiserver:~# mkdir fun root@rpiserver:~# ln fun fun_hard ln: fun: hard link not allowed for directory root@rpiserver:~# According to ln --help this is not possible -d, -F, --directory allow the superuser to attempt to hard link directories (note: will probably fail due to system restrictions, even for the superuser) Even as superuser with -d this failes here: root@rpiserver:~# ln -d fun fun_hard ln: failed to create hard link 'fun_hard' => 'fun': Operation not permitted (All of this was tested here on a raspberry pi, using ext4 as file system)
Full answer by Bonsi: https://unix.stackexchange.com/a/666458 (CC BY-SA 4.0).
Need it done for your business? UphillTech.