I have Ubuntu installed on my Windows 10 as a WSL (Windows Subsystem for Linux). Since it was installed by default on the C: drive and I don't have enough storage space there, I wanted to transfer my WSL to the D: drive, which has more free space. I used the following commands on cmd:
[![wsl --shutdownmkdir D:\backupwsl --export ubuntu D:\backup\ubuntu.tarwsl --unregister ubuntumkdir D:\wslwsl --import ubuntu D:\wsl D:\backup\ubuntu.tar][1]][1]
Now, everything seems to be working well since I have more space on my C: drive. However, I don't have much space left on my D: drive because it contains both the backup and the main WSL files. The terminal is working fine, and on my D: drive, I have a folder called "wsl" containing a 230 GB ext4.vhdx file.
However, when I use the Ubuntu terminal, I am logged in as root by default, and I can't access my files and folders. Although I can navigate to the Ubuntu folder, then to "home," and then to my username folder using the file explorer, I can't access these directories through the Ubuntu terminal.