Burning bootloader Atmega328

Using USBASP and avrdude

Go to the directory with the Arduino platform installed. In my case:
/opt/arduino/

Then:
cd hardware/arduino/avr/bootloaders/optiboot

With the USBASP programmer plugged in to the chip, run:
avrdude -p m328p -c usbasp -F -e -U flash:w:optiboot_atmega328.hex