There are multiple ways to check the OS details in a Raspberry Pi. Here I am sharing a simple mechanism to check the OS details from the command line.
cat /etc/os-release
The above command will list the details of the OS running in the Raspberry Pi.