How to benchmark a CPU in Linux?

Ubuntu, Debian:

apt-get install sysbench

CentOS:

yum install sysbench

Then:

sysbench --test=cpu run

askubuntu.com/a/634516

How to fix «No package sysbench available» on CentOS?

The syntax has been changed in sysbench 1.1:

sysbench cpu run

How to benchmark filesystem in Linux?