If you need to get the CPU frequency in Linux, you can run the following command:

watch -n.1 "grep \"^[c]pu MHz\" /proc/cpuinfo"

This uses watch to refresh every 0.1 seconds, giving you a real-time view of the CPU frequency for each core. The frequency changes constantly due to CPU frequency scaling (turbo boost, power saving, etc.), so watching it live is more useful than a single snapshot.

For a one-off check without the live refresh, you can just run:

grep "cpu MHz" /proc/cpuinfo

You can also use lscpu for a summary that includes the min, max, and current CPU frequency. If you need this data programmatically, reading /proc/cpuinfo or /sys/devices/system/cpu/cpu*/cpufreq/scaling_cur_freq is the way to go.