This guide will help you set up a basic development environment on Ubuntu with the following tools:
Start by updating and upgrading your Ubuntu packages to make sure you have the latest versions and security patches.
sudo apt update && sudo apt upgrade -y
This will: Update the local package index (apt update) Upgrade all the installed packages to the latest version (apt upgrade)
Next, we'll install nvm (Node Version Manager) to manage multiple versions of Node.js.
Install NVM
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
Once the installation is complete, you’ll need to restart your terminal or source your profile:
source ~/.bashrc # Or use ~/.zshrc or ~/.profile based on your shell
Verify the Installation You can verify that nvm is installed successfully by running:
command -v nvm
If the installation was successful, it should return nvm.
Now that nvm is installed, you can use it to install Node.js version 20:
nvm install 20
To set Node.js version 20 as the default version for your terminal sessions, run:
nvm use 20
nvm alias default 20
You can verify the installed version of Node.js by running:
node -v
Git is essential for version control. To install Git, run the following:
sudo apt install git -y
To check if Git is installed correctly, run:
git --version
Install NGINX
sudo apt install nginx -y
sudo systemctl start nginx
sudo systemctl enable nginx