2025-10-13 13:22:50 +00:00
# VS Code
2025-10-03 20:46:11 +00:00
2025-10-09 15:38:30 +00:00
> Install and use VS Code locally or remotely
2025-10-03 20:46:11 +00:00
## Table of Contents
- [Overview ](#overview )
2025-11-25 15:18:51 +00:00
- [Direct Installation ](#direct-installation )
2025-10-03 20:46:11 +00:00
- [Access with NVIDIA Sync ](#access-with-nvidia-sync )
2025-10-10 00:11:49 +00:00
- [Troubleshooting ](#troubleshooting )
2025-10-03 20:46:11 +00:00
---
## Overview
2025-10-05 18:20:38 +00:00
## Basic idea
2025-11-25 15:18:51 +00:00
This walkthrough will help you set up Visual Studio Code, a full-featured IDE with extensions, an integrated terminal, and Git integration, while leveraging your DGX Spark device for development and testing. There are two different approaches for using VS Code:
* **Direct Installation**: Install the VS Code development environment directly on your ARM64-based Spark system for local development on the target hardware without remote development overhead.
* **Access with NVIDIA Sync**: Set up NVIDIA Sync to remotely connect to Spark over SSH and configure VS Code as one of your development tools.
2025-10-03 20:46:11 +00:00
## What you'll accomplish
2025-11-25 15:18:51 +00:00
You will have VS Code set up for development on your DGX Spark device with access to the system's ARM64 architecture and GPU resources. This setup enables direct code development, debugging, and execution.
2025-10-03 20:46:11 +00:00
## What to know before starting
2025-11-25 15:18:51 +00:00
You should have basic experience working with the VS Code interface and features; the approach you choose will require some additional understanding:
2025-10-03 20:46:11 +00:00
2025-11-25 15:18:51 +00:00
* **Direct Installation**:
* Familiarity with package management on Linux systems
* Understanding of file permissions and authentication on Linux
2025-10-03 20:46:11 +00:00
2025-11-25 15:18:51 +00:00
* **Access with NVIDIA Sync**:
* Familiarity with SSH concepts
2025-10-03 20:46:11 +00:00
## Prerequisites
2025-11-25 15:18:51 +00:00
Your DGX Spark [device is set up ](https://docs.nvidia.com/dgx/dgx-spark/first-boot.html ). You will also need the following:
2025-10-03 20:46:11 +00:00
2025-11-25 15:18:51 +00:00
* **Direct Installation**:
* DGX Spark set up with administrative privileges
* Active internet connection for downloading the VS Code installer
2025-10-03 20:46:11 +00:00
2025-11-25 15:18:51 +00:00
* **Access with NVIDIA Sync**:
* VS Code installed on your laptop, downloaded from https://code.visualstudio.com/download.
2025-10-03 20:46:11 +00:00
## Time & risk
2025-10-08 22:00:07 +00:00
* **Duration:** 10-15 minutes
* **Risk level:** Low - installation uses official packages with standard rollback
* **Rollback:** Standard package removal via system package manager
2025-11-25 15:18:51 +00:00
* **Last Updated:** 11/21/2025
* Clarify options and minor copyedits
2025-10-03 20:46:11 +00:00
2025-11-25 15:18:51 +00:00
## Direct Installation
2025-10-03 20:46:11 +00:00
## Step 1. Verify system requirements
2025-10-05 18:20:38 +00:00
Before installing VS Code, confirm your DGX Spark system meets the requirements and has GUI support.
2025-10-03 20:46:11 +00:00
```bash
## Verify ARM64 architecture
uname -m
2025-11-25 15:18:51 +00:00
## Expected output: aarch64
2025-10-03 20:46:11 +00:00
2025-10-05 18:20:38 +00:00
## Check available disk space (VS Code requires ~200MB)
2025-10-03 20:46:11 +00:00
df -h /
## Verify desktop environment is running
ps aux | grep -E "(gnome|kde|xfce)"
2025-11-25 15:18:51 +00:00
## Verify GUI desktop environment is available
echo $DISPLAY
## Should return display information like :0 or :10.0
2025-10-03 20:46:11 +00:00
```
2025-10-05 18:20:38 +00:00
## Step 2. Download VS Code ARM64 installer
2025-10-03 20:46:11 +00:00
2025-10-05 18:20:38 +00:00
Navigate to the VS Code [download ](https://code.visualstudio.com/download ) page and download the appropriate ARM64 `.deb` package for your system.
2025-10-03 20:46:11 +00:00
Alternatively, you can download the installer with this command:
```bash
wget https://code.visualstudio.com/sha/download?build=stable\&os=linux-deb-arm64 -O vscode-arm64.deb
```
2025-10-05 18:20:38 +00:00
## Step 3. Install VS Code package
2025-10-03 20:46:11 +00:00
Install the downloaded package using the system package manager.
You can click on the installer file directly or use the command line.
```bash
## Install the downloaded .deb package
sudo dpkg -i vscode-arm64.deb
## Fix any dependency issues if they occur
sudo apt-get install -f
```
## Step 4. Verify installation
2025-10-05 18:20:38 +00:00
Confirm the VS Code app is installed successfully and can launch.
2025-10-03 20:46:11 +00:00
You can open the app directly from the list of applications or use the command line.
```bash
2025-10-05 18:20:38 +00:00
## Check if VS Code is installed
2025-10-03 20:46:11 +00:00
which code
## Verify version
code --version
2025-10-05 18:20:38 +00:00
## Test launch (will open VS Code GUI)
2025-10-03 20:46:11 +00:00
code &
```
2025-10-05 18:20:38 +00:00
VS Code should launch and display the welcome screen.
2025-10-03 20:46:11 +00:00
## Step 5. Configure for Spark development
2025-10-05 18:20:38 +00:00
Set up VS Code for development on the DGX Spark platform.
2025-10-03 20:46:11 +00:00
```bash
2025-10-05 18:20:38 +00:00
## Launch VS Code if not already running
2025-10-03 20:46:11 +00:00
code
## Or create a new project directory and open it
mkdir ~/spark-dev-workspace
cd ~/spark-dev-workspace
code .
```
2025-10-05 18:20:38 +00:00
From within VS Code:
2025-10-03 20:46:11 +00:00
* Open **File** > **Preferences** > **Settings**
* Search for "terminal integrated shell" to configure default terminal
* Install recommended extensions via **Extensions** tab (left sidebar)
## Step 6. Validate setup and test functionality
2025-10-05 18:20:38 +00:00
Test core VS Code functionality to ensure proper operation on ARM64.
2025-10-03 20:46:11 +00:00
Create a test file:
```bash
## Create test directory and file
mkdir ~/vscode-test
cd ~/vscode-test
echo 'print("Hello from DGX Spark!")' > test.py
code test.py
```
2025-10-05 18:20:38 +00:00
Within VS Code:
2025-10-03 20:46:11 +00:00
* Verify syntax highlighting works
* Open integrated terminal (**Terminal** > **New Terminal** )
* Run the test script: `python3 test.py`
* Test Git integration by running `git status` in the terminal
2025-10-05 18:20:38 +00:00
## Step 8. Uninstalling VS Code
2025-10-03 20:46:11 +00:00
2025-10-12 20:53:42 +00:00
> [!WARNING]
> Uninstalling VS Code will remove all user settings and extensions.
2025-10-03 20:46:11 +00:00
2025-10-05 18:20:38 +00:00
To remove VS Code if needed:
2025-10-03 20:46:11 +00:00
```bash
2025-10-05 18:20:38 +00:00
## Remove VS Code package
2025-10-03 20:46:11 +00:00
sudo apt-get remove code
## Remove configuration files (optional)
rm -rf ~/.config/Code
rm -rf ~/.vscode
```
## Access with NVIDIA Sync
2025-10-05 18:20:38 +00:00
## Step 1. Install and configure NVIDIA Sync
2025-10-03 20:46:11 +00:00
2026-02-05 17:23:51 +00:00
Follow the [NVIDIA Sync setup guide ](https://build.nvidia.com/spark/connect-to-your-spark/sync ) to:
2025-10-05 18:20:38 +00:00
- Install NVIDIA Sync for your operating system
- Configure which development tools you want to use (VS Code, Cursor, Terminal, etc.)
- Add your DGX Spark device by providing its hostname/IP and credentials
2025-10-03 20:46:11 +00:00
2025-10-05 18:20:38 +00:00
NVIDIA Sync will automatically configure SSH key-based authentication for secure, password-free access.
2025-10-03 20:46:11 +00:00
2025-10-05 18:20:38 +00:00
## Step 2. Launch VS Code through NVIDIA Sync
2025-10-03 20:46:11 +00:00
2025-10-05 18:20:38 +00:00
- Click the NVIDIA Sync icon in your system tray/taskbar
- Ensure your device is connected (click "Connect" if needed)
2025-11-25 15:18:51 +00:00
- Click on "VS Code" to launch it with an automatic SSH connection to your DGX Spark
- Wait for the remote connection to be established (your local machine may ask for a password or to authorize the connection)
- You may be prompted to "trust the authors of the files in this folder" when you first land in the home directory after a successful SSH connection
2025-10-03 20:46:11 +00:00
2025-10-05 18:20:38 +00:00
## Step 3. Validation and follow-ups
2025-10-03 20:46:11 +00:00
2025-11-25 15:18:51 +00:00
- Verify that you can access your DGX Spark's filesystem with VS Code as a text editor
- Open the integrated terminal in VS Code and run test commands like `hostnamectl` and `whoami` to ensure you are remotely accessing your DGX Spark
2025-10-05 18:20:38 +00:00
- Navigate to a specific file path or directory and start editing/writing files
- Install VS Code extensions for your development workflow (Python, Docker, GitLens, etc.)
- Clone repositories from GitHub or other version control systems
- Configure and locally host an LLM code assistant if desired
2025-10-10 00:11:49 +00:00
## Troubleshooting
| Symptom | Cause | Fix |
|---------|-------|-----|
| `dpkg: dependency problems` during install | Missing dependencies | Run `sudo apt-get install -f` |
| VS Code won't launch with GUI error | No display server/X11 | Verify GUI desktop is running: `echo $DISPLAY` |
| Extensions fail to install | Network connectivity or ARM64 compatibility | Check internet connection, verify extension ARM64 support |
2025-11-25 15:18:51 +00:00
For latest known issues, please review the [DGX Spark User Guide ](https://docs.nvidia.com/dgx/dgx-spark/known-issues.html ).