I tend to setup and teardown my dev environments quite frequently. So I have created this setup.sh script to automate setting up the dev environment with my preferences.
This script -
- Installs
curl,git,net-tools, andtree. - Installs
build-essentialpackage which installsgcc,g++and some other libs. - Installs the latest
openjdkandmaven. - Installs
python3and some required libraries (I use them pretty often). - Installs
nodejs12 globally. Then installsNode Version Managerand installs all LTS versions. - Installs
dockeranddocker-compose - Installs
zshandoh-my-zshandpowerlinefonts, and changes theme toagnoster.
The script has been tested on Ubuntu 20.04 (standalone and WSL2).
- Make sure Windows 10 is updated to May 2020 Update (ver 2004)
- Open the
Turn Windows features on or offutility. Enable -Virtual Machine PlatformWindows Hypervisor PlatformWindows Subsystem for Linux
- Restart Windows to enable above features.
- Go to this link. Download and install WSL2 kernel.
- Open powershell and execute
wsl --set-default-version 2to set v2 as the default WSL2 version. - Go to Microsoft Store and install a distribution of your choice (Ubuntu, Debian, etc). Optionally install
Windows Terminal.
Add this line in the settings.json file in VSCode
"terminal.integrated.fontFamily": "'Cascadia Mono PL'"
To make agnoster show all the glyphs properly in WSL, some additional steps are required.
- Download and install the latest Cascadia Code.
- In your
profiles.json, change thefontFaceproperty toCascadia Code PL(or whichever variant you like).
So, your favorite WSL distro's settings will look something like
{
"guid": "{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}",
"name": "Ubuntu 20.04 LTS",
"source": "Windows.Terminal.Wsl",
"commandline": "wsl.exe -d Ubuntu-20.04",
"fontFace": "Cascadia Code PL",
"fontSize": 12,
}
NOTE: If you like to use the terminal provided by your favorite distro, then go to it's properties (right-click on title bar and click on properties), go to the Fonts tab, and select Cascadia Mono PL.
- This issue in the
agnoster-zsh-themerepo consists of some really cool zsh prompts. - atomcorp.github.io/themes/ has a bunch of really cool themes for Windows Terminal.
- To open any folder/repo in VSCode, just go to the folder on terminal and execute
code .. This will perform a one time setup where it installs the remote VSCode server in your distro. - To run linux GUI apps, install and run VcXsrv, then go to the
Running Graphical Applicationssub-section in the WSL Ubuntu Wiki and follow the steps there.