Reputation: 1
I have made a python script in WSL using VSCode. I want to call this script from another python script that is running in Windows.
My plan was to use os.system()
to command line into wsl and start the script from it's directory, however when I go into windows terminal to try to start it manually, I can't access any of my directories.
The path I am attempting to access from terminal is \wsl.localhost\Ubuntu\home\ben\apps and root user can't access it either.
Windows terminal:
(base) PS C:\Users\benja> wsl
ben@DESKTOP:/mnt/c/Users/benja$ cd ~
ben@DESKTOP:~$ ls
ben@DESKTOP:~$ ls -a
. .. .bash_history .bash_logout .bashrc .profile
ben@DESKTOP:~$ cd ..
ben@DESKTOP:/home$ ls
ben
ben@DESKTOP:/home$ cd /ben
-bash: cd: /ben: No such file or directory
ben@DESKTOP:/home$ cd ..
ben@DESKTOP:/$ ls
bin boot dev etc home init lib lib64 media mnt opt proc root run sbin srv sys tmp usr var
ben@DESKTOP:/$ cd ..
ben@DESKTOP:/$ cd /home/ben/apps
Upvotes: 0
Views: 2606
Reputation: 1
WSL has both Ubuntu and Debian. apps
is in Ubuntu, however my WSL was defaulting to Debian. That is why the directories were empty.
Upvotes: 0
Reputation: 770
You're accessing /ben
aka root_directory/ben
try: ~/apps
or cd ben
Upvotes: 0