Skip to content

Instantly share code, notes, and snippets.

@ijmorgado
ijmorgado / instructions.md
Created October 9, 2018 18:38 — forked from zentralwerkstatt/instructions.md
Unix cheat sheet

Commands

  • nmcli: Control network manager from command line (see man nmcli)
  • df -h: Show disk space for humans
  • scp file user@server:path/file: Transfer file over SSH
  • whereis command: Path to command
  • ssh user@server: Start SSH sessiom (exit with exit)
  • ls -lah dir: Show content of directory for humans, including hidden files
  • cd dir: Change directory
  • mkdir: Create directory
## The Problem
Standard practices say no non-root process gets to talk to the Internet on a port less than 1024. How, then, could I get Node talking on port 80 on EC2? (I wanted it to go as fast as possible and use the smallest possible share of my teeny tiny little micro-instance's resources, so proxying through nginx or Apache seemed suboptimal.)
## The temptingly easy but ultimately wrong solution:
Alter the port the script talks to from 8000 to 80:
}).listen(80);