How to navigate to C drive in bash on WSL-Ubuntu? [duplicate]
I've installed bash on Ubuntu on Windows feature on Windows 10 and I want to change directory this path on my C:\ drive:
C:/wamp64/www What should I do ?
11 Answer
C:\ in Windows is /mnt/c/ in WSL Ubuntu
In Windows Subsystem for Linux (WSL) The C:\ drive is mounted as /mnt/c/, D:\ is mounted as /mnt/d/ et cetra. Therefore, C:/wamp64/www should be at /mnt/c/wamp64/www. Try:
cd /mnt/c/wamp64/wwwin the Ubuntu terminal to go to that folder. Note, the first / before mnt and remember that in Ubuntu file and folder names are case sensitive. So wamp64, WAMP64, wAmP64, and WaMp64 are 4 different folders! See for a bit more on using case sensitive file names in WSL.
Background on /mnt
Windows users not familiar with Ubuntu (Linux in general) may wonder:
What does /mnt stand for?
In Linux almost everything is a file or a folder. /mnt is a folder, /mnt/c is a folder called c inside the folder /mnt.
In Linux partitions (Windows calls them "drives" to confuse us) are mounted in folders generally called "mount points". So in WSL, the "C Drive" is mounted in the c folder inside /mnt folder. /mntis a folder within which other folders are created for the purpose of mounting various partitions. See the link related to mnt below.
References:
On mnt
Hope this helps
4More in general
"Zoraya ter Beek, age 29, just died by assisted suicide in the Netherlands. She was physically healthy, but psychologically depressed. It's an abomination that an entire society would actively facilitate, even encourage, someone ending their own life because they had no hope. Th…"