Okay, all one needs to do is "pair" the controller just like any other bluetooth device (these instructions relate to the "regular" variant of Ubuntu LTS - adjust them accordingly if you use a different variant of Ubuntu or a different Linux-based operating system)...
- Hold the and
Share buttons to put the controller into "pairing" mode (the Light Bar/LED should start to rapidly blink/flash), then pair the controller with the computer using the bluetooth settings (Show Applications → Settings → Bluetooth → Wireless Controller or bluetooth icon (at the top-right of the screen) → bluetooth icon (in sub-menu) → Bluetooth Settings → Wireless Controller).
Once the controller is "paired", you can turn it on by pressing (not holding!) the button - do this before opening Steam or a game, because sometimes they may not recognize the controller if you do this after opening Steam or a game.
Ubuntu LTS 18.04 and newer has pseudo-official support for the DUALSHOCK 4 (it correctly recognizes the DUALSHOCK 4 as a controller) and Valve Software's Steam has native/official support... Ubuntu LTS doesn't offer anything in the way of configuration for controllers, but Steam has a default setup available or you can configure the controller to your individual liking - to do this, go into "Big Picture Mode" and adjust the "Controller" settings.
A few points about what I have noticed however...
- Steam has surprisingly good support for the DUALSHOCK 4 and even many
older games seem to work well enough... Many games available outside
of Steam also seem to work well (such as those from GOG.com) - but it
varies from game-to-game, so you'll need to experiment yourself.
- If you're using "Big Picture Mode" and you have configured your
controller in Steam, it will show a green "controller" icon for games
which support the DUALSHOCK 4.
- Steam will work its magic to get the DUALSHOCK 4 working as
expected in most games (e.g. for
"select"/"accept"/"enter" and for
"cancel"/"decline"/"back"), however some games will still show
Microsoft Xbox series icons, which may lead to some minor confusion.
- Some games (including numerous older games) support force-feedback
(vibration), though this varies and you may need to enable this
functionality within the game itself.
- Support for the "fancy" functionality of the DUALSHOCK 4 - such as
accelerometer control and the touchpad - may not work in part or at
all... I found a couple of games in Steam that supported the
accelerometer (older games, too!), but support seems to be pretty
mixed from game-to-game.
- There is no way to tell how much battery is remaining on the
DUALSHOCK 4... You will just need to wait until it runs flat (not
recommended, as this is not the best way to care for Lithium
batteries) or make an educated guess and put it on-charge every
- You will need to manually turn the controller off when you're
finished with it, by holding the button until it
switches off (you should see the Light Bar/LED turn off).
Updated content of answer to reflect experience using Ubuntu LTS 18.04 ("Bionic Beaver") and the most recent version of Steam as at September 8th, 2018.