I just started using ubuntu 16.04 and I want to make atom my default program when working with .cpp files but I don't know how to yet. For example when I click on a .cpp file in one of my folders I want it to open with atom instead of with gedit.
Open any directory with the file type .cpp in the file explorer, right click on the file and go to properties, there you will find a tab open with. In that tab choose the application you want to open that type of files and hit "Set as Default".