top of page
Writer's pictureThe Tech Platform

How to Access Files on Windows Subsystem for Linux?

Windows Subsystem for Linux (WSL) allows you to run Linux on Windows without having to install a hypervisor and run a Linux instance in a virtual machine (VM). To enable WSL and install Linux on your Windows system, you only need to enter a few commands in the command line and reboot your system -- that's all there is to it.



Having this integration with Windows allows you to access the rich set of the tools that Linux offers. However, Windows also has a rich set of tools, and in fact many tools for manipulating and presenting data will only run on Windows. In this article, I will l take a look at how easy it is to read and write files to and from WSL and the Windows system on which it runs.


You can:

  • Choose your favorite GNU/Linux distributions from the Microsoft Store.

  • Run common command-line tools such as grep, sed, awk, or other ELF-64 binaries.

  • Run Bash shell scripts and GNU/Linux command-line applications including:

    • Tools: vim, emacs, tmux

    • Languages: NodeJS, Javascript, Python, Ruby, C/C++, C# & F#, Rust, Go, etc.

    • Services: SSHD, MySQL, Apache, lighttpd, MongoDB, PostgreSQL.

  • Install additional software using your own GNU/Linux distribution package manager.

  • Invoke Windows applications using a Unix-like command-line shell.

  • Invoke GNU/Linux applications on Windows.



Accessing Files in WSL

There are two methods to access Windows Subsystem for Linux files using File Explorer on Windows 11/10:

  1. Opening File Explorer from the WSL Terminal.

  2. Launching the root from File Explorer.


1. Using File Explorer inside WSL Terminal

  1. Open WSL terminal.

  2. Navigate the root directory or top folder inside of the Terminal.

  3. Type in explorer.exe and hit Enter to open that location inside of the File Explorer.


2. Launching the root from File Explorer

This is a relatively straightforward method.

  1. Launch the File Explorer.

  2. Type in Linux and hit Enter in the address bar of the File Explorer.

  3. It will mount the storage for the Linux distros installed on your computer.

  4. The files are visible in File Explorer.

After you access these files within File Explorer, you can use programs installed on your computer to execute them normally. And any modification that you make will be visible inside the Terminal window.



The Tech Platform




Recent Posts

See All

Comments


bottom of page