I came here looking for the same command and the one from @llogan works, but with no audio. This is the command I started to use to capture with video in good quality and with audio.
ffmpeg -f v4l2 \
-framerate 30 \
-video_size 1024x768 \
-input_format mjpeg \
-i /dev/video0 \
-f alsa \
-i hw:2,0 \
-c:a pcm_s16le \
-c:v mjpeg \
-b:v 64000k \
output.avi \
-map 0:v \
-vf "format=yuv420p" \
-f xv display
Maybe you want to see video as a mirror. If so, you have to add hflip to the video filter. Use -vf "format=yuv420p,hflip".
I prefer to use pulseaudio as audio input, so I can change it with pavucontrol on the fly. Instead of -f alsa -i hw:2,0, I use -f pulse -i alsa_input.usb-046d_HD_Pro_Webcam_C920_22F75AFF-02.analog-stereo that it is my webcam microphone. To know what your audio source input is, check here.
Source: Answer from @llogan and ffmpeg Documentation.
[EDIT]: I changed part of the code to get rip of the 1 second lag that -f tee generates. This method, instead of that option, directly encodes to file, changes format to yuv420p (accepted by display) and uses -f xv display to display video to screen.