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.

Cyrus
  • 84,225
  • 14
  • 89
  • 153
tpoh
  • 261
  • 3
  • 11
  • 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". – tpoh Aug 17 '16 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). – ddbug Sep 10 '16 at 00:33

3 Answers3

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?

amrdruid
  • 951
  • 13
  • 24
Theelepel
  • 41
  • 5
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

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)

Community
  • 1
  • 1
rob2universe
  • 7,059
  • 39
  • 54