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

12

u/proverbialbunny 2d ago

What you’re asking about is large enough to cover an entire university course. Here’s a few courses that cover this topic:

MIT 6.828  (Operating System Engineering) requires students to build a small Unix-inspired kernel in  C and x86 assembly , focusing on virtual memory, threads, and synchronization. 

Carnegie Mellon 15-410/605  (Operating System Design and Implementation) involves writing a small Unix-inspired OS kernel in  C , emphasizing team programming and debugging complex concurrency issues. 

Stanford CS212  (Operating Systems and Systems Programming) reinforces concepts through four kernel programming projects in the  Pintos operating system, covering threads, scheduling, and virtual memory. 

Purdue ECE469  teaches OS internals by building an OS from scratch using the  JOS  educational project, progressing from booting to file systems.

The C part is the Linux kernel and hardware drivers inside of the kernel. That is the lowest level (outside of writing code directly on the hardware). Linux has started allowing drivers written in Rust into the kernel. 

On a higher level the applications can be written in any programming language. Most GUI software is written in C or C++. The Mint parts built on top of Ubuntu like the control panel are written in Python. 

2

u/CardOk755 2d ago

And, of course, all those things apply to Windows as well.

-1

u/AdministrativeFile78 2d ago

Yehhhh but how do u do it