Practice & Assessment
Test your understanding of Installing and Managing Development Tools
Multiple Choice Questions
5Why is using nvm to install Node.js preferred over sudo apt install nodejs in WSL2?
A developer wants to use Python 3.11 in one project and Python 3.12 in another. Which pyenv workflow achieves this per-project isolation?
After running sudo usermod -aG docker $USER inside WSL2, the docker command still requires sudo. What is the missing step?
What is the difference between apt remove and apt purge?
What command verifies that an SSH key has been correctly added to GitHub?
Coding Challenges
1Dev Tools Verification Script
Write a Bash script called verify-tools.sh that checks whether the following tools are installed: node, npm, python3, git, docker. For each tool, if the command exists (use command -v), print a checkmark with the tool name and version. If it does not exist, print a cross with not found. At the end, print a summary line showing how many tools passed out of the total checked. Input: none (reads live system state). Output: formatted per-tool status lines and a summary. Time estimate: 15-20 minutes.
Mini Project
Containerized Node.js Development Environment
Set up a working containerized Node.js project from scratch inside WSL2. Steps: (1) use nvm to install Node 20 LTS, (2) create ~/projects/hello-api, initialize with npm init -y, and write a minimal Express server in src/index.js that responds to GET / with JSON containing message and version, (3) write a Dockerfile using node:20-alpine with COPY, npm ci, and CMD, (4) write a compose.yaml that builds the image, maps port 3000:3000, and mounts the src/ directory as a volume for live reload, (5) write a README.md documenting how to run the project. Verify with docker compose up and curl localhost:3000. The project uses nvm, npm, Git, Docker, and Docker Compose.
