0

I'm currently using Windows Subsystem for Linux to run my linux programs, whilst configuring my home directory I decided to link my Windows Documents folder in it to easily access my data.

However whenever I make a directory inside that symbolic link, the new directory points back to the directory I was just in creating an infinite loop. Example:

user@host:~$ ln -s /mnt/c/Users/John/Documents/ /home/Paradoxis/Documents
user@host:~$ cd Documents
user@host:~/Documents$ ls -la
total 12
drwxrwxrwx 2 root root   0 Feb  1 15:17 .
drwxrwxrwx 2 root root   0 Feb  1 14:36 ..
-rwxrwxrwx 1 root root 402 Dec 15 13:42 desktop.ini
user@host:~/Documents$ mkdir Hello
user@host:~/Documents$ ls -la
total 12
drwxrwxrwx 2 root root   0 Feb  1 15:22 .
drwxrwxrwx 2 root root   0 Feb  1 14:36 ..
drwxrwxrwx 2 root root   0 Feb  1 15:22 Hello
-rwxrwxrwx 1 root root 402 Dec 15 13:42 desktop.ini
user@host:~/Documents$ cd Hello
user@host:~/Documents/Hello$ ls -la
total 12
drwxrwxrwx 2 root root   0 Feb  1 15:22 .
drwxrwxrwx 2 root root   0 Feb  1 14:36 ..
drwxrwxrwx 2 root root   0 Feb  1 15:22 Hello
-rwxrwxrwx 1 root root 402 Dec 15 13:42 desktop.ini
user@host:~/Documents/Hello$ cd Hello/
user@host:~/Documents/Hello/Hello$ ls -la
total 12
drwxrwxrwx 2 root root   0 Feb  1 15:22 .
drwxrwxrwx 2 root root   0 Feb  1 14:36 ..
drwxrwxrwx 2 root root   0 Feb  1 15:22 Hello
-rwxrwxrwx 1 root root 402 Dec 15 13:42 desktop.ini
user@host:~/Documents/Hello/Hello$ # Goes on forever

Is there a way how I can fix this? Thanks

Your Answer

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

Browse other questions tagged or ask your own question.