Building a Custom Terminal from Scratch: Devlog #1

Discover how I built a custom terminal from scratch in C++, then switched to C for low-level control. Devlog #1: char pointers, memory management, and design

miércoles, 29 de julio de 2026 • 3 min read • Q2BSTUDIO Team

Desarrollo de terminal de bajo nivel: de C++ a C

In the world of software development, few experiences teach as much as building something from scratch, without relying on modern libraries or shortcuts. This is the spirit behind my latest project: a Bash-like terminal, but designed entirely by hand, using C++ first and then migrating to C to gain absolute control over memory and execution. This devlog is the first in a series where I will share the technical decisions, challenges, and lessons learned. And, as with any ambitious project, this journey led me to reflect on how technology companies, such as Q2BSTUDIO, apply similar principles when developing custom software that requires performance, security, and scalability.

From the start, my goal was to move away from the comforts of C++ and dive into the world of character pointers, manual memory management, and low-level system calls. Why do it so drastically? Because I wanted to understand how a computer really works, not just how to use an API. This is something we also value at Q2BSTUDIO when working on cybersecurity or cloud AWS/Azure projects, where every byte counts and data integrity is critical.

The first big challenge was processing user input. Instead of using std::string, I opted for manually managed character arrays. This meant dynamically allocating memory, watching for boundary overflows, and freeing resources to avoid leaks. To organize the chaos, I created a carr (char array) structure with functions to initialize, expand, and delete. In C++ I could overload operators, but when migrating to C all of that disappeared. I had to rewrite every string manipulation, which forced me to deeply understand how data moves on the stack and heap.

This experience reminded me of enterprise projects where, to optimize the performance of a custom application, it is sometimes necessary to leave frameworks behind and work directly with hardware or operating system layers. At Q2BSTUDIO we apply that philosophy when integrating AI agents into memory‑constrained environments, or when setting up cloud infrastructures that must scale without losing efficiency.

Another interesting aspect was customizing the commands. Instead of exactly replicating Bash, I invented names like 'here' to show the current directory and 'go' to navigate. This not only gave identity to the project, but also taught me to design interfaces thinking about the user experience from scratch. Very similar to what we do at Q2BSTUDIO when developing Business Intelligence solutions with Power BI: we adapt reports and dashboards to specific client needs, not the other way around.

The migration from C++ to C was undoubtedly the turning point. At first glance, it seemed simple because I had already written the code in a very C‑like style. But the absence of operator overloading and member functions forced me to redesign every interaction with data. I learned to use function pointers to simulate polymorphism, and to manage memory with malloc and free in every corner of the program. That discipline is the same needed when auditing a system for vulnerabilities, a service we offer in the cybersecurity area.

In the end, the project gave me total control over every variable, every memory address, and every CPU cycle. That sense of mastery is what we aim to convey to our clients at Q2BSTUDIO: that their software not only works, but is optimized, secure, and future‑ready. Whether implementing an AI agent to automate processes, or deploying an architecture on AWS cloud, low‑level fundamentals make the difference.

If you are interested in exploring the source code, you can visit my GitHub repository: github.com/SuleymanSade/MyTerminal. And if you want to know how we apply these techniques in enterprise projects, feel free to contact Q2BSTUDIO to discuss cybersecurity, AI or cloud. This devlog is just the beginning; in upcoming posts I will dive into command parsing, process management, and much more.

A BREAK?

Play for a moment before you go

OUR SERVICES

How we can help you

Do you have a project in mind?

Tell us your vision and we'll turn it into a software solution. Whatever the scope, we make your idea real.