From 54692e3edb52f97c2707dbffd6a6273e1b3d31e8 Mon Sep 17 00:00:00 2001 From: Horsevad Date: Mon, 30 Sep 2024 14:39:52 +0200 Subject: [PATCH] Update networking.md Updated that the hostname takes a lowercase -i as the address flag. This can be seen by running hostname --help. also made the "under the hood" section more verbose with the full length ip-address command. --- WSL/networking.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/WSL/networking.md b/WSL/networking.md index 8eefbaae..9a5b09c0 100644 --- a/WSL/networking.md +++ b/WSL/networking.md @@ -19,12 +19,12 @@ There are two scenarios to consider when identifying the IP address used for a L The Windows host can use command: ``` -wsl -d hostname -I +wsl -d hostname -i ``` -If querying the default distribution, this part of the command designating the distribution can be omitted: `-d `. Be sure to use a capital `-I` flag and not a lower-case `-i`. +If querying the default distribution, this part of the command designating the distribution can be omitted: `-d `. Be sure to use a lower-case `-i` flag. -Under the hood, host command `wsl.exe` launches the target instance and executes Linux command `hostname -I`. This command then prints the IP address of the WSL instance to `STDOUT`. The `STDOUT` text content is then relayed back to wsl.exe. Finally, wsl.exe displays that output to the command line. +Under the hood, host command `wsl.exe` launches the target instance and executes Linux command `hostname --ip-addresses`. This command then prints the IP address of the WSL instance to `STDOUT`. The `STDOUT` text content is then relayed back to wsl.exe. Finally, wsl.exe displays that output to the command line. A typical output might be: