Assuming your webcam is USB, you may check it has a working driver by running this from a terminal and look at what shows up when you plug the webcam in:
watch -n 1 'lsusb && ls /dev/video*'
A few seconds after plugging your camera in, if you see a /dev/videoX appearing, then you probably have a working driver for your webcam. If not, you may note the USB id (xxxx:yyyy) appearing when you plug the camera in and google for the driver this device needs.
If it works, say if /dev/video1 appears (/dev/video0 is the onboard camera on Jetson devkit), then you can try default resolution/format with:
gst-launch-1.0 v4l2src device=/dev/video1 ! videoconvert ! xvimagesink
It should show your camera capture in a X window.
If this doesn’t work, or if you want to use a different resolution, you may first check what resolutions/formats your camera provides through V4L interface:
#if not yet done, install package v4l-utils
sudo apt-get update
sudo apt-get install v4l-utils
# Query available formats for your webcam
v4l2-ctl -d /dev/video1 --list-formats-ext
Then you may try to use gstreamer and plugin v4l2src and try one of the available resolution/format.
gst-launch-1.0 v4l2src device=/dev/video1 ! 'video/x-raw, format=<your_cam_mode_format>, width=<your_cam_mode_width>, height=<your_cam_mode_height>, framerate=<your_cam_mode_framerate>' ! videoconvert ! xvimagesink
#For example if it shows 640x480@30fps in BGR format:
gst-launch-1.0 v4l2src device=/dev/video1 ! 'video/x-raw, format=BGR, width=640, height=480, framerate=30/1' ! videoconvert ! xvimagesink