check cpu type linux code example Example 1: check cpu temp linux watch -n 2 sensors Example 2: chcek number of cpus available on linux machine lscpu | egrep 'CPU\(s\)'