Skip to content
Pinter Computing

Knowledge Base for IT Professionals, Teachers, and Astronauts

Pinter Computing

Knowledge Base for IT Professionals, Teachers, and Astronauts

  • Home
  • Programming
  • DevOps
  • Project Management
  • Software and Hardware
  • Miscellaneous
  • Egyebek
  • About
  • Experience
  • Education
  • Contact
  • Home
  • Programming
  • DevOps
  • Project Management
  • Software and Hardware
  • Miscellaneous
  • Egyebek
  • About
  • Experience
  • Education
  • Contact
Close

Search

Home/Knowledge Base/Using the Windows Subsystem for Linux (WSL)
Knowledge Base

Using the Windows Subsystem for Linux (WSL)

By Laszlo Pinter
March 3, 2020 2 Min Read
0

Sharing files between Windows Subsystem for Linux and Windows

Start WSL

  • In the Windows start menu select the icon of the Linux operating system you have installed when you set up WSL. The default is Ubuntu.
  • A Linux terminal opens

Access the Windows files from Linux

  • Start WSL
  • In the Linux terminal navigate to the /mnt directory
cd /mnt
  • The drives are mounted to sub-directories
root@P70:/mnt# ls -l
total 0
drwxrwxrwx  c
drwxrwxrwx  d
  • To access the C: Windows drive, navigate to
cd /mnt/c

Access the Linux files from Windows

To start from Windows

  • Open Windows Explorer in Windows 11
  • Navigate to \wsl.localhost\Ubuntu

To start from Linux

  • In the Linux terminal navigate to the directory you want to open in Explorer
  • In the terminal execute the following command. DOnt forget to add the dot to the end to specify the current directory.
explorer.exe .

Managing packages in Linux

To update the Linux packages in Ubuntu and Debian, execute the command

sudo apt update && sudo apt upgrade

Copy paste

If you have ever worked on a Macintosh, (macOS) you had the luxury to have a separate key combination for Copy (Command+C) and cancel (CTRL+C). As Windows does not have a Command key, the Windows terminal helps us with a smart feature:

  • If text is highlighted in the terminal, CTRL+C executes Copy,
  • If no text is highlighted in the terminal, CTLR+C cancels the operation.

Project file location

Place the project files in to the file system you will use during development. Files can be accessed across operating systems, but the access speed can be significantly slower.

Linux projects

For Linux projects place the files under the Linux user directory at

\\wsl$\<DistroName>\home\<UserName>\Project

Windows projects

For windows projects place the project files under the Windows user directory at

C:\Users\<UserName>\Project or /mnt/c/Users/<UserName>/Project$

Useful commands

Get the list of running WSL instances

  • In Windows open a PowerShell terminal and execute
    wsl.exe -l -v
  • You may should see two instances.
    • The star shows the default Ubuntu WSL instance, you open with a WSL terminal without arguments,
    • The second instance was created by Docker Desktop to run Linux containers on the Windows machine.
PS C:\WINDOWS\system32> wsl.exe -l -v
  NAME              STATE           VERSION
* Ubuntu            Running         2
  docker-desktop    Running         2

Tags:

LinuxWindows
Author

Laszlo Pinter

Follow Me
Other Articles
Previous

Build a Docker container image for your application

Next

DevOps Engineering part 1. (Ubuntu server) – Install the DevOps development tools on Ubuntu server

No Comment! Be the first one.

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Search

Last Changes

  • DevOps Engineering part 1. (Mac) - Make your Macintosh easier to use June 25, 2026
  • Japan travel tips June 22, 2026
  • How to stop the rain and snow in Cities: Skylines II June 20, 2026
  • Cities: Skylines II Developer Mode June 20, 2026
  • 'CSII_MANAGEDPATH' has incorrect path(s) when building Cities: Skylines II mod June 20, 2026

Tags

.NET .NETcore 3Dprinting ASP.NET Core AutodeskInventor AWS C# Chef cloud DevOps Docker EntityFramework Games Git Go iOS iPad iPhone iPod Java Kubernetes Linux MacOSX MSSQL MVC Node.js Packer PowerShell Python RDS RightScale Ruby security Splunk TeamCity Terraform TestKitchen Tomcat Ubuntu Vagrant VirtualBox VisualStudio Windows WordPress Xcode

Recent Comments

  • Zengei László on MyHeritage családfa exportálása és küldése emailben
  • Raúl Castillo on DynDns update error
  • MICHAEL on Windows Media Player 12 cannot find the album information
  • Nargis on Configure Epson ET-3850 scanning on Windows 11
  • Venczelné Zemen Erika on Delta S2302 termosztát programozása

–

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org
Copyright 2026 — Pinter Computing. All rights reserved.