Does Linux have a compiler installed by default?

I am trying to figure out compiling code as cc test.c -o test but it says cc command not found on CentOS 7. Why is that? Does Linux have a compiler (C and C++) installed by default? If not, why not?

1 Like

You should try this as root user:

yum -y install gcc

Another option:

sudo  yum group install "Development Tools"

See
https://www.cyberciti.biz/faq/centos-rhel-7-redhat-linux-install-gcc-compiler-development-tools/