How to install the C and C ++ compiler on Atom?


In previous article we share with you some methods to be able to install Atom in Linux through some simple installation commands, without having to resort to compiling the editor's source code on our system.

As we already discussed Atom is a great and highly customizable code editor, which with the use of plugins we can adjust it to our needs, in addition to being free and open source.

En this new article that is especially focused on new users the way to configure Atom to allow us to work with the C programming language in our system.

Due to the characteristics of the Atom editor, it tends to be light during its installation process and with the help of its add-on installer we can adjust Atom to our needs.

It is because of that Atom in Linux by default does not include the compiler for C and C ++.

If we want to work with any of these programming languages ​​in Atom we must add the compiler to the code editor.

How to configure C programming language in Atom?

For this we must open the program.

Being on the main Atom screen, on the welcome screen and at the bottom right of this, we can see that there is a button called "OpenInstaller”With which it will help us to add add-ons to the editor.

We click on the and now a new window will open where you will have the possibility to install various add-ons.

This makes the Atom so customizable that you start with few features and be able to add more according to your needs.

In this new window in the search packages section, we can see a box in which we are going to type gpp-compiler.


Y A list of accessories will appear that we can install, here immediately The gpp-compiler plugin will appear, which we can verify in its description that it is responsible for the compilation process of C / C ++ programs in the editor itself.

Already confirmed, we will simply have to click on the install button and have to wait for the download and installation of the add-on in Atom.

Done this as an optional step, we can restart the editor, We do this by just closing it and reopening it, this in order that the changes made in it have been made correctly.

Once Atom is open again, we will simply have to verify that it already has the support of the C and C ++ compiler.


To verify that the plugin was installed correctly in Atom we are going to perform a simple test in Atom.

Esto we do it by writing a few lines of code from the classic Hello world!

For that, let's open a new file in new file with the shortcut Ctrl + N. Next, we are going to save it with the name of hello.c in the user folder using the shortcut Ctrl + S.

Y in it we are going to write the following code:

#include <stdio.h>

int main()

{        printf("Hola mundo");

return 0;


Already done this we are going to give the instruction to compile and execute the code in AtomTo do this, they just have to press the F5 key and you will see that your program has been executed in the terminal window.

For the case of the C ++ programming language, we can perform the check with the following code:

#include <iostream>

using namespace std;

int main() {

cout << "Hola Mundo" << endl;

return 0;


And with that we already have Atom configured to be able to work with C and C ++.

It is also important to emphasize that when we install Atom, it is configured in English, so if we want to use it in the Spanish language we must make some adjustments to share in the previous article along with their installation methods for the different Linux distributions.

Without further ado, it's all on our side, if you know of any settings in Atom that are worth mentioning, don't hesitate to share them with us in the comments.

The content of the article adheres to our principles of editorial ethics. To report an error click here!.

2 comments, leave yours

Leave a Comment

Your email address will not be published. Required fields are marked with *



  1. Responsible for the data: AB Internet Networks 2008 SL
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   Abdenago said

    Hello, thank you very much for the information. I followed the steps and now I have a red error pop up that tells me:
    «The error was thrown from the gpp-compiler package. This issue has already been reported. »
    I'm not sure what options I have left to compile C on atom.

  2.   Jesus said

    Thank you very much for the tutorial, excellent IDE and article.