Jadual Kandungan
Open WSL Files from Terminal
Rumah Tutorial sistem Siri Windows Cara Mengakses Fail Linux (WSL) Anda dalam Windows 10 dan Windows 11

Cara Mengakses Fail Linux (WSL) Anda dalam Windows 10 dan Windows 11

Jul 27, 2024 am 01:46 AM

Windows 10's May 2019 Update introduced an easy, safe, and officially supported way to access and work with your Linux files from within File Explorer and other applications. Here's how to get at your Windows Subsystem for Linux (WSL) files.

Unlike previous methods, this is a safe way to work with Linux files! Windows does some magic in the background, making it possible to edit your Linux files from Windows applications without causing file permission issues. You still shouldn't modify the underlying files at their real location on your system.

It doesn't matter if you use WSL1 or WSL2. These commands all function exactly the same way.

Open WSL Files from Terminal

There are two ways to access your Linux files. First, the easy one. From within the Windows Subsystem for Linux environment you want to browse, run the following command:

explorer.exe .
Salin selepas log masuk

This will launch File Explorer showing the current Linux directory—you can browse the Linux environment's file system from there.

How to Access Your Linux (WSL) Files in Windows 10 and Windows 11Open the WSL Directory in File Explorer Directly

You can also access them directly at the wsl$ path. In File Explorer or any other Windows application that can browse files, navigate to the following path:

wsl$
Salin selepas log masuk

You'll see the folders for all your installed Linux distributions, which are exposed as if they were network shares. For example, Ubuntu 22.04 is usually available at wsl$Ubuntu-22.04.

Feel free to create a shortcut to this folder—for example, you could drag it to the Quick Access section in File Explorer's sidebar.

How to Access Your Linux (WSL) Files in Windows 10 and Windows 11

Again, you can modify these files normally as if they were any other type of file on your system. Modify files with Windows tools (Notepad even supports Unix line endings!), create new files in the Linux folders, delete files, or do anything else you like. Windows will ensure nothing goes wrong and the file's permissions are updated properly.

Atas ialah kandungan terperinci Cara Mengakses Fail Linux (WSL) Anda dalam Windows 10 dan Windows 11. Untuk maklumat lanjut, sila ikut artikel berkaitan lain di laman web China PHP!

Kenyataan Laman Web ini
Kandungan artikel ini disumbangkan secara sukarela oleh netizen, dan hak cipta adalah milik pengarang asal. Laman web ini tidak memikul tanggungjawab undang-undang yang sepadan. Jika anda menemui sebarang kandungan yang disyaki plagiarisme atau pelanggaran, sila hubungi admin@php.cn

Tag artikel panas

Notepad++7.3.1

Notepad++7.3.1

Editor kod yang mudah digunakan dan percuma

SublimeText3 versi Cina

SublimeText3 versi Cina

Versi Cina, sangat mudah digunakan

Hantar Studio 13.0.1

Hantar Studio 13.0.1

Persekitaran pembangunan bersepadu PHP yang berkuasa

Dreamweaver CS6

Dreamweaver CS6

Alat pembangunan web visual

SublimeText3 versi Mac

SublimeText3 versi Mac

Perisian penyuntingan kod peringkat Tuhan (SublimeText3)

Powertoys adalah karya utama dari aplikasi sahabat di rumah Powertoys adalah karya utama dari aplikasi sahabat di rumah Mar 03, 2025 am 10:07 AM

Powertoys adalah karya utama dari aplikasi sahabat di rumah

Cara Mencari Kekunci Produk untuk Windows 10 Cara Mencari Kekunci Produk untuk Windows 10 Mar 04, 2025 am 01:46 AM

Cara Mencari Kekunci Produk untuk Windows 10

Cara Memasang Windows 11 23H2 pada PC yang tidak disokong Cara Memasang Windows 11 23H2 pada PC yang tidak disokong Mar 03, 2025 pm 12:55 PM

Cara Memasang Windows 11 23H2 pada PC yang tidak disokong

Cara menukar fon dan susun atur tetingkap PowerShell Cara menukar fon dan susun atur tetingkap PowerShell Mar 03, 2025 pm 01:03 PM

Cara menukar fon dan susun atur tetingkap PowerShell

Ciri -ciri Permainan Top 3 Windows 11 yang Outshine Windows 10 Ciri -ciri Permainan Top 3 Windows 11 yang Outshine Windows 10 Mar 16, 2025 am 12:17 AM

Ciri -ciri Permainan Top 3 Windows 11 yang Outshine Windows 10

Papan kekunci ergonomik terbaik pada tahun 2025 Papan kekunci ergonomik terbaik pada tahun 2025 Mar 03, 2025 am 10:02 AM

Papan kekunci ergonomik terbaik pada tahun 2025

Betulkan 'Pada masa ini tiada pilihan kuasa yang tersedia' di Windows 11 Betulkan 'Pada masa ini tiada pilihan kuasa yang tersedia' di Windows 11 Mar 03, 2025 pm 12:58 PM

Betulkan 'Pada masa ini tiada pilihan kuasa yang tersedia' di Windows 11

Acer PD163Q Dual Portable Monitor Review: Saya benar -benar mahu menyukai ini Acer PD163Q Dual Portable Monitor Review: Saya benar -benar mahu menyukai ini Mar 18, 2025 am 03:04 AM

Acer PD163Q Dual Portable Monitor Review: Saya benar -benar mahu menyukai ini

See all articles