![]() ![]() The Linux distribution ending with “ (Default)” is your default Linux distribution. In the example below, we’ll launch into the default distro (Ubuntu) in the current working directory. ![]() You can change the default distro by using the “wslconfig” tool. Additionally, it starts the distro in the current working directory where you invoke the command. “wsl” The first (and recommended!) method will start up your default distro. If you mean wsl, you can set startingDirectory just like this: "startingDirectory": "//wsl$/Ubuntu/home/user" You can explore the path \\wsl$ in Windows Explorer. For WSL, however, you may want to use the WSL home path instead. By default, the startingDirectory of a profile is %USERPROFILE% (C:\Users\). Set your WSL distribution to start in the home ~ directory when launched. If you don't pass the "starting directory" to "wsl.exe", it will always start from your current directory. My way to always start WSL on $HOME: Create the link of wt.exe, C:\Users\YOURNAME\AppData\Local\Microsoft\WindowsApps\wt.exe wsl.exe ~ -d Ubuntu and just pin it on my start menu, and keep "startingDirectory" in profile as null. ![]() Tab title To open a new terminal instance with custom tab titles, use the -title argument. Note to specify a Windows directory as the starting directory for wsl.exe that two backslashes \\ are required. ![]()
0 Comments
Leave a Reply. |