Home Tips & Tricks Tip: How to open files on Linux that is within Windows 10


Tip: How to open files on Linux that is within Windows 10

by ace

Microsoft's approach to Linux took place with Windows 10. This system has already integrated the possibility of running a sub-system, which gives the user direct access to Linux and everything it can offer.

Naturally a system based on consoles and text terminals, it is difficult to open files and edit or change their content. But, as they are modular systems, there is a small trick to open files on Linux that is within Windows 10.

With Windows 10, users who want to get the most out of Linux can do so directly within this system. You do not need to have a second machine or restart to change the operating system. Everything is gift, on WLS (Windows Subsystem for Linux).

Opening files on Linux

To work around the problem of opening files in this environment that has no graphics, there is a solution. Just navigate to the Windows folder where cmd.exe is. This is located in / mnt / c / Windows / System32 /.

Linux Windows 10 WSL apps files

Then, just call the cmd.exe command with the right flags. We talk about / C, start and the path to the file.

Windows 10 apps are used

In the case of an image, located at the root of the disk, the command would be: cmd.exe / C start “c: pplware_s20_gravar_8k.jpg”. They can, of course, use another app for any other type of file.

Linux Windows 10 WSL apps files

When executing the command, it will immediately open the app associated with the images, in this case the Photos app. If it is another type of file, the associated app in Windows 10 will open, with the file ready to be used.

The WLS takes care of everything in this case

If you prefer, there is also another option, which can open the apps without any associated files. This command is given in the same location, but has a different syntax. This is simpler and easier to memorize.

Linux Windows 10 WSL apps files

Using cmd.exe again, you only need to indicate the name of the executable, keeping the flags already used in the command to open files. So, for the Notepad app, the command would be the following: cmd.exe / C start notepad.exe.

This seems to be the simplest way to access these files within the WSL. Thus, Linux gives access to Windows apps, which then open their files. If you are already a Windows 10 user, then you have to try this tip.


Related Articles

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More