0

Title explains it, I got a new installation of Linux on WSL and it doesn't see existing directories on my laptop. I'm not sure what the issue is, I've tried what was on the net to assess the issue to no avail. All I can guess is a bad installation or me being a noob at Linux. Any help appreciated, below are the goods

Edit 1: The issue is I cannot access the directories of my windows drive, such as C:\Users\someuser\Documents seen in the below code. Using ls to find what directories the Linux system sees nothing came up even though I'm in my home directory

roman@DESKTOP-QKJTF3S:~$ which ls
/usr/bin/ls
roman@DESKTOP-QKJTF3S:~$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/mnt/c/Program Files/WindowsApps/CanonicalGroupLimited.UbuntuonWindows_2004.2021.825.0_x64__79rhkp1fndgsc:/mnt/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common:/mnt/c/Program Files (x86)/Common Files/Oracle/Java/javapath:/mnt/c/Windows/system32:/mnt/c/Windows:/mnt/c/Windows/System32/Wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0/:/mnt/c/Windows/System32/OpenSSH/:/mnt/c/Program Files/NVIDIA Corporation/NVIDIA NvDLISR:/mnt/c/Program Files/MATLAB/R2021a/runtime/win64:/mnt/c/Program Files/MATLAB/R2021a/bin:/mnt/c/Program Files (x86)/Windows Kits/8.1/Windows Performance Toolkit/:/mnt/c/Program Files/Microsoft SQL Server/Client SDK/ODBC/110/Tools/Binn/:/mnt/c/Program Files (x86)/Microsoft SQL Server/120/Tools/Binn/:/mnt/c/Program Files/Microsoft SQL Server/120/Tools/Binn/:/mnt/c/Program Files/Microsoft SQL Server/120/DTS/Binn/:/mnt/c/WINDOWS/system32:/mnt/c/WINDOWS:/mnt/c/WINDOWS/System32/Wbem:/mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/:/mnt/c/WINDOWS/System32/OpenSSH/:/mnt/c/Program Files/Git/cmd:/mnt/c/Users/roman/AppData/Local/Microsoft/WindowsApps:/mnt/c/Users/roman/AppData/Local/GitHubDesktop/bin:/mnt/c/Users/roman/AppData/Local/atom/bin:/snap/bin
roman@DESKTOP-QKJTF3S:~$ ls
roman@DESKTOP-QKJTF3S:~$ df -h
Filesystem      Size  Used Avail Use% Mounted on
rootfs          459G  375G   85G  82% /
none            459G  375G   85G  82% /dev
none            459G  375G   85G  82% /run
none            459G  375G   85G  82% /run/lock
none            459G  375G   85G  82% /run/shm
none            459G  375G   85G  82% /run/user
tmpfs           459G  375G   85G  82% /sys/fs/cgroup
C:\             459G  375G   85G  82% /mnt/c
roman@DESKTOP-QKJTF3S:~$ ls -la
total 8
drwxr-xr-x 1 roman roman  512 Feb 16 16:08 .
drwxr-xr-x 1 root  root   512 Feb  9 15:08 ..
-rw------- 1 roman roman  285 Feb 16 16:08 .bash_history
-rw-r--r-- 1 roman roman  220 Feb  9 15:08 .bash_logout
-rw-r--r-- 1 roman roman 3771 Feb  9 15:08 .bashrc
drwxr-xr-x 1 roman roman  512 Feb  9 15:08 .landscape
-rw-r--r-- 1 roman roman    0 Feb 16 15:46 .motd_shown
-rw-r--r-- 1 roman roman  807 Feb  9 15:08 .profile
-rw-r--r-- 1 roman roman    0 Feb  9 15:11 .sudo_as_admin_successful
roman@DESKTOP-QKJTF3S:~$ type ls
ls is aliased to `ls --color=auto'
roman@DESKTOP-QKJTF3S:~$ dir
roman@DESKTOP-QKJTF3S:~$ ls
roman@DESKTOP-QKJTF3S:~$ mkdir tmp
roman@DESKTOP-QKJTF3S:~$ cd
roman@DESKTOP-QKJTF3S:~$ cd tmp
roman@DESKTOP-QKJTF3S:~/tmp$ ls
roman@DESKTOP-QKJTF3S:~/tmp$ cd
roman@DESKTOP-QKJTF3S:~$ ls
tmp
roman@DESKTOP-QKJTF3S:~$ cd
roman@DESKTOP-QKJTF3S:~$ find
.
./.bashrc
./.bash_history
./.bash_logout
./.landscape
./.landscape/sysinfo.log
./.motd_shown
./.profile
./.sudo_as_admin_successful
./tmp
roman@DESKTOP-QKJTF3S:~$ ls
tmp
roman@DESKTOP-QKJTF3S:~$
roman@DESKTOP-QKJTF3S:~$ pwd
/home/roman
roman@DESKTOP-QKJTF3S:~$ cd ~/Documents
-bash: cd: /home/roman/Documents: No such file or directory
roman@DESKTOP-QKJTF3S:~$ cd ./Documents
-bash: cd: ./Documents: No such file or directory
roman@DESKTOP-QKJTF3S:~$ cd ~/.Documents
-bash: cd: /home/roman/.Documents: No such file or directory
roman@DESKTOP-QKJTF3S:~$ cd ./Documents
-bash: cd: ./Documents: No such file or directory
roman@DESKTOP-QKJTF3S:~$ ~/Documents
-bash: /home/roman/Documents: No such file or directory
roman@DESKTOP-QKJTF3S:~$ ~/Documents$
-bash: /home/roman/Documents$: No such file or directory
roman@DESKTOP-QKJTF3S:~$ ~/Documents$ find
-bash: /home/roman/Documents$: No such file or directory
roman@DESKTOP-QKJTF3S:~$ cd Documents
-bash: cd: Documents: No such file or directory
roman@DESKTOP-QKJTF3S:~$ tmp

Command 'tmp' not found, but there are 16 similar ones.

roman@DESKTOP-QKJTF3S:~$ cd
roman@DESKTOP-QKJTF3S:~$ cd /tmp
roman@DESKTOP-QKJTF3S:/tmp$ cd
roman@DESKTOP-QKJTF3S:~$ ./.Documents
-bash: ./.Documents: No such file or directory
roman@DESKTOP-QKJTF3S:~$

Edit 2: Code for 'mount' which shows all currently attached file systems according to this site

roman@DESKTOP-QKJTF3S:~$ mount
rootfs on / type wslfs (rw,noatime)
none on /dev type tmpfs (rw,noatime,mode=755)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,noatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,noatime)
devpts on /dev/pts type devpts (rw,nosuid,noexec,noatime,gid=5,mode=620)
none on /run type tmpfs (rw,nosuid,noexec,noatime,mode=755)
none on /run/lock type tmpfs (rw,nosuid,nodev,noexec,noatime)
none on /run/shm type tmpfs (rw,nosuid,nodev,noatime)
none on /run/user type tmpfs (rw,nosuid,nodev,noexec,noatime,mode=755)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,relatime)
tmpfs on /sys/fs/cgroup type tmpfs (rw,nosuid,nodev,noexec,relatime,mode=755)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
C:\ on /mnt/c type drvfs (rw,noatime,uid=1000,gid=1000,case=off)
roman@DESKTOP-QKJTF3S:~$ mount -t ext4
roman@DESKTOP-QKJTF3S:~$

Edit 3: progress, found mounted filesystem called 'c' but files inside don't match up.

roman@DESKTOP-QKJTF3S:~$ /mnt
-bash: /mnt: Is a directory
roman@DESKTOP-QKJTF3S:~$ /mnt/c
-bash: /mnt/c: Is a directory
roman@DESKTOP-QKJTF3S:~$ cd /mnt/c
roman@DESKTOP-QKJTF3S:/mnt/c$ cd /users
-bash: cd: /users: No such file or directory
roman@DESKTOP-QKJTF3S:/mnt/c$ cd /Users
-bash: cd: /Users: No such file or directory
roman@DESKTOP-QKJTF3S:/mnt/c$ ls
ls: cannot access 'DumpStack.log.tmp': Permission denied
ls: cannot access 'hiberfil.sys': Permission denied
ls: cannot access 'pagefile.sys': Permission denied
ls: cannot access 'swapfile.sys': Permission denied
'$Recycle.Bin'                                             ProgramData                  eula.3082.txt
'$WinREAgent'                                              Recovery                     globdata.ini
Apps                                                     'SOLIDWORKS Data'             hiberfil.sys
Config.Msi                                               'SOLIDWORKS Data (2)'         install.exe
Dell                                                     'System Volume Information'   install.ini
'Documents and Settings'                                   Users                        install.res.1028.dll
Downloads                                                 VC_RED.MSI                   install.res.1031.dll
Drivers                                                   VC_RED.cab                   install.res.1033.dll
DumpStack.log                                             Windows                      install.res.1036.dll
DumpStack.log.tmp                                         cygwin64                     install.res.1040.dll
Games                                                     dell.sdr                     install.res.1041.dll
Intel                                                     eula.1028.txt                install.res.1042.dll
NvContainerRecoveryNVDisplay.ContainerLocalSystem.reg     eula.1031.txt                install.res.2052.dll
NvContainerRecoveryNvBroadcast.ContainerLocalSystem.reg   eula.1033.txt                install.res.3082.dll
NvContainerRecoveryNvContainerLocalSystem.reg             eula.1036.txt                pagefile.sys
OneDriveTemp                                              eula.1040.txt                swapfile.sys
PerfLogs                                                  eula.1041.txt                temp
'Program Files'                                            eula.1042.txt                vcredist.bmp
'Program Files (x86)'                                      eula.2052.txt
roman@DESKTOP-QKJTF3S:/mnt/c$ cd /Documents and Settings
-bash: cd: too many arguments
roman@DESKTOP-QKJTF3S:/mnt/c$ cd /Documents
-bash: cd: /Documents: No such file or directory
roman@DESKTOP-QKJTF3S:/mnt/c$ cd /Downloads
-bash: cd: /Downloads: No such file or directory
roman@DESKTOP-QKJTF3S:/mnt/c$ cd ./Downloads
roman@DESKTOP-QKJTF3S:/mnt/c/Downloads$ cd
roman@DESKTOP-QKJTF3S:~$ cd /mnt/c/.Documents
-bash: cd: /mnt/c/.Documents: No such file or directory
roman@DESKTOP-QKJTF3S:~$ cd /mnt/c
roman@DESKTOP-QKJTF3S:/mnt/c$ cd ./Documents
-bash: cd: ./Documents: No such file or directory
roman@DESKTOP-QKJTF3S:/mnt/c$ cd ./Documents and Settings
-bash: cd: too many arguments
roman@DESKTOP-QKJTF3S:/mnt/c$ cd ./Documents_and_Settings
-bash: cd: ./Documents_and_Settings: No such file or directory
roman@DESKTOP-QKJTF3S:/mnt/c$ cd ./Downloads
roman@DESKTOP-QKJTF3S:/mnt/c/Downloads$ ls
Updater_SA_Upgrade
roman@DESKTOP-QKJTF3S:/mnt/c/Downloads$ ls -la
total 0
drwxrwxrwx 1 roman roman 512 Apr 16  2020 .
drwxrwxrwx 1 roman roman 512 Feb 11 17:47 ..
drwxrwxrwx 1 roman roman 512 Apr 16  2020 Updater_SA_Upgrade
roman@DESKTOP-QKJTF3S:/mnt/c/Downloads$
0

1 Answer 1

2

WSL Ubuntu Linux installation via Windows Store has the windows C: drive already mounted to the linux system, you can find the 'C drive' in /mnt/c/. The documents folder can be found in /mnt/c/Users/someuser/Documents. You can change your working directory to the C: drive via cd (change directory) like cd /mnt/c/

This was courtesy of @mashuptwice for guiding a noob like myself through it, they rock

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .