Hello there,
In Ubuntu you have to create a rules file called 51-android.rules.
If you have tried many terminal commands to connect your physical device to android studio in ubuntu and you failed to connect try this :- Connect your device and change your USB preference(device notification) to PTP,android studio will detect your device.
Hope this resolves your Query !!
--If the reply is helpful, please Upvote and Accept it as an answer--