To format a device (such as a usb stick) from the command line, use the following command:
sudo mkfs.vfat /dev/sdXX
where sdXX is the device designation, listed via
it is critical to specify the device intended for formatting in order /not/ to lose wanted data.
additionally, one can run
sudo mkfs.ext3 /dev/sdXX
to label the device.