Lesson 23 / الدرس 23
Project: set up and document an environment / مشروع: جهّز بيئة عمل ووثّقها
The last lesson introduces nothing. Build the working environment you will actually use, then write the document that would let someone else — or you, on a new machine — rebuild it from nothing.
الدرس الأخير لا يقدّم جديدًا. ابنِ بيئة العمل التي ستستخدمها فعلًا، ثم اكتب المستند الذي يتيح لغيرك — أو لك على جهاز جديد — إعادة بنائها من الصفر.
Everything in this course was a piece of one thing: knowing where you are, moving files about, controlling what runs and where it comes from. This project puts the pieces together into a setup you keep, and a document that proves you understood it — because a setup nobody can reproduce is a setup you will lose with the machine.
What to build
-
A directory structure for your own work, made with
mkdir -p, that you can defend — say why it is shaped that way. Lessons 4 and 6.بنية مجلدات لعملك أنت، مصنوعة بـmkdir -p، تستطيع الدفاع عنها — قل لماذا شكلها هكذا. الدرسان 4 و6. -
A startup file with your exported variables, at least four aliases and one function, each earning its place. Lessons 16 and 18. ملف بدء فيه متغيّراتك المصدَّرة وأربع كُنى على الأقل ودالة واحدة، كل واحدة تستحق مكانها. الدرسان 16 و18.
-
A PATH you understand — write out what is on it, in order, and what each directory provides. Lesson 17. PATH تفهمه — اكتب ما عليه بالترتيب وما يوفره كل مجلد. الدرس 17.
-
The tools you need, installed with your package manager and listed with their versions. Lesson 20. الأدوات التي تحتاجها، مثبتة بمدير حزمك ومسرودة بنسخها. الدرس 20.
-
An SSH key pair, with the private one at permission
600and a note on where the public one has been sent. Lessons 10 and 21.زوج مفاتيح SSH، والخاص بصلاحية600وملاحظة عن أين أُرسل العام. الدرسان 10 و21. -
One pipeline of your own that answers a question you actually have about your machine. Lessons 9, 13 and 14. خط أنابيب من عندك يجيب سؤالًا لديك فعلًا عن جهازك. الدروس 9 و13 و14.
## Aliases
alias ll='ls -lah'
Why: I check permissions constantly, and -a shows the dotfiles that
matter on a server. Verified with: type ll
The section that makes it worth writing
End with the rebuild instructions: the ordered list of commands that would take a brand new machine to the state yours is in. This is the part that turns notes into something useful, and it is also the honest test of the rest — if you cannot write the steps, you do not yet know what you changed.
export، أو رمز في عنوان، أو العنوان الحقيقي لخادم لا تملكه. وهذا الفحص نفسه الذي طلبته دورة الويب، وهو أهم هنا — فسجل الأوامر وملف البدء هما بالضبط حيث تتراكم الأسرار دون أن يقرر أحد وضعها هناك. استبدل بكل ما هو خاص كلمة REDACTED.| You are finished when... | How to check |
|---|---|
| All six parts are there | Count them, plus the rebuild list |
| Every item says why, not only what | No entry is a bare command with no reason |
| Everything was verified, not assumed | Each has a command you ran to confirm it |
| The rebuild list is genuinely ordered | A reader could follow it top to bottom |
| Nothing private is in it | Search for "key", "token", "password" |
The fourth row is the one to take seriously. Read your rebuild list as though you had never seen this machine — anything you would have to guess at is a step you have not written yet.
Try it live / جرّب بنفسك
Check yourself / اختبر نفسك
1. Why does the document end with rebuild instructions?
Notes describe a state; instructions reproduce it. Writing them is what exposes the parts you did by copying something without understanding it.
2. Where do secrets most easily end up without anyone deciding to put them there?
A password typed on the command line is saved to history in plain text, and an export line in a startup file sits there for years. Both are worth searching before you share anything.
export في ملف بدء يجلس هناك سنين. وكلاهما يستحق البحث فيه قبل مشاركة أي شيء.3. What makes an entry in the document worth having?
A command with no reason is something you will delete in six months without knowing whether you needed it. The reason is the part with the value.
Score / النتيجة: 0 / 3
Your task / مهمتك
Build the environment and write the document. All six parts, each saying what it is, why it is there and how you verified it, then the ordered list of commands that would rebuild the whole thing on a new machine. Redact anything private before you hand it in.
ابنِ البيئة واكتب المستند. الأجزاء الستة كلها، كل واحد يقول ما هو ولماذا هو هناك وكيف تحققت منه، ثم القائمة المرتبة من الأوامر التي تعيد بناء كل شيء على جهاز جديد. واحذف كل ما هو خاص قبل التسليم.
- All six parts, each with what, why and how you verified it الأجزاء الستة، لكل واحد ما ولماذا وكيف تحققت
- A rebuild list a stranger could follow top to bottom قائمة إعادة بناء يستطيع غريب اتباعها من أولها لآخرها
- Every claim backed by a command you actually ran كل ادعاء مسنود بأمر نفّذته فعلًا
- Nothing private left in — search for key, token, password لم يبق شيء خاص — ابحث عن key وtoken وpassword