There are two ways actually. USB and wifi. USB way requires adb and hence is more complicated. Wifi is much easier. Both ways for Linux and Windows explained here:
Android As Webcam
Android As Webcam
Upvote
0
We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.