I recently installed Ubuntu in WSL on my Windows 10 system following the steps at https://www.windowscentral.com/how-install-bash-shell-command-line-windows-10. I created files in a Terminal window but I don't know how to access them via folder. How can I find and open such a file?
While in the Ubuntu terminal enter:
Note the . at the end. This will open a File Explorer window where you are at in Ubuntu.
Open File Explorer in Windows the usual way:
Then at the top type:
\\wsl$\Ubuntu\home\<Your Ubuntu Username>
Note: Text files created in Ubuntu uses different conventions for new lines as compared with Windows. If you edit these files using Windows tools they may not work as before in Ubuntu. Messing with Ubuntu system files via Windows Explorer may corrupt those files.
DO NOT, under ANY circumstances, access, create, and/or modify Linux files inside of your
%LOCALAPPDATA% folder using Windows apps, tools, scripts, consoles, etc.
Opening > files using some Windows tools may read-lock the opened files > and/or folders, preventing updates to file contents and/or metadata, > essentially resulting in corrupted files/folders.
Creating/changing Linux files in your Appdata folder from Windows will likely result in data corruption and/or damage your Linux environment requiring you to uninstall & reinstall your distro!
Hope this helps