Lesson 1 / الدرس 1

What an operating system actually does / ما الذي يفعله نظام التشغيل فعلًا

Before any command makes sense, it helps to know what is on the other side of it. An operating system is a program whose whole job is sharing one machine between everything that wants it.

قبل أن يصير أي أمر مفهومًا، يفيد أن تعرف ما الذي على الطرف الآخر منه. فنظام التشغيل برنامج كل عمله تقاسم جهاز واحد بين كل ما يريده.

A computer has one set of hardware and many programs that all want it at once. Your browser wants memory, your editor wants the disk, a download wants the network. Something has to hand these out, keep the programs from treading on each other, and take it all back when they finish. That something is the operating system.

Four things it manages

It managesWhich meansYou will meet it in
ProcessesEvery running program, and whose turn it isLesson 19
FilesOne tree of names over several disksLessons 4 to 11
UsersWho may read, write and run whatLesson 10
DevicesKeyboard, screen, disk, networkLessons 13 and 14

This course is a tour of that list from the outside. Every command you learn is a way of asking the operating system to do one of these four things.

At the centre is the kernel — the part that actually touches the hardware. No ordinary program is allowed to. When your editor saves a file, it does not write to the disk; it asks the kernel to, and the kernel decides whether it may. That refusal is where "permission denied" comes from, and lesson 10 is about it.

Everything is a file

/home/ahmed/notes.txt     an ordinary file
/dev/disk0               a whole disk, addressed like a file
/dev/null                a file that discards whatever you write to it
/proc/cpuinfo            not on disk at all — the kernel answering a question
This is the idea that makes the rest of the system small. Devices, disks and even live information about the machine are presented as paths, so the same handful of commands works on all of them. Run the demonstration to see the shape of the tree these names live in.

Notice there are no drive letters. On macOS and Linux there is exactly one tree, starting at /, and additional disks are attached at some point inside it rather than given a letter of their own. A path therefore always begins from the same place, whatever hardware is underneath.

Try it live / جرّب بنفسك

Preview / المعاينة

Check yourself / اختبر نفسك

1. Why can a program not write to the disk itself?

2. What does / mean?

3. What is meant by "everything is a file"?

Your task / مهمتك

Write a page explaining, to someone who has only ever used a mouse, what the operating system is doing while they work. Cover the four things it manages with one everyday example each — something they have actually seen — and finish by explaining the two meanings of "root" clearly enough that they would not confuse them.

اكتب صفحة تشرح لمن لم يستخدم إلا الفأرة ما الذي يفعله نظام التشغيل وهو يعمل. غطِّ الأشياء الأربعة التي يديرها بمثال يومي واحد لكل واحد — شيء رآه فعلًا — واختم بشرح معنيي "root" بوضوح يكفي ألا يخلط بينهما.

  • All four responsibilities, each with an everyday example المسؤوليات الأربع كلها، لكل واحدة مثال يومي
  • The kernel appears, and why a program must ask it النواة موجودة، ولماذا على البرنامج أن يسألها
  • The two meanings of "root", told apart معنيا "root" مفرَّقان
How do you want to submit? / كيف تريد التسليم؟