الفلاتر
طريقة البحث
  • الكلمات العادية تجد الأسماء والنصوص والأمثلة.
  • "كلمتان" تجد العبارة بالضبط.
  • --name أو -x تجد خيارًا.
  • #كلمة تبحث داخل الأوامر فقط.
  • @grep تجد الدروس والمعامل التي تستخدم grep.
  • الفلاتر: cat:network · in:labs · level:rhcsa · ch:8 · root:yes. ضع ! قبل كلمة لاستبعادها. OR بين الكلمات تعني إحداها.
  • ↑ ↓ للتنقل · Enter للفتح · Esc للإغلاق · / للبحث

الفصل 20الاسم في الدورة: Comprehensive Review

Review everything you learned

Use this chapter to check yourself. For every task, first say the steps and the commands out loud, then look at the short answer. A task you can not answer shows the lesson to read again. At the end, do the review lab on a fresh machine without looking at the summaries.

  • 5 الدروس
  • 34 الأوامر
  • 1 المعامل

هذا الجزء لم يُترجم بعد. أنت ترى النص الإنجليزي.

$ مستخدم عادي# بصلاحية root (أو مع sudo)

20.1

Shell, help and files

Questions about the command line, the documentation and file work.

TaskShort answer
Find the admin command that changes a user, when you only know the word "user"man -k user | grep '(8)' — lesson
Read the file format of /etc/passwd, not the commandman 5 passwd — lesson
Run the last command again as rootsudo !! — lesson
Make the folders docs, src and tests inside project in one commandmkdir -p project/{docs,src,tests} — lesson
Copy /etc/ssh with owners, rights and SELinux labelscp -a /etc/ssh /root/ssh-backup — lesson
Make weblogs in your home folder point to /var/log/httpdln -s /var/log/httpd ~/weblogs — lesson
Find files bigger than 100 MiB in /varfind /var -type f -size +100M — lesson
Replace every foo by bar in a file in vim:%s/foo/bar/g — lesson
Save the output and the errors of a script in a log, adding to the endscript.sh >> run.log 2>&1 — lesson
Show a command's output on the screen and save it in a filecmd | tee file.txt — lesson

20.2

Users, groups and rights

Accounts, sudo, permissions and shared folders.

TaskShort answer
Create user omar with the extra group wheeluseradd -G wheel omar, then passwd omar — lesson
Add anna to webteam without removing her other groupsusermod -aG webteam anna — lesson
The group webteam may only restart httpd with sudoFile in /etc/sudoers.d/ with visudo -f: %webteam ALL=(root) /usr/bin/systemctl restart httpd — lesson
anna must change her password every 90 dayschage -M 90 anna — lesson
Force a new password at the next loginchage -d 0 omar — lesson
A script may be run by its owner and group onlychmod 750 script.sh — lesson
New files in /srv/sales must get the group sales, nobody may delete files of otherschgrp sales /srv/sales; chmod 3770 /srv/sales — lesson
New files of a user must be 640umask 027 in ~/.bashrc — lesson

20.3

Software, media, processes and services

Packages, removable media and the running system.

TaskShort answer
Register a server with an activation keyrhc connect --organization ID --activation-key KEY — lesson
Find which package gives the command digdnf provides '*/bin/dig' — lesson
Undo the last DNF installdnf history, then dnf history undo ID — lesson
Which package owns /etc/ssh/sshd_config?rpm -qf /etc/ssh/sshd_config — lesson
Install a desktop app only for yourselfflatpak install --user REMOTE APP-ID — lesson
Read an ISO filemount -o loop,ro FILE.iso /mnt/iso — lesson
umount says "target is busy"lsof /mnt/usb or fuser -vm /mnt/usb, close it, try again — lesson
Show the 5 processes that use the most CPUps aux --sort=-%cpu | head -6 — lesson
A process ignores kill PIDkill -9 PID (SIGKILL) — lesson
httpd must run now and after every rebootsystemctl enable --now httpd — lesson
A service must never start, also not by another unitsystemctl mask --now SERVICE — lesson
Find why a service failedsystemctl status SERVICE, journalctl -u SERVICE -n 50 — lesson

20.4

Network and SSH

Addresses, names and remote access.

TaskShort answer
Show all cards and addresses in shortip -br a — lesson
Which program listens on port 80?ss -tlpn | grep ':80 ' — lesson
Give enp1s0 the fixed address 192.168.122.10/24, gateway and DNS .1nmcli con mod enp1s0 ipv4.method manual ipv4.addresses 192.168.122.10/24 ipv4.gateway 192.168.122.1 ipv4.dns 192.168.122.1, nmcli con up enp1s0 — lesson
Add a second address and keep the firstnmcli con mod enp1s0 +ipv4.addresses ADDR/PREFIX — lesson
Set the host name to server1.example.comhostnamectl hostname server1.example.com — lesson
server2 must be found by name without DNSLine in /etc/hosts: 192.168.122.20 server2.example.com server2 — lesson
Log in to server2 without a passwordssh-keygen -t ed25519, ssh-copy-id student@server2 — lesson
root must not log in over SSHPermitRootLogin no in /etc/ssh/sshd_config.d/50-hardening.conf, sshd -t, systemctl reload sshd — lesson

20.5

Plan your next step

RH124 is the base. The next course, RH134, adds automation, storage, SELinux, boot repair, containers and image mode. Together they cover the RHCSA exam.

If you want to …Go to
Go on with the second courseRH134: Write shell scripts
Check yourself against the RHCSA exam objectivesThe RHCSA summary
Practise every topic with a task and a solutionAll labs
Look up any command with all its optionsCommands

في العمل

Repeat the review lab after a week, on a new machine, against the clock. Speed comes from doing the tasks again and again — not from reading.

تدرّب

كل الأوامر في هذا الفصل