This two are compared with WSL on NTFS 3.1 as seen by S:>fsutil.exe fsinfo ntfsinfo s:
Windows doesn't know "symbolic link", while WSL implements "symbolic link" by junction.

Create file:
cd S:\Rio\proj\wordpress\other\link
echo originalFile >Ori.txt

Create junction in cmd: as admin:
mklink.exe junctionToOri Ori.txt

Create symbolic link in bash:
cd /mnt/s/Rio/proj/wordpress/other/link
ln -s Ori.txt linkToOri

Check on Cmd:
S:> dir
08/08/2021 06:40 PM junctionToOri [Ori.txt]
08/08/2021 06:33 PM linkToOri […]
08/08/2021 06:32 PM 15 Ori.txt
S:>type linkToOri is error
The file cannot be accessed by the system.

Check on FileExplorer:
linkToOri type shown as "file" and cannot be viewed by windows application. can be copied around
junctionToOri type shown as ".symlink" and can be viewed by, e.g. "type" and vscode

Check on bash: both are seen as symbolic link
$ls -l
-rw-rw-rw- 1 rio rio 15 Aug 8 18:32 Ori.txt
lrwxrwxrwx 1 rio rio 7 Aug 8 18:40 junctionToOri -> Ori.txt
lrwxrwxrwx 1 rio rio 7 Aug 8 18:33 linkToOri -> Ori.txt
$file linkToOri junctionToOri
linkToOri: symbolic link to Ori.txt
junctionToOri: symbolic link to Ori.txt
$cat linkToOri junctionToOri
both showing originalFile, as expected


This free site is ad-supported. Learn more