How to Install Node.js and VScode on Linux

 How to Install Node.js and Visual Studio Code on Linux Debian & Ubuntu



 Node.js, a powerful and open-source runtime environment for JavaScript, allows developers to use JavaScript for both front-end and back-end development. Known for its speed, extensibility, and vast ecosystem of libraries, Node.js is widely used in web applications and APIs.
However, if you’re running Debian 12, you’ll find that Node.js isn’t pre-installed. No worries! Follow the steps below to install it on your Debian 12 






Installing Node.js on Debian 12 and Ubantu

Node.js is a powerful JavaScript runtime that allows you to use JavaScript for both front-end and back-end development. To install it on Debian 12, follow these steps:


Update Your System: Before installing Node.js, make sure your system is up to date:

sudo apt update


Install Node.js and npm: Use the following command to install Node.js and npm:

sudo apt install nodejs npm -y


Verify Installation: Confirm that Node.js is installed correctly:

node -v


Start Building: You’re all set! Start building web applications and APIs with Node.js.


Managing Node.js on Debian 12: Tips and Tricks

Installing the LTS Version of Node.js


nvm install --lts


The “LTS” (Long Term Support) version of Node.js prioritizes stability for running applications. It receives regular security patches to ensure reliability. To install the LTS version, follow these steps:


Removing Node.js Installed via Default Repositories
If you’ve previously installed Node.js using the default repositories in Debian 12 and want to remove it, follow these steps:


Uninstall Node.js and npm: Run the following command to remove Node.js and npm:

sudo apt remove nodejs npm -y


Clean Up: Optionally, you can also remove any residual configuration files:


sudo apt purge nodejs npm -y


Verify Removal: Confirm that Node.js is no longer installed:

node -v



Installing Visual Studio Code 

on Linux Debian & Ubuntu


Installing via apt

sudo apt-get update


sudo apt-get install code # or code-insiders

👉 Official article link  👈

Comments

Popular Posts