How to install VS Code on Windows, Mac, and Ubuntu

Greg Foster
Greg Foster
Graphite software engineer
Try Graphite

Table of contents

Visual Studio Code (VS Code) is a free, lightweight, cross-platform code editor from Microsoft that offers syntax highlighting, intelligent code completion, debugging, built-in Git support, and a vast extension ecosystem. It's popular among developers for building web applications, backend services, data tools, and more.

  1. Go to the official Visual Studio Code download page and choose the "User Installer" for Windows (x64 or ARM64).
  2. Run the installer, accept the license terms, pick your install location, and optionally add "Open with Code" to the context menu.
  3. Finish installation and launch VS Code from Start Menu or desktop shortcut.
  1. Download the macOS build (Universal or Apple Silicon) from the official site.
  2. Open the .zip archive and drag Visual Studio Code.app into your /Applications folder.
  3. (Optional) Launch VS Code, press Cmd+Shift+P, type "Shell Command: Install 'code' command in PATH", and run it—this lets you launch VS Code from Terminal using code.
  1. Download the .deb package for Ubuntu / Debian from the VS Code download page.

  2. In Terminal, run:

    Terminal
    sudo apt update
    sudo apt install ./<file>.deb
  3. If prompted about missing dependencies, fix them with:

    Terminal
    sudo apt-get install -f

    This also sets up Microsoft's repository for auto-updates.

Alternative install via APT repository:

Terminal
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor \
| sudo install -D -o root -g root -m 644 /dev/stdin /etc/apt/keyrings/packages.microsoft.gpg
echo "deb [arch=amd64,arm64 signed-by=/etc/apt/keyrings/packages.microsoft.gpg] \
https://packages.microsoft.com/repos/code stable main" \
| sudo tee /etc/apt/sources.list.d/vscode.list
sudo apt update
sudo apt install code

Once installed, launch VS Code and follow the welcome tutorial. Install extensions via the Extensions panel (Ctrl+Shift+X or Cmd+Shift+X). Explore settings under Preferences → Settings. Updates happen automatically; you can also check manually under Help → Check for Updates (Windows/Linux) or Code → Check for Updates (macOS).

Graphite's VS Code extension integrates Graphite's stacked pull request workflow directly into the editor, making it easy to visually manage dependent branches, drag and drop to reorder them, create branches, and submit or sync pull requests—all from within VS Code. You can learn more about the extension's capabilities and how AI code review works in VS Code with this dedicated guide.

After installing the extension, it guides you to install the Graphite CLI if needed. Once configured, you can stage changes, create a new stacked branch, and submit pull requests in sequence—letting reviewers tackle one small change at a time.

For automated code review, Graphite also offers Diamond, an AI-powered reviewer available inside the VS Code extension. Diamond provides immediate, actionable feedback on your pull requests, catching bugs, style issues, security vulnerabilities, and performance problems before human review. If you're interested in how Diamond compares to traditional static analysis tools, check out this guide on AI code review vs static analysis.

  • Breaks large changes into small, reviewable chunks via stacked pull requests
  • Automates Git operations; no need for manual rebasing or branch retargeting
  • Provides a visual dependency graph of your PRs in the IDE
  • Integrates Diamond's AI review to catch common issues before human review
  • Accelerates review cycles and helps avoid merge conflicts

VS Code is a versatile and powerful cross-platform code editor, offering extensive features and robust extension support for developers on Windows, macOS, and Ubuntu. Its straightforward installation process makes it accessible to all users. Furthermore, by integrating Graphite's VS Code extension, developers can further enhance their Git workflows with intuitive stacked pull request management and AI-powered code review through Diamond. Together, these tools provide a seamless and efficient developer experience, combining advanced code editing with smarter, faster, and more reliable code reviews.

Built for the world's fastest engineering teams, now available for everyone