Today we are going to discuss about how to copy file from your Windows 10 machine to Windows Sub-System for Linux.

Distribution Package of Windows Sub-System for Linux

First thing first, before you can even begin you have to understand where all the Linux files are placed in your Windows 10 machine. To avoid any accidental tampering Microsoft stores all you Linux files under the following hidden folder:

%userprofile%\AppData\Local\Packages

Here you can find your Linux distribution packages (distro) , double-click on the folder for your distribution, following is name of distribution package and folder name mapping:

Distribution Package Folder Name
Ubuntu CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc
openSUSE Leap 42 46932SUSE.openSUSELeap42.2_022rs5jcyhyac
SUSE Linux Enterprise Server 12 46932SUSE.SUSELinuxEnterpriseServer12SP2_022rs5jcyhyac

For Ubuntu which I’m using, I’ll look for CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc and then navigate to folder navigate to .\LocalState\rootfs\ folder. This is the root file share where all you files are placed

Windows Sub-System for Linux

 

Copy Files

Method 1 – Manual Copy-Paste

You can simply move or copy-paste files inside one of these Linux directories, 

but the files won’t appear in you Windows Sub-system for Linux Bash Shell until you restart it.

Windows Sub-System for Linux


Method 2 – Windows System Drive as a Mount point

Windows Sub-System for Linux provides you access to the Windows 10 system drive by mounting the C:\ . On Linux  if you go to you root directory and list all directories, then you will notice a /mnt/c/ which is Windows 10 C:\ mounted on Linux

Windows Sub-System for Linux

Now simply use copy command ( cp ) to copy files over to your Linux Subsystem.


Video Tutorial

 


If you like this article read more similar articles under ‘N – Ways to’ category


My New Book :  PowerShell Scripting Guide to Python

This PowerShell Scripting guide to Python is designed to make readers familiar with syntax, semantics and core concepts of Python language, in an approach that readers can totally relate with the concepts of PowerShell already in their arsenal, to learn Python fast and effectively, such that it sticks with readers for longer time.

“Use what you know to learn what you don’t. ” also known as Associative learning.

Book follows a comparative method to jump start readers journey in Python, but who is the target audience? and who should read this book –

  • Any System Administrator who want to step into Development or Programming roles, and even if you don’t want to be a developer, knowledge of another scripting language will make your skill set more robust.
  • Python Developers who want to learn PowerShell scripting and understand its ease of user and importance to manage any platform.

Python is one of the top programming languages and in fast changing IT scenarios to DevOps and Cloudto the future – Data ScienceArtificial Intelligence (AI) and Machine Learning Python is a must know.

But this PowerShell Scripting guide to Python would be very helpful for you if you already have some knowledge of PowerShell

NOTE! This is a Leanpub “Agile-published” book. That means the book is currently unfinished and in-progress. As I continue to complete the chapters, we will re-publish the book with the new and updated content. Readers will receive an email once a new version is published!

While the book is in progress, please review it and send any feedback or error corrections at prateek@ridicurious.com

Optical Character Recognition

Subscribe to our mailing list

* indicates required