Skip to main content

Windows

OS

Open Startup Folder

shell:startup

List processes

netstat -a -b -o

netstat -ano | findstr :port

tasklist /fi "imagename eq process.exe"

Delete processes

taskkill /f /pid <pid>

taskkill /f /im <name>

Filesystem

mklink link.txt c:\path\to\target\file.txt

mklink /d directory c:\path\to\target\directory

Windows Subsystem for Linux (WSL)

List available distros

wsl --list --verbose
wsl --list --version
wsl --list --running
wsl -l --all

Run a specific distro

wsl -d <distro-name>
wsl --distribution <distro-name>

Shutdown distros

Shutdown all running distros

wsl --shutdown

Shutdown specific distros

# To terminate/shutdown a specific distro
wsl -t <distro-name>
wsl --terminate <distro-name>

Purge installed distro

wsl --unregister <distro-name>

User access

Run as specific user

wsl -u <username>
wsl --user <username>

Change default user

<distro-name> config --default-user <username>

Set distro version

wsl --set-version <distro-name> <version>

Set default distro to run

wsl -s <distro-name>
wsl --setdefault <distro-name>

Configure per distro launch settings

Additional steps or details will be listed below.

Windows Terminal

Run wt.exe or wt from any command line.

Add icon to terminal profile

  1. Copy transparent 32pxx32px PNG images to:

%LOCALAPPDATA%\packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\RoamingState

This path can be accessed via ms-appdata:///roaming.

  1. Goto Windows Terminal -> Settings

  2. Add "icon" property under desired profile with value ms-appdata:///roaming/image-name.png.