On a Debian-based system, install the avrdude and arduino-core packages and then run:
$ avrdude -p atmega328p -c usbtiny -U lock:w:0x3f:m -U lfuse:w:0xff:m -U hfuse:w:0xde:m -U efuse:w:0xfd:m
$ avrdude -p atmega328p -c usbtiny -U flash:w:/usr/share/arduino/hardware/arduino/bootloaders/optiboot/optiboot_atmega328.hex -U lock:w:0x0f:m
Fuse settings are from the file /usr/share/arduino/hardware/arduino/boards.txt for the Uno:
uno.name=Arduino Uno
uno.upload.protocol=arduino