In this article, we'll walk through the steps to set up a Node.js development environment on a Steam Deck. The Steam Deck runs on SteamOS, which is a flavor of GNOME KDE, and uses Konsole as its terminal program.
Table of Contents
- Prerequisites
- Setting up GitHub
- SSH Keys for GitHub
- SSH Keys for Azure DevOps
- Installing Node.js Using NVM
Prerequisites
Firstly, make sure you have curl
and git
installed. If they are not installed, open Konsole and run:
sudo apt update
sudo apt install curl git
Setting up GitHub
After installing the required packages, it's time to configure your GitHub credentials:
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
Replace "you@example.com"
with your GitHub email address and "Your Name"
with your GitHub username.
SSH Keys for GitHub
To interact with GitHub repositories more securely, you can set up SSH keys:
-
Generate a new SSH key:
ssh-keygen -t ed25519 -C "you@example.com"
-
Add the SSH key to the ssh-agent:
eval "$(ssh-agent -s)" ssh-add ~/.ssh/id_ed25519
-
Copy the SSH key to your clipboard:
sudo apt install xclip xclip -selection clipboard < ~/.ssh/id_ed25519.pub
Finally, go to GitHub.com, navigate to Settings > SSH and GPG keys > New SSH key, and paste your key.
SSH Keys for Azure DevOps
If you are also using Azure DevOps, generating an SSH key compatible with it is pretty straightforward:
-
Generate a new RSA SSH key:
ssh-keygen -t rsa -b 4096 -C "your-email@example.com"
-
Add the key to the ssh-agent:
eval "$(ssh-agent -s)" ssh-add ~/.ssh/id_rsa_azure
-
Copy the key and add it to Azure DevOps:
cat ~/.ssh/id_rsa_azure.pub
After copying the key, go to Azure DevOps settings and add the new SSH key.
Installing Node.js Using NVM
We'll use Node Version Manager (NVM) to manage Node.js versions:
-
Install NVM:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
-
Refresh your Konsole:
source ~/.bashrc
-
Install the LTS version of Node.js:
nvm install --lts
That's it! You've now set up a full-fledged Node.js development environment on your Steam Deck. Whether you're working with GitHub, Azure DevOps, or any other platform, these steps should get you up and running.
Feel free to let me know if you have any questions or need further clarification on any of the steps. Happy coding!
Top comments (0)