Programming Arduino without IDE

Is there ways to program Arduino without using IDE ?
I have Arduino Nano conected to Raspi with USB. Raspi is running Minibian without keyboard nor screen. The system is in the net in a place you can not go easily. It is hard work to reasch the device if you want to change anything With IDE.

You could use avrdude directly if your sketch is pre-built elsewhere perhaps?

Or VNC into the RPi?

From IDE version 1.5.? it is possible to call the compile and upload functions from the command line. I tried to illustrate a use for it in this Thread


As discussed in this thread it is possible to set up a Makefile to do a compile.

Thank you all.
I'm making the editing and compilation in my Linux laptop. I have there another Arduino to test the program.
When the program 'sketch' is OK, I'll SCP it to Raspberry over the net and install it to Arduino somewhere there.
So far I have not checked the files, what format the compiled file is.