Tarek.
← All posts

Linux Command Line for Web Developers: Essential Commands

· 1 min read · Admin

SSH Essentials

bash
ssh user@server-ipssh -i ~/.ssh/my-key.pem user@server-ipscp -r ./dist user@server-ip:/var/www/appssh -L 5432:localhost:5432 user@database-server

File Manipulation

bash
find . -name "*.ts" -not -path "*/node_modules/*"grep -rn "TODO" --include="*.ts" src/du -sh /var/log/*df -h

Process Management

bash
ps aux | grep nodelsof -ti:3000 | xargs kill -9nohup npm start > app.log 2>&1 &top -o %MEM

Quick Reference

  • chmod +x script.sh — make executable

  • tar -czf archive.tar.gz dir/ — compress

  • systemctl status nginx — check service

  • journalctl -u app --since '1 hour ago' — logs