Celeb Glow
news | March 18, 2026

Make directory junction (symlink) equivalent to mklink /j

I am developing a web application with php in windows environment and I am using symlink to avoid redundancy. I made the symlinks with mklink /j command using exec(). Today I decided to test the app in linux and I used 'ln -s' command. But the app malfunctioned and can't find files correctly. So what is the equivalent of directory junctions in linux?

3

1 Answer

NTFS has symbolic links which work exactly as Unix symbolic links, but mklink /j creates a junction point, not a symbolic link.

An NTFS junction is much more similar to a Unix mountpoint, and it is actually represented as a mountpoint internally. Use mount --bind in Linux to emulate the behavior of an NTFS junction.

1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy