I am trying to create a python script that runs on Linux, but in my script I want to check on which linux distribution it's running.
I found this code:
import platform
print(platform.linux_distribution())
but this returns: ('Ubuntu', '18.04', 'bionic') And all I need to check is if it's Ubuntu / centOS... (doesn't matter which version) How can I grep the first value and do a 'if' on it?