This starts up sh, changes the directory to $HOME, and then exec's your $SHELL to replace the sh. This is absolutely not needed since it's much easier to use wsl ~, but: wsl -e sh -c 'cd $HOME exec $SHELL' Remove the "source" attribute and replace it with "commandline": "guid": "",Īlso, for the fun of it, here's an alternative (hacky) way to open WSL to ~/ $HOME (without hardcoding as with the other answers). As an alternative, you can use the chdir command. If you are editing your settings.json directly (currently found in %userprofile%\AppData\Local\Packages\MicrosoftWindowsTerminal.\LocalState\settings.json, but this may change). To print the current working directory in CMD, run the cd command without specifying the path or parameters. Step 2: Rename folder in CMD using ren command: ren HelloWorld HelloWorld2021. Older Windows Terminal Releases, or if you want to edit manually READ ALSO - How to Create Batch to Delete File Automatically Command Line (CMD) Step 1: Change the location in order to select the folder you want to rename by typing the following command: cd D: D: Windows CMD Rename Folder. Since Windows Terminal now has a GUI for Settings, you can just edit your profile to point to wsl ~ in the ->General->Command Line setting. Current and Recent Windows Terminal Releases This is an undocumented flag to wsl.exe, and it must be the first argument (e.g. The easiest way to do that is simply to create or change the "commandline" property to wsl ~. The other answers here (especially the latest one from are great for starting in an arbitrary directory, but the example in your question was to start in your home directory.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |