Recommended steps to figure this out:step 1At the top of the Installation and Troubleshooting forum are sticky posts. Have a look at the Loopback Test Instructions. Test the USB-to-serial part of the Nano with that test. If test fails, meaning you don't see the characters coming back to the serial monitor, or if you can't connect at all, the USB-to-serial chip or connector is probably bad. step 2Uploading a sketch such as blink to the ATmega328P using ISP programming. Probably easiest way is to program it with another Arduino using the ArduinoISP sketch. After ISP programmer is hooked up, open the blink sketch, choose the programmer type in the Tools, Programmer menu (like Arudino as ISP if you are using another Arduino with the ArduinoISP sketch loaded), In the Tools, Board menu choose Nano, and in the Tools, Port menu choose the port of the ISP programmer. In the Sketch menu choose Upload Using Programmer. If you can upload a sketch to the bad Nano that way, it confirms the processor still works. step 3aIf the USB-to-serial chip is bad but processor is good, decide what to do with the Nano. You can just upload to it via ISP from now on, or burn the bootloader on it and use it like a Pro Mini from now on, uploading to it with an FTDI or similar USB-to-serial adapter. To use it as a Pro Mini, I would remove the DTR to RST capacitor from the bottom of the board to disconnect the reset line from the FTDI or CH340G chip. Then when you connect the external FTDI adapter, connect the DTR or GRN pin of the adapter to a 0.1uF cap, and the other pin of the cap to RST on the Nano. step 3bIf the USB-to-serial chip is good and processor is good, use ISP programming to burn a fresh bootloader on the Nano. Then it should work like normal again.
What do I need to install to use avrdude and program Arduinos from my Mac using terminal and not the Sketch IDE?