It is possible to view shorter path in my terminal (VS Code & Hyper) with WSL (Ubuntu). On top of the Ubuntu, I have installed zsh. Currently, I am using a git bash and path looks Lukas@Y50-70 ~/Coding
but with the Ubuntu, I have something like this lukas@Y50-70 /mnt/c/Users/Lukas/Coding
. When I have a project in another 2 folders or so and I have a long branch name it is annoying to have a full row unnecessary info (for me).
Here is a comparison of Ubuntu and git bash:
Thanks
"Error: 0x80370102 The virtual machine could not be started because a required feature is not installed." Please enable the Virtual Machine Platform Windows feature and ensure virtualization is enabled in the BIOS. Please follow guidelines from your PC's manufacturer on how to enable virtualization.
Administrator privileges in Windows are required to run OpenSSH in WSL. To run an OpenSSH server, run your WSL distribution (ie Ubuntu) or Windows Terminal as an administrator.
You can track the updates of WSL by following the WSL blog. You can also check this community maintained list of programs that work (and those that don't) under the WSL. Not all hardware resources are available in WSL. For instance, you cannot access GPUs in WSL.
I was able to solve this using Named Directories - by adding this line to your ~/.zshrc file
hash -d c=/mnt/c
you will see '~c/' in your prompt rather than '/mnt/c/' which I think is a lot nicer.
This has a similar effect to setting an alias for the directory but the name is reflected in how your path is displayed.
As an added bonus you can then switch to that directory at any time by typing ~c
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With