WSL, Git, and VSCode
A simple guide on how to install and configure WSL, Git, and VSCode
· 2 min read
Installation - WSL, VSCode, and Git #
In this seciton, we will install WSL and VSCode.
WSL #
Consequently, we could simply follow along the documentation provided to have WSL working on our windows device.
We will get the default Ubuntu distribution. In
pwsh:> wsl --installSet up your
usernameandpasswordfor your Linux distribution according to the guide. Now we should open our WSL Ubuntu on windows.> wsl.exeWe can now enter the
/home/{username}directory:> cd ~Now a quick update and upgrade to get everything up to the latest:
> sudo apt update && sudo apt upgrade
VSCode #
We now follow the documentation for VSCode usage with WSL.
Use installer to install if you havn’t got VSCode on machine. For Windows usage with WSL, install VSCode natively under Windows file system.
Follow the guide to setup
Remote - SSHextension. There are a number of different extensions available that improves quality of life, but we will come back to that at a later point.In terminal, we can create a folder for our coding projects, let us call it
repo:> cd ~ > mkdir repo > cd repoWe have now created a new folder under
/home/{username}and changed our directory to~/repo. How can we make changes to files with VSCode from this point onwards? It is simply with:> code .By running
> code .in terminal, we open VSCode under the current directory.. Consequently, we can also open files with VSCode just like> vi {filename}:> code {filename}
Git #
Once again, there are additional documentation that we can follow.
Check if Git is istalled. In your Linux shell, run:
> git --versionInstall Git if you don’t have it:
> sudo apt-get install gitRun Git configs:
> git config --global user.name "Your Name" > git config --global user.email "youremail@domain.com"We can now double check our
.gitconfigby checking:> cd ~ > ls -a > cat .gitconfig
Remarks #
These steps pretty much concludes the initial setting up of the tools mentioned. Additional steps should be performed for tracking and syncing changes with Git and GitHub.