0

I'm new to Linux. I recently downloaded Bash on Ubuntu on Windows 10 (after the Anniversary edition update to Windows 10). Since this update is relatively new, there is not much online regarding troubleshooting. There are two things I need help on:

(1) When I go to the home folder, which seems to be "C:\Users\user\AppData\Local\lxss\home\user" and I add a new folder through Windows, this folder does not show up in Linux with the "ls" command. But when I add a directory using "mkdir" in Linux, the "ls" command shows this folder. Why is it behaving like this? Am I limited to creating folders through "mkdir" when working in this folder?

(2) I have a Python script sitting in that same folder that I'm trying to run and again it is not being found by Linux or the Python interpreter started in Bash on Ubuntu on Windows. I have Python 3 installed (Anaconda) and I'm able to type commands directly in the Python interpreter and it's working. However, I would like to run scripts in files.

Please let me know if more information is needed. Thanks.

2
  • 1
    Workaround for (2) so far is to create a blank python file using "touch test.py". Open test.py and copy in your code. Run test.py using "python test2.py". Commented Aug 17, 2016 at 19:22
  • 1
    If you want to run Python scripts, just install Python on Windows, it runs great and there are some great IDEs and all you need. On the other hand... need Linux? Just get a true Linux (physical or virtual machine). Commented Sep 10, 2016 at 0:33

3 Answers 3

1

The reason why ls is not showing anything is that it shows the Linux directory structure. Try setting it to the Windows directory, in this example the c drive:

cd /mnt/c

Does ls show a folder structure now?

Sign up to request clarification or add additional context in comments.

Comments

0

Looks like you are having permissions issues. To see everything on your home folder try ls -al to change permissions check out the chmod command

Comments

0

How about using Python for Windows and NotePad++ to edit and run your Python scripts? https://www.python.org/ftp/python/3.5.2/python-3.5.2-amd64.exe

You can setup NotePad++ as described here. How to Execute a Python File in Notepad ++?

(I ended up using Cloud9 https://c9.io/ for Python. It is independent of your local environment or OS)

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.