Windows CMD: Common Commands

A quick reference of common Windows CMD commands for environment variables and network/process inspection.

Sep 12, 2017 · 1 min read · 62 Words · -Views -Comments · Programming
Linux 🇨🇳 阅读中文版
Read with AI

Choose an AI assistant

ChatGPT Open in a new tab with the article link and prompt
Claude Copy the prompt, then open Claude

Open Claude
Trouble reading the article?

If the prompt is missing, copy the full prompt below into your AI assistant. If the AI cannot read the article, paste the visible passage you want to discuss and add your question.

command-shot

Windows CMD lags far behind Linux bash and macOS Terminal, but it’s still useful. Here are common commands I use.

Environment Variables

  • Show env var NODE_ENV

set $NODE_ENV

  • Set env var NODE_ENV

set NODE_ENV="production"


Networking

  • View port usage netstat -ano
  • Find processes using a specific port netstat -ano|findstr "3001"
  • Find process by PID tasklist|findstr "22222"
  • Kill process taskkill /f /t /im node.exe
Authors
Developer, digital product enthusiast, tinkerer, sharer, open source lover