انتقل إلى المحتوى
أمين أبوزيد
JNR-048

أساسيات Linux

  • 7 درس
  • 3 ساعة تدريب (تقدير)
في هذه الصفحة 8 موضوعات

نص الدروس والتمارين باللغة الإنجليزية، بينما تبقى واجهة الموقع وعناوين الدروس بالعربية.

نظرة عامة

الموضوعات

  • العمليات (Processes)
  • الصلاحيات
  • SSH
  • المنافذ (Ports)
  • السجلات
  • إدارة الخدمات

تعلّم أولًا

3 ساعة تدريب (تقدير)

مخرجات التعلم

  1. Inspect processes, memory, and disk (ps, top, free, df), and stop a process.
  2. Read and change file permissions and ownership.
  3. Connect to a server over SSH with key-based authentication.
  4. Find which process listens on a port (ss, lsof).
  5. Read service logs with journalctl and tail -f, and manage a service with systemctl.

الدروس

  1. 01Linux لمهندسي الواجهة الخلفية
  2. 02العمليات والموارد
  3. 03المستخدمون والصلاحيات والملكية
  4. 04SSH والمفاتيح
  5. 05المنافذ وأدوات الشبكة
  6. 06السجلات والخدمات
  7. 07عرض عملي: تشغيل Shop كخدمة systemd

المختبر والتمارين

Lab

JNR-048-LAB1 · Run Shop on Linux

Outcomes: 1–5 · Time: ~3 h On a Linux VM or WSL, run the Shop JAR as a systemd service under a dedicated user, read its logs, and find its port. Acceptance: service restarts automatically after a kill.

Exercises (assessment: timed troubleshooting tasks on a Linux box)

IDOutcomeTask
JNR-048-EX011Find the PID and memory use of a Java process, then stop it gracefully.
JNR-048-EX021Report free memory and the three largest directories under /var.
JNR-048-EX032Given -rwxr-xr-- alice dev script.sh, state who can do what, then make it private to alice.
JNR-048-EX043Create an ed25519 key pair, install the public key on a VM, and log in without a password.
JNR-048-EX054Start two apps on port 8080; find which process holds it.
JNR-048-EX065Show the last 50 log lines of a service from the past 10 minutes and follow new ones.
JNR-048-EX075Make a service start at boot and restart after failure.
أظهر الحلول
  • EX01 ps aux | grep java (or pgrep -a java); kill <pid>; kill -9 only if it ignores SIGTERM.
  • EX02 free -h; du -sh /var/* | sort -h | tail -3.
  • EX03 Owner reads, writes, executes; group dev reads and executes; others only read. chmod 700 script.sh.
  • EX04 ssh-keygen -t ed25519, ssh-copy-id user@host, ssh user@host.
  • EX05 ss -tlnp | grep 8080 or lsof -i :8080; stop one app or change its port.
  • EX06 journalctl -u shop --since "10 min ago" -n 50 then journalctl -u shop -f.
  • EX07 sudo systemctl enable shop and Restart=on-failure in the unit file (then daemon-reload).
  • Outcome 2 (permissions) is also covered by quiz Q04–Q05 and the lab (non-root service user).

الاختبار

Outcomes: O1 processes and resources · O2 permissions · O3 SSH · O4 ports · O5 logs and services.

اختبار ذاتي لك: لا توجد درجات، ولا يُحفظ أو يُرسل أي شيء. اختر إجابة ثم تحقق منها، ويمكنك المحاولة مرة أخرى كما تشاء.

  1. 1Which command shows free disk space?O1
  2. 2kill 4242 sends:O1
  3. 3Which shows live CPU and memory use per process?O1
  4. 4chmod 640 app.env gives others:O2
  5. 5Best practice for a service account:O2
  6. 6Which file goes on the server for key login?O3
  7. 7Which command creates a key pair?O3
  8. 8Find the process on port 8080:O4
  9. 9Follow a systemd service's logs:O5
  10. 10Which unit-file setting restarts a service after a crash?O5

الجزء العملي

Seven exercises JNR-048-EX01 to EX07 plus the lab; the assessment is a set of timed troubleshooting tasks on a Linux box. Pass: quiz 8/10, at least five exercises correct, and the service restarting after a kill.

أخطاء شائعة

chmod 777; running services as root; password SSH logins.

التقييم

Timed troubleshooting tasks on a Linux box.

الصلة بالمسار الوظيفي

Containers and production servers are Linux.

اكتب للبحث في المستويات والمراحل والوحدات والدروس.