for ubuntu command check here: https://askubuntu.com/questions/992137/how-to-check-that-kpt...
Here is one of the commands recommended in that thread:
grep -q "cpu_insecure\|cpu_meltdown\|kaiser" /proc/cpuinfo && echo "patched :)" \ || echo "unpatched :("