dd if=ubuntu-18.04.2-desktop-amd64.iso of=/dev/sdg
If you wish to see the output/progress of the dd command, use status=progress or a pipe to the 'pv' utility, like this:
dd if=ubuntu-18.04.2-desktop-amd64.iso of=/dev/sdg status=progress
dd if=ubuntu-18.04.2-desktop-amd64.iso | pv | dd of=/dev/sdg
Notes: