Can I change directory to a Windows drive in Ubuntu Bash on WSL?

Stephanie

I am a super newbie for Ubuntu and basically need Ubuntu for a Python package. I would like to run a Python file in say e:/username/folder1/folder2/python.py. I tried every method online and the only reply is bash: cd./e: No such file or directory. I am not sure whether it is because of the bash windows or virtualenv.

When I use bash on Ubuntu on Windows, ls, it says VIRTUALENV_DIR. cd, it says /home/username. The cd .. etc changes the directory a little, but not another drive, nor the folder I would like it to find.

Kaz Wolfe

WSL stores your Windows drives in the /mnt folder, with the name of the drive as a subfolder. For example your C:\ drive will be present at /mnt/c/ for you to use.

Keeping this in mind, you can swap to your specific folder like so:

cd /mnt/e/username/folder1/folder2

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Can I change directory to a Windows drive in Ubuntu Bash on WSL?

From Dev

How can I change directory on bash on Ubuntu on windows?

From Dev

How can I change the WSL bash command default directory?

From Dev

How can I run a Windows executable from WSL (Ubuntu) Bash

From Dev

How can I run a Windows executable from WSL (Ubuntu) Bash

From Dev

Can I drag and drop files to an .sh script using Bash on Ubuntu on Windows or Windows Subsystem for Linux (WSL)?

From Dev

How do I change Drive with bash on windows?

From Dev

Why can I use my RSA keys with the Git Bash app but not with Ubuntu WSL on my Windows machine?

From Dev

Can I switch to Windows cmd in Ubuntu for Windows (WSL)?

From Dev

Is there a way to add your drive to WSL ubuntu home directory?

From Dev

How can I make a drive accessible to Linux / Bash subsystem on Windows?

From Dev

How to navigate to C drive in bash on WSL-Ubuntu?

From Dev

How can I create a shared partition for Windows and Ubuntu in a pen drive?

From Dev

How can I create a shared partition for Windows and Ubuntu in a pen drive?

From Dev

Can I use a windows drive as '/home' for the ubuntu install?

From Dev

Can I boot Ubuntu from external drive if Windows is hibernated?

From Dev

dualboot ubuntu / windows - Can I compress shared NTFS drive?

From Dev

Move WSL (Bash on Windows) root filesystem to another hard drive?

From Java

How do I use Bash on Ubuntu on Windows (WSL) for my VS Code terminal?

From Dev

Windows Subsystem for Linux (WSL): what can't I do with the Ubuntu application for Microsoft Windows?

From Dev

Windows Subsystem for Linux (WSL): what can't I do with the Ubuntu application for Microsoft Windows?

From Dev

Can I install nasm and run .asm codes on Windows Subsystem Linux(WSL) for Ubuntu terminal on windows?

From Dev

Cannot "cd" or change directory using bash script in WSL

From Dev

Copying files from Ubuntu Server to WSL Bash Directory

From Dev

How do I get apache to follow symlinks to windows drive on WSL

From Dev

JetBrains Rider new bash terminal in working directory on Windows with WSL

From Java

How can I change the location of docker images when using WSL2 with Windows 10 Home?

From Dev

How can I get access to files transferred from Windows to WSL-2 Ubuntu?

From Dev

How can I automate sending commands from Windows to Linux (WSL/Ubuntu)?

Related Related

  1. 1

    Can I change directory to a Windows drive in Ubuntu Bash on WSL?

  2. 2

    How can I change directory on bash on Ubuntu on windows?

  3. 3

    How can I change the WSL bash command default directory?

  4. 4

    How can I run a Windows executable from WSL (Ubuntu) Bash

  5. 5

    How can I run a Windows executable from WSL (Ubuntu) Bash

  6. 6

    Can I drag and drop files to an .sh script using Bash on Ubuntu on Windows or Windows Subsystem for Linux (WSL)?

  7. 7

    How do I change Drive with bash on windows?

  8. 8

    Why can I use my RSA keys with the Git Bash app but not with Ubuntu WSL on my Windows machine?

  9. 9

    Can I switch to Windows cmd in Ubuntu for Windows (WSL)?

  10. 10

    Is there a way to add your drive to WSL ubuntu home directory?

  11. 11

    How can I make a drive accessible to Linux / Bash subsystem on Windows?

  12. 12

    How to navigate to C drive in bash on WSL-Ubuntu?

  13. 13

    How can I create a shared partition for Windows and Ubuntu in a pen drive?

  14. 14

    How can I create a shared partition for Windows and Ubuntu in a pen drive?

  15. 15

    Can I use a windows drive as '/home' for the ubuntu install?

  16. 16

    Can I boot Ubuntu from external drive if Windows is hibernated?

  17. 17

    dualboot ubuntu / windows - Can I compress shared NTFS drive?

  18. 18

    Move WSL (Bash on Windows) root filesystem to another hard drive?

  19. 19

    How do I use Bash on Ubuntu on Windows (WSL) for my VS Code terminal?

  20. 20

    Windows Subsystem for Linux (WSL): what can't I do with the Ubuntu application for Microsoft Windows?

  21. 21

    Windows Subsystem for Linux (WSL): what can't I do with the Ubuntu application for Microsoft Windows?

  22. 22

    Can I install nasm and run .asm codes on Windows Subsystem Linux(WSL) for Ubuntu terminal on windows?

  23. 23

    Cannot "cd" or change directory using bash script in WSL

  24. 24

    Copying files from Ubuntu Server to WSL Bash Directory

  25. 25

    How do I get apache to follow symlinks to windows drive on WSL

  26. 26

    JetBrains Rider new bash terminal in working directory on Windows with WSL

  27. 27

    How can I change the location of docker images when using WSL2 with Windows 10 Home?

  28. 28

    How can I get access to files transferred from Windows to WSL-2 Ubuntu?

  29. 29

    How can I automate sending commands from Windows to Linux (WSL/Ubuntu)?

HotTag

Archive