
7 Terminal Commands Every Developer Should Know (But Most Don't)
Most developers use the terminal every day but only scratch the surface. Here are 7 commands that saved me hours of work — and you probably aren't using them. 1. !! — Repeat Last Command Forgot sudo ? Don't retype the whole thing: apt install nginx # Permission denied sudo !! # Runs: sudo apt install nginx This alone saves me minutes every day. 2. ctrl + r — Reverse Search History Stop scrolling through your history with the up arrow. Press ctrl + r and start typing. It fuzzy-matches your command history. # Press ctrl+r, type 'docker' # Finds: docker compose up -d --build Press ctrl+r again to cycle through matches. 3. xargs — Turn Output Into Arguments Find all .log files and delete them: find . -name '*.log' | xargs rm Kill all processes matching a name: ps aux | grep node | awk '{print $2}' | xargs kill 4. watch — Run a Command Repeatedly Monitor a directory for changes every 2 seconds: watch -n 2 ls -la /tmp/builds/ Watch your API respond in real-time: watch -n 1 'curl -s localhost
Continue reading on Dev.to Beginners
Opens in a new tab




