check php versions on ubuntu code example Example 1: check the php version in ubuntu php --version Example 2: check php version linux terminal /* in terminal type it*/ php -v