Author: Alessandro Pedone (LinkedIn, GitHub)
<aside> đ„
This guide is primarily aimed at Windows users with limited terminal experience, though Linux users can also benefit to a lesser extent.
</aside>
<aside> đ
You donât need a Linux machine.
All truth passes through three stages: First, it is ridiculed. Second, it is violently opposed. Third, it is accepted as being self-evident.
</aside>
<aside> đ©Œ
Have you spotted any errors or want to contribute to this guide? You can contact me by sending an email directly to me clicking here. If necessary, I can give you access to the original Notion page and to the GitHub repository. Suggestions: add guidance for Mac users, expand the discussion on containerization, and include instructions for running Python repository code using Colab GPUs.
</aside>
My approach. Itâs boring to learn all this stuff by yourself, because you are usually alone and you have to dig inside the details reading several resources. When people teach, they usually focus on real programming: syntax, data structures, algorithms, best programming practices, and so on. But they never tell you much about whatâs around it. My goal and approach here are different, and I hope that, with the information contained here, youâll speed up your future learning by a lot. For sure, you will be able to look for what you need for side tasks and then concentrate for real on the stimulating part of programming. I hope my view and exposition suit your taste.
Is this already too old? Probably most of the things here will be replaced by new and better tools, but especially by AI agents. All these background tasks will be automated, at least for high level programming, but still at the moment I think thereâs a lot of work to do about security.
Motivation. Windows Subsystem for Linux (WSL) lets you run a real Linux environment directly inside Windows without needing a virtual machine or dual boot. It provides native Linux tools, shells, and workflows while staying fully integrated with the Windows system. So everything that will be said is valid for any Linux user too, in particular we will focus on the Ubuntu distribution.
Installation. I assume youâre not an expert, so you generally wonât need strange distributions of Linux when you work in WSL. The default choice is Ubuntu, since itâs the most beginner-friendly one, widely supported and stable. To install an up-to-date Ubuntu distro, execute
wsl --install
in Windows PowerShell, then follow the instructions and restart the PC after the installation. For additional information you can read here: https://learn.microsoft.com/en-us/windows/wsl/install.
<aside> đȘ©
Distributions. If itâs the first time you here about Linux distributions (or distros), just think of them as versions of Linux: you have a kernel (base structure of Linux) and then some additional functionalities that really characterize a distribution. There are some with more pre-installed stuff than others, the most famous minimal one is Arch Linux (which I suggest you stay away from as a beginner). In any case, if you find this subject interesting, start reading from Wikipedia.
</aside>
Run WSL. Inside Windows PowerShell you can use the commands in the table.
Running wsl inside PowerShell is a way to start the default distro, i.e. the one you installed before, but if you want you can also type âwslâ in the Windows search bar and run directly WSL from the start menu.
| Command | Operation |
|---|---|
wsl -l |
list of distros |
wsl |
run the default distro |
wsl --shutdown |
shut down WSL (if you run into RAM saturation) |
WSL in VS Code. You can run a session of your terminal inside VS Code, and also WSL. After installing VS Code, you should install WSL extension. Then follow the instructions to understand how to use WSL inside VS Code terminal, it should be easy. We will learn some other basic features of VS Code throughout this guide.
<aside> âĄ
VS Code installation tips.
During the installation process check the option Add âOpen with Codeâ action to Windows Explorer. This way you will be able to open easily files and folders in VS Code.
After you open VS Code, the first thing you want to do is press CTRL+SHIFT+P to open the command palette, search for Toggle Auto Save and press enter. Forgetting to save files can cause problems during compilation and other stuff, while and after working on the code, so just make the editor do your job.
</aside>
<aside> âšïž
Keyboard shortcuts. You will discover that remembering this CTRL+SHIFT+P pattern can be very helpful, for instance you can use Toggle Block Comment to comment a block of code, or modify the VS Code theme. Another useful command is CTRL+P, that allows you to search for files inside the folder curretly open in VS Code.
</aside>