#!/bin/bash # Exit immediately if any command fails set -e # Update and install essential packages echo "Updating packages..." apt-get update -y # Install required packages echo "Installing required packages..." DEBIAN_FRONTEND=noninteractive apt-get install -y curl gnupg # Install Node.js (version 20.x) echo "Installing Node.js..." curl -fsSL https://deb.nodesource.com/setup_20.x | bash - apt-get install -y nodejs # (Optional) Add other specific installations here # Example: apt-get install -y python3-pip git # Clean up unnecessary files to reduce space echo "Cleaning up..." rm -rf /var/lib/apt/lists/* apt-get clean echo "Setup completed successfully!"