Setting up OpenGL in CodeBlocks on Ubuntu

Hey guys, since at school we do only C/C++ programming i wanted to get my hands on some more interesting language and i found an awesome course on OpenGL, my problem is that i can't get my program to run.
When I compile and run it i get these kind of errors:
"Undefined reference to glutInit"
I googled it and it delivered, but i can't seem to find a fix for Linux, everything was about windows and Visual Studio, any idea what I should do?
I downloaded all the libraries needed and all the files needed for OpenGL to work but i have no idea.

Here is the code i'm trying to run:

    #include "GL/freeglut.h"
#include "GL/gl.h"

int main (int argc, char **argv)
    glutInit (&argc, argv);
    glutInitDisplayMode(GLUT_DEPTH | GLUT_DOUBLE | GLUT_RGBA);
    glutInitWindowPosition(500, 500); //optional
    glutInitWindowSize(1280, 720);//optional
    glutCreateWindow("OpenGL First Window");


    return 0;

Thanks a lot for the support, awesome as always

A newbie

P.S. i have no idea if there is someway to spoiler it, if it is tell me and i'll modify :)

#include <GL/gl.h>
#include <GL/glut.h>

Should work. You obviously still have to link to libGL and libglut.

Damn, i'm an idiot. Thanks!