⚠ This article has a formatting issue and may not display correctly.
Our team has been notified. The content is shown as plain text below.
Installing on macOS takes two steps: drag the app to Applications, then add the shell command so you can open projects from the terminal. This editor runs on both Apple silicon and Intel Macs. The download page gives you a Universal build that works on either.
## Choose your build
| Mac type | Recommended download |
|---|---|
| Apple silicon (M1, M2, M3, M4) | Universal or Apple silicon build |
| Intel | Universal or Intel build |
| Unsure | Universal build (works on both) |
Go to [code.visualstudio.com/download](https://code.visualstudio.com/download). The site detects your Mac type and highlights the right button. Click the arrow next to the button to see all build options.
## Install the app
Download the disk image
Go to [code.visualstudio.com/download](https://code.visualstudio.com/download) and click the **Mac** download button. The file downloads to your Downloads folder.
Open the disk image
Double-click the downloaded file. A Finder window opens showing the VS Code icon and a shortcut to the Applications folder.
Drag VS Code to Applications
Drag the app icon into the Applications folder shortcut. macOS copies it.
If you skip this step and run from the disk image, it works but updates may not apply correctly. Always install to Applications.
Open and pin the app
Open the Applications folder in Finder and double-click the app. The first launch may show a security prompt. Click **Open** to confirm.
You can eject the disk image now. In Finder, click the eject icon next to "VSCode" in the sidebar.
To keep the editor in the Dock for quick access, Control-click the icon in the Dock and select **Options** > **Keep in Dock**.
## Add the shell command
The shell command lets you open the editor from the terminal. Type `code .` in any folder to open it. Type `code myfile.js` to open a specific file.
Open the Command Palette
With the editor open, press **Cmd+Shift+P**. The Command Palette appears at the top of the window.
Run the shell command installer
Type `shell command` in the Command Palette and select **Shell Command: Install 'code' command in PATH**. A notification confirms it was installed.
Restart your terminal
Close and reopen Terminal or iTerm. The terminal needs to reload its PATH before the command becomes available.
Test the command
In a new terminal window, type `code --version` and press Enter. You should see the version number, commit ID, and platform string.
Now navigate to any folder and type `code .` to open it.
## Manual PATH setup
If the Shell Command option does not work, add the path manually.
Open Terminal and run the command for your shell.
Here is the command for Zsh, which is the default since macOS Catalina:
cat > ~/.zprofile
# Add Visual Studio Code (code)
EOF
This appends the editor's binary path to your shell profile. The backslash before the PATH variable prevents it from expanding during the append.
For Bash, the same approach works with the profile file changed:
cat > ~/.bash_profile
# Add Visual Studio Code (code)
EOF
Close and reopen the terminal, then test with `code --version`.
## Verify everything works
After installation and PATH setup, run a quick test.
- Open Terminal.
- Create a test folder: `mkdir ~/Desktop/vscode-test`.
- Move into it: `cd ~/Desktop/vscode-test`.
- Type `code .` and press Enter.
The editor opens with the test folder loaded.
Create a new file, type some text, and save it. Both the editor and shell command are working.
Delete the test folder when done: `rm -rf ~/Desktop/vscode-test`.
## Next steps
The editor is installed and the shell command is ready. Now set up essential settings, install language extensions, sign in to GitHub Copilot, and create your first project.
Start with the [beginner setup guide](/vscode/vs-code-setup-for-beginners-essential-settings-extensions-and-first-project). If you also work on other platforms, see the [Windows 11 install guide](/vscode/how-to-download-and-install-vs-code-on-windows-11).