command to check working of gpu in linux

Shell
nvidia-smi

Source

Also in Shell: