Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to access my D:\ drive from the Ubuntu command line on Windows 10

When I open the Ubuntu windows store app and the bash command line (if I am not wrong?) comes up it's working directory is /home/username . I want to run a script which on my Windows is located in D:\University... . Can I do this and if so how?

I have only tried cd D:\ but I get " -bash: cd: D:: No such file or directory". I don't have any experience so far with Linux so I don't know if Ubuntu on Windows can only run in its own location or it can access all the files on my PC.

like image 456
gr33nbanana Avatar asked May 12 '19 14:05

gr33nbanana


People also ask

How do I access Windows files from Ubuntu on Windows 10?

To access Windows files, you need to mount the drive in which the files you want to access are stored in. Well, all Windows drives are basically have been mounted in the /mnt folder so you can simply go to this folder to access the Windows files. You can use the cd command to go to the /mnt folder.

How can I access Windows files from Ubuntu to Windows?

Click on "File System" in the left pane of the Nautilus file browser and then open the host folder which you will see in the main pane. Save this answer. Yes, just mount the windows partition from which you want to copy files. Drag and drop the files on to your Ubuntu desktop.

How do I get to the D directory in WSL?

Change directory to home To jump from any directory back to home from within a WSL command prompt, you can use the command: cd ~ .


1 Answers

you can use mnt to access your drives.

root@user-pc: cd /mnt/d/your_destination_directory;

like image 61
Mahdi Tohidloo Avatar answered Sep 28 '22 19:09

Mahdi Tohidloo