Almost all the Linux machine is comes with gcc package installed.
Either you are using Fedor, Ubuntu, CentOs, Mint, etc.
So basically you don't have to do anything apart from checking is your machine has gcc package or not.
If not then install it using below command.
yum install gcc
apt-get install gcc
Remember you have to use the above as supper user.
After installing cerate a .c file write your code.
compile it with gcc filename.c
For more option of gcc try to see the manual page of gcc using "man gcc"