- Jul 2, 2025
- 4
- 0
- 1
- Pronouns
- He/Him
- Shell
- Bash
- Editor
- Vim
- Desktop
- XFCE
I will try to outline grossly how working with the C/C++ programming languages works out normally. It's a good place for newcomers as those languages a pretty simple to learn and start grasping a workflow.
I won't cover the history and more complex concepts, since it's very well documented on the WWW. I will also focus on C for brevity, but C and C++ are quite similar on the practical point of view.
As I see it, there's 2 way to setup an environment for programming... it's either in a terminal, or it's in an IDE (Integrated Development Environment). Most IDEs are straightforward and beasts of their own league, so I will only cover the terminal approach.
Your first clue is here: find the terminal provided by your distro, or install one using the package manager, it can be gnome-terminal, xfce4-terminal, lxterminal, urxvt, xterm, kitty, etc.
The second clue is: prepare a workspace somewhere in the storage filesystem, preferrably in your $HOME folder. Personally, here I create directories for projects in "/home/esselfe/code/".
Then you have to know that C is written in plain text files and a project can be split into multiple ".c" files and ".h" headers. So if you want to program in C, you will need a text editor, like nano, vim, gedit, kate, etc.
The main idea is to write code, compile it with a compiler like gcc or clang, and have it produce an executable binary program. The code and compilation operations can also be used to produce shared libraries, which programs can use after being linked with them.
Here's the classical Hello World program written in C:
Then in a terminal after changing directory to the project's location, you can run:
Now you have a good idea, it's as simple as that!
I won't cover the history and more complex concepts, since it's very well documented on the WWW. I will also focus on C for brevity, but C and C++ are quite similar on the practical point of view.
As I see it, there's 2 way to setup an environment for programming... it's either in a terminal, or it's in an IDE (Integrated Development Environment). Most IDEs are straightforward and beasts of their own league, so I will only cover the terminal approach.
Your first clue is here: find the terminal provided by your distro, or install one using the package manager, it can be gnome-terminal, xfce4-terminal, lxterminal, urxvt, xterm, kitty, etc.
The second clue is: prepare a workspace somewhere in the storage filesystem, preferrably in your $HOME folder. Personally, here I create directories for projects in "/home/esselfe/code/".
Then you have to know that C is written in plain text files and a project can be split into multiple ".c" files and ".h" headers. So if you want to program in C, you will need a text editor, like nano, vim, gedit, kate, etc.
The main idea is to write code, compile it with a compiler like gcc or clang, and have it produce an executable binary program. The code and compilation operations can also be used to produce shared libraries, which programs can use after being linked with them.
Here's the classical Hello World program written in C:
C:
#include <stdio.h>
int main(int argc, char **argv) {
printf("Hello World!\n");
return 0;
}
Then in a terminal after changing directory to the project's location, you can run:
Bash:
gcc hello.c -o hello
ls -l hello
./hello
Now you have a good idea, it's as simple as that!