The simplest way to upload a compiled .hex file without the IDE

  1. Plug in your Arduino
  2. Select your Arduino board from the Arduino IDE Tools > Board menu
  3. Select your Arduino board's port from the Tools > Port menu
  4. Select File > Preferences from the Arduino IDE menus.
  5. Check the box next to "Show verbose output during: [] upload".
  6. Click the OK button.
  7. Select Sketch > Upload from the Arduino IDE menus.
  8. Wait for the upload to finish.
  9. Scroll up in the black output panel at the bottom of the Arduino IDE window until you see the avrdude command.
    On Windows with Uno selected it looks something like:
    C:\Program Files (x86)\arduino-1.6.10\hardware\tools\avr/bin/avrdude -CC:\Program Files (x86)\arduino-1.6.10\hardware\tools\avr/etc/avrdude.conf -v -patmega328p -carduino -PCOM21 -b115200 -D -Uflash:w:C:\Users\per\AppData\Local\Temp\builda0905d717cd3fb20c5f6c59067701315.tmp/serial.ino.hex:i
    
  10. Select and copy the avrdude command.
  11. Paste the avrdude command to the command line.
  12. Change the file name to the .hex file you want to upload.
    In my case I also had to add quotes around the paths that had spaces in them.
  13. Press Enter

You can use the same system to generate the correct commands for burning a bootloader or to upload using a programmer.