From 97ff92f366127e605cc00b56c6ab9d6657dbfd62 Mon Sep 17 00:00:00 2001 From: multiplealiases Date: Sun, 15 Sep 2024 18:38:01 +0800 Subject: [PATCH] WSL/wsl-config.md: rewrite lead for clarity This is a rewrite of the lead section, as I feel the previous one was long-winded yet did not meaningfully summarize the most important points of the article. --- WSL/wsl-config.md | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/WSL/wsl-config.md b/WSL/wsl-config.md index c2a8805d..b59e7635 100644 --- a/WSL/wsl-config.md +++ b/WSL/wsl-config.md @@ -9,18 +9,16 @@ adobe-target: true # Advanced settings configuration in WSL -The [wsl.conf](#wslconf) and [.wslconfig](#wslconfig) files are used to configure advanced settings options, on a per-distribution basis (`wsl.conf`) and globally across all WSL 2 distributions (`.wslconfig`). This guide will cover each of the settings options, when to use each file type, where to store the file, sample settings files and tips. +The [`wsl.conf`](#wslconf) and [`.wslconfig`](#wslconfig) files are used to configure advanced settings in WSL that will be applied [every time WSL is (re)launched](#the-8-second-rule-for-configuration-changes). They differ in scope, what they configure, whether they are available for the WSL version you are running and where they are stored. -## What is the difference between wsl.conf and .wslconfig? +| Aspect | `.wslconfig` | `wsl.conf` | +|:---|:---|:---| +| Scope | Global (affects all installed WSL distributions) | Local (affects a distribution only) | +| Configures | The virtual machine powering WSL 2 (RAM, kernel to boot, number of CPUs, etc.) | Distributions in WSL (boot options, DrvFs automounts, networking, interoperability with the Windows system, what user to run as) | +| Available for | Only WSL 2 | Both WSL 1 and 2 | +| Location | `%UserProfile%\.wslconfig`, outside of a WSL distribution | `/etc/wsl.conf`, while inside a WSL distribution | -You can configure the settings for your installed Linux distributions that will automatically be applied every time you launch WSL in two ways, by using: - -- **[.wslconfig](#wslconfig)** to configure **global settings** across all installed distributions running on WSL 2. -- **[wsl.conf](#wslconf)** to configure **local settings** per-distribution for each Linux distribution running on WSL 1 or WSL 2. - -Both file types are used for configuring WSL settings, but the location where the file is stored, the scope of the configuration, the type of options that can be configured, and the version of WSL running your distribution all impact which file type to choose. - -WSL 1 and WSL 2 run with different architecture and will impact the configuration settings. WSL 2 runs as a lightweight virtual machine (VM), so uses virtualization settings that allow you to control the amount of memory or processors used (which may be familiar if you use Hyper-V or VirtualBox). [Check which version of WSL you are running.](./install.md#check-which-version-of-wsl-you-are-running) +If you are unsure of which version of WSL you running, refer to [Check which version of WSL you are running](./install.md#check-which-version-of-wsl-you-are-running). ## The 8 second rule for configuration changes