Photo - Roseanna Smith
Photo

Windows

Use PowerShell

To get to a PowerShell from a command prompt:

powershell

You can also hit the Windows (⊞) key and type in "PowerShell" to find a PowerShell Prompt.

I prefer to configure my IDEs to also use PowerShell. In Visual Studio Code (VSCode):

// Settings.json
{
    // ...
    "terminal.integrated.shell.windows": "powershell.exe"
}

Use a Package Manager

Use winget if you can!


WSL

The so-called Windows Subsystem for Linux.

Reset WSL2 Quickly

If you're getting Network Unreachable in WSL2 for some reason, try this:

sudo Disable-WindowsOptionalFeature -Online -FeatureName -NoRestart `
    $("VirtualMachinePlatform", "Microsoft-Windows-Subsystem-Linux")
sudo Enable-WindowsOptionalFeature -Online -FeatureName `
    $("VirtualMachinePlatform", "Microsoft-Windows-Subsystem-Linux")

Systemd in WSL2

It should 'just work' now, but sometimes you may need to set something in your wsl.conf:

# /etc/wsl.conf
[boot]
systemd=true
1867cdb4648edf7344e3233c665e62da7410a020