how to connect ps4 controller to ubuntu?
Plug in your PS4 controller into the USB port on your PC. Alternatively, hold down the Share + PS button to enter it into Bluetooth mode. From there, follow this guide to learn how to pair it to your computer wirelessly. Once you've got your PS4 controller paired to your Linux PC, return to the terminal and run ds4drv.