CertNote/ Commute Study Notes
Roadmap
KOEN
CLF-C02 · FoundationalCloud Practitioner - Foundational
DVA-C02 · AssociateDeveloper - Associate
SAA-C03 · AssociateSolutions Architect - Associate
SOA-C02 · AssociateCloudOps Engineer - Associate
SAP-C02 · ProfessionalSolutions Architect - Professional
DOP-C02 · ProfessionalDevOps Engineer - Professional
Linux Master 2 · 2급KAIT Linux Master - Level 2
SCS-C03 · SpecialtySecurity - Specialty
Linux Master 1 · 1급KAIT Linux Master - Level 1
  • Week 1
    • 1.Operating Systems and Linux: What the Kernel Does
    • 2.Free Software and Distributions: The Ecosystem Built by Licenses
    • 3.Installation and Booting: From the Moment You Power On
    • 4.Filesystem Structure and File Types: Everything Is a File
    • 5.Week 1 Comprehensive Review: Time to See Through the Concepts
  • Week 2
  • Week 3
  • Week 4
  • Week 5
  • Week 6
  • Week 7
  • Week 8
  • Week 9
  • Week 10
  • Week 11
  • Week 12
  • Week 13
  • Week 14
    • 1.Primary Subject 1 Mock Exam: Weak Points in Understanding Practical Linux
    • 2.Primary Subject 2 Mock Exam: Weak Points in Linux System Administration
    • 3.Primary Subject 3 Mock Exam: Weak Points in Using Networks and Services
    • 4.Secondary Practical Exam Mock: Short-Answer and Hands-On Drills
    • 5.Final Wrong-Answer and Flashcard Roundup and Exam-Day Strategy (Wrapping Up the 70 Days)
MLA-C01 · AssociateMachine Learning Engineer - Associate
AIF-C01 · FoundationalAI Practitioner - Foundational
DEA-C01 · AssociateData Engineer - Associate
MLS-C01 · SpecialtyMachine Learning - Specialty
SQLD · 개발자SQL Developer (SQLD)

© CertNote · 주간랩스

  • About
  • Changelog
  • Contact
  • Terms
  • Privacy
← Linux Master 1/Week 14/Day 4

Based on the Linux Master 1 exam syllabus·Report an error

Linux Master 1· AssociateWeek 14 · Day 4~20 min read

Day 4 - Secondary Practical Exam Mock: Short-Answer and Hands-On Drills

📌 Key Points

  • For Level 1, you must pass the secondary practical exam after passing the primary written exam to get the final pass. The secondary exam has short-answer and hands-on tasks that you must write out yourself.
  • Unlike the written exam, where you "choose," this is an exam where you "write," so exact spelling and options are your score. Practice in multiple-choice form, but you also need to drill writing by hand.
  • The hands-on tasks revolve around 6 areas — accounts and permissions, text processing, disks and mounting, scheduling, network and service configuration, systemctl.
  • The distinction between "now" and "permanent" is the number one cause of lost points — mount vs /etc/fstab, start vs enable, firewall-cmd without --permanent.
  • For permission calculation, rwx=7, rw-=6, r-x=5, r--=4, and the special permissions (SetUID 4, SetGID 2, Sticky 1) are added as the leading digit.
  • The space before the parenthesis in /etc/exports and the spaces around = in shell variable assignment are classic point-losing traps on the practical exam.

Hands-On Key 1: User and Permission Management Commands

  • Get the account and permission commands tested in the practical exam into your fingers.
TaskCommand
Add a useruseradd -m -s /bin/bash name
Set a passwordpasswd name
Modify a userusermod -G group name
Delete a useruserdel -r name (including home)
Add a groupgroupadd group
Change permissionschmod 755 file
Change ownerchown user:group file
Special permissionchmod u+s (SetUID)

Practical exam points: Get useradd's -m (create home), -s (specify shell), -G (supplementary group), and -u (UID) exactly right. The -r in userdel -r deletes the home directory and mail spool too.

Hands-On Key 2: File Search and Text Processing

  • find, grep, awk, and sed are the core tools of the practical hands-on tasks.
CommandPurposeExample
findFile searchfind / -name "*.log" -type f
grepPattern searchgrep -rn "error" /var/log
awkField processingawk '{print $1}' file
sedStream editingsed 's/old/new/g' file
sort/uniqSorting and duplicates`sort file
wcCountingwc -l file

find options in focus: -name (name), -type f/d (file/directory), -mtime +7 (modified more than 7 days ago), -size +100M (size), -perm (permissions), -exec ... {} \; (execute). On the practical exam, you use the -exec rm {} \; form.

Hands-On Key 3: Disk and Mount Scenarios

  • The whole flow of adding a disk → partition → format → mount → register in fstab is asked.
fdisk /dev/sdb        # create a partition
mkfs.ext4 /dev/sdb1   # create a filesystem
mkdir /data           # mount point
mount /dev/sdb1 /data # temporary mount
# register permanently in /etc/fstab:
# /dev/sdb1  /data  ext4  defaults  0  0

⚠️ Practical exam trap: A temporary mount (mount) disappears on reboot. For a permanent mount, you must register it in /etc/fstab. You must write the 6 fstab fields (device, mount point, type, options, dump, fsck order) exactly to avoid losing points.

Hands-On Key 4: Processes and Job Scheduling

  • This covers cron, at, and process control.
TaskCommand/Format
Register a recurring jobcrontab -e
cron formatminute hour day month weekday command
One-time schedulingat time
Check processes`ps -ef
Force killkill -9 PID
Kill by namekillall process-name
  • cron field example: 0 3 * * 1 /backup.sh = runs every Monday at 03:00.

cron field order: minute (0-59) hour (0-23) day (1-31) month (1-12) weekday (0-7, 0 and 7 = Sunday). * means every time, */10 means every 10 units, 1-5 is a range, and 1,15 is a list.

Hands-On Key 5: Network and Service Configuration Scenarios

  • You are made to write the key entries of service configuration files yourself.
ServiceConfiguration FileKey Entries
Network/etc/sysconfig/network-scripts/ifcfg-*IPADDR, NETMASK, GATEWAY
DNS client/etc/resolv.confnameserver
Hostname/etc/hostnamehostname
SSH/etc/ssh/sshd_configPort, PermitRootLogin
Firewallfirewall-cmd--add-port, --permanent

Firewall on the practical exam: To open a port permanently, run firewall-cmd --permanent --add-port=80/tcp and then firewall-cmd --reload. Without --permanent, it disappears on reboot.

Hands-On Key 6: Service Management (systemctl)

  • The systemd service control commands are essential for the practical exam.
TaskCommand
Startsystemctl start service
Stopsystemctl stop service
Restartsystemctl restart service
Reload configurationsystemctl reload service
Enable at bootsystemctl enable service
Check statussystemctl status service

⚠️ enable vs start: start starts it now, and enable starts it automatically at boot. They are separate, so if you need both, use systemctl enable --now service.

Hands-On Key 7: Log Analysis Scenarios

  • Reading logs and finding the cause when diagnosing a failure also appears on the practical exam.
LogPathPurpose
General system/var/log/messagesGeneral kernel and service messages
Authentication/security/var/log/secureLogin and sudo records
Boot/var/log/boot.logBoot messages
Mail/var/log/maillogMail sending and receiving
  • For real-time monitoring, use tail -f /var/log/messages; to extract a specific pattern, use grep "Failed" /var/log/secure.

journalctl on the practical exam: In a systemd environment, you also use journalctl -u service-name (logs for a specific service), journalctl -b (this boot), and journalctl -f (real-time).

Hands-On Key 8: Shell Scripting Basics

  • Writing and interpreting simple scripts can come up as a hands-on task.
ElementSyntax
Shebang#!/bin/bash
VariableVAR=value (no spaces)
Conditionalif [ condition ]; then ... fi
Loopfor i in list; do ... done
Arguments$1 $2 ... $# (count) $@ (all)

Test operators: -f (file exists), -d (directory), -z (empty string), -eq/-ne/-lt/-gt (numeric comparison). Spaces on both sides inside [ ] are mandatory.

Variable assignment trap: Putting spaces around =, as in VAR = value, causes an error. Always write it joined, as VAR=value. Reference it with $VAR or ${VAR}.

Hands-On Key 9: Permission Scenarios Roundup

  • Compound permission problems require you to calculate the chmod numbers yourself.
RequirementNumberCommand
Owner full, group and others read and execute755chmod 755
Owner read and write, others read644chmod 644
SetUID + 7554755chmod 4755
Sticky + 7771777chmod 1777

Calculation in one line: rwx=7, rw-=6, r-x=5, r--=4. Special permissions are added as the leading digit of the 4 digits (SetUID 4, SetGID 2, Sticky 1). The permission of /tmp is 1777 (Sticky+777).

Hands-On Key 10: Writing Service Configuration Files Directly

  • On the practical exam, you are made to fill in specific lines of a configuration file yourself.
  • Get the short snippets into your fingers.
  • NFS share (/etc/exports)
/srv/share  192.168.1.0/24(rw,sync,no_subtree_check)
  • Samba share (/etc/samba/smb.conf)
[data]
   path = /srv/data
   writable = yes
   valid users = @staff
  • cron registration (crontab -e)
30 2 * * * /usr/local/bin/backup.sh

The exports whitespace trap: You must not put a space between client(options). If you separate them as in 192.168.1.0/24 (rw), rw is opened to all hosts. The number one point-loser on the practical exam.

Hands-On Key 11: Command Combinations and Pipes

  • Hands-on tasks often require pipe and redirection combinations rather than a single command.
SymbolMeaning
``
>Overwrite output
>>Append output
2>Redirect standard error
&&Run the next if the previous succeeded
;Run sequentially (regardless of success)
  • Example: ps -ef | grep nginx | grep -v grep | awk '{print $2}' — extracts only nginx's PID.

Combination examples: du -sh * | sort -rh | head (largest first), cat access.log | grep 404 | wc -l (count of 404s). The mindset of chaining filters with pipes is the core of the practical exam.

Hands-On Key 12: Boot and Recovery Scenarios

  • Failure recovery is a high-difficulty hands-on task. Let's summarize the key situations.
SituationResponse
Lost root passwordEnter rescue/single mode from GRUB, then passwd
Boot failure due to an fstab errorFix fstab in emergency mode
Service fails to startTrace the cause with systemctl status and journalctl -xe
Disk fullFind large files with du and clean up, rotate logs

Single-user mode: If you enter by adding single or rd.break to the kernel line in the GRUB menu, you can do recovery work with root privileges. This is the standard procedure for password recovery.

You need to practice spelling and options repeatedly by hand. Check yourself with the mock exam below.

📖 Glossary

  • Short-answer / hands-on : A type where you write out a command, option, or path briefly / a type where you work through a scenario as a command procedure.
  • useradd -m -s : The option combination that creates an account by making a home directory (-m) and specifying a login shell (-s).
  • userdel -r : An option that deletes the home directory and mailbox along with the account.
  • -exec {} \; : The syntax by which find runs a command for each file found. {} stands in for the file name.
  • Permanent mount : A mount registered in /etc/fstab that persists after reboot. If you only run mount, it is temporary.
  • fstab 6 fields : device, mount point, type, options, dump, fsck order.
  • enable vs start : Register to start automatically at boot / start immediately now. If you need both, use enable --now.
  • --permanent + --reload : The two steps that save a firewalld setting permanently and apply it to the current session.
  • journalctl : The command for viewing the logs that systemd collects. -u (service), -b (this boot), -f (real-time).
  • Special permission digit : The leading digit of the four chmod digits. You add SetUID 4, SetGID 2, and Sticky 1 (/tmp is 1777).
  • exports whitespace trap : An NFS syntax trap in which separating the client and the parenthesis opens permissions to all hosts.
  • Pipe (|) : A connection that passes the previous command's output as the next command's input. The mindset of chaining filters is the core of the practical exam.
  • Single-user mode : A recovery mode entered from GRUB with single or rd.break. It is the standard procedure for resetting the root password.

📝 Practice Questions

Click a choice to reveal the answer and explanation.

Question 1

Which command correctly creates the user 'kim' with a home directory and sets the login shell to bash?

Question 2

Which command recursively searches for the string "error" under /var/log with line numbers?

Question 3

Which file must you register the added disk partition /dev/sdb1 in so that it is automatically mounted at /data even after a reboot?

Question 4

Which crontab entry runs /backup.sh every Monday at 3 AM?

Question 5

Which is the correct procedure for permanently opening port 80/tcp in firewalld so that it persists after reboot?

Question 6

Which command starts the httpd service now and also sets it to run automatically at boot, all at once?

Question 7

Which command uses find to locate and delete files under /tmp that have not been modified for more than 7 days?

Question 8

Which sed command replaces every "old" with "new" in a text file and prints the result?

Question 9

Which command terminates all running 'nginx' processes at once by name?

Question 10

Which command correctly adds the SetUID permission to the file report.sh?

PreviousPrimary Subject 3 Mock Exam: Weak Points in Using Networks and ServicesWeek 14 · Day 3Next Final Wrong-Answer and Flashcard Roundup and Exam-Day Strategy (Wrapping Up the 70 Days)Week 14 · Day 5

Official references

  • Linux Master 1 official exam syllabus(opens in a new tab)

On this page

  • Key Points
  • Hands-On Key 1: User and Permission Management Commands
  • Hands-On Key 2: File Search and Text Processing
  • Hands-On Key 3: Disk and Mount Scenarios
  • Hands-On Key 4: Processes and Job Scheduling
  • Hands-On Key 5: Network and Service Configuration Scenarios
  • Hands-On Key 6: Service Management (systemctl)
  • Hands-On Key 7: Log Analysis Scenarios
  • Hands-On Key 8: Shell Scripting Basics
  • Hands-On Key 9: Permission Scenarios Roundup
  • Hands-On Key 10: Writing Service Configuration Files Directly
  • Hands-On Key 11: Command Combinations and Pipes
  • Hands-On Key 12: Boot and Recovery Scenarios
  • Glossary
  • Practice Questions