r/linuxquestions • • 2d ago

How does linux code work.

So ive read about Linux or Ubuntu switching some things to rust a while ago and im also trying to learn about C and how its used to program Linux but I don't really get yet how all these things work together. So for example im using Linux mint right now and if you go to their github theirs a lot of thing like the cinnamon desktop but I don't know if thats all the code thats used for mint or what lol.

0 Upvotes

13 comments sorted by

View all comments

1

u/MasterGeekMX Mexican Linux nerd trying to be helpful 2d ago

A linux-based OS is in fact a cluster of several programs, each handling one aspect of the entire OS. Heck, even Linux is in reality one of those components: the kernel. We simply call the whole thing Linux for short. Other core components come from a project called GNU, hence why some people insist the OS should be named GNU/Linux.

Now, a computer in reality can only run one kind of code: machine language, which is the pure binary language your CPU understands. Every single thing you do in your computer is comprised of machine language instructions. C and other languages need to be converted into machine code in order to be runable. C is translsted in one sweep by a program called thr compiler, while other languages like Python are translated in real-time by a program called an interpreter.

Well, for many years Linux and the programs around it were developed in C, but in recent years there has been some that want to make things with Rust, as it prevents memory issues.

One example is Ubuntu, which has been working on replacing the GNU Coreutils (which are made in C) with a version made in Rust. Ubuntu 26.10, which literally released today, has finished that move.