Adv Linux / ALA Post-Test Review < Course Index

ALA // Post-Test Review

A focused review of every concept on the Advanced Linux Administration Post Test. Part 1 is a topic-by-topic study guide with the exact commands and why they matter; Part 2 is a question-by-question answer index in test order. Legacy SUSE-era items are flagged with their modern equivalent.

CTS4321C · Advanced Linux Administration 25 questions reviewed 9 topic areas
1. Viewing & inspecting files

Read parts of a file without opening the whole thing — essential for large logs.

headfirst lines of a file (default 10)
head server_log.txt # first 10 lines head -n 20 server_log.txt # first 20 lines
Q1: use head to assess the start of a large log. cat dumps the whole file, tail shows the end, more scrolls but does not limit to the first 10.
taillast lines; tail -f follows live
tail -f /var/log/syslog # watch new lines as they arrive
2. Files & directories

Create, copy, and archive files and whole directory trees.

mkdircreate a directory
mkdir /path/to/project_docs mkdir -p a/b/c # create parent dirs as needed
Q4: mkdir creates the new directory in the specified location.
touchcreate an empty file / update timestamp
touch /home/user/config.txt
Q5: touch creates the file if it does not exist, and updates the timestamp if it does.
cp -rcopy a directory recursively
cp -r /src/dir /dest/dir # include all files + subdirectories
Q3: -r (recursive) copies the entire tree, preserving files and subdirectories.
tararchive container format (.tar)
tar -czf backup.tar.gz /src # create gzip archive tar -xzf backup.tar.gz # extract
Q13: tar bundles files and directory structures into one archive; convention is the .tar extension.
rsynccopy/sync directories across a network
rsync -av /src/ user@host:/dest/ # mirror over SSH, only changes
Q23: rsync is intended to copy complete directories across a network to another computer (efficiently, transferring only differences).
3. Ownership & permissions

Control who owns a file and what they may do with it.

chown user:groupchange owner and group
chown john:staff /path/to/file
Q2: chown john:staff sets user john and group staff. chmod changes permissions not ownership; chgrp changes only the group; setfacl changes the ACL, not ownership.
sticky bitrestrict deletion in shared dirs
chmod +t /shared # or chmod 1777 /shared ls -ld /tmp # drwxrwxrwt (the 't')
Q11: the sticky bit on a shared directory (like /tmp) prevents users from deleting each other's files — only the owner (or root) can delete a file.
ACLs — setfacl / getfaclper-user / per-group permissions
setfacl -m u:john:rw file # grant john read+write getfacl file # view the ACL
Q25: setfacl changes a file's ACL. Q12: a minimum ACL contains just the entries for owner, owning group, and other (the conventional permission bits); an extended ACL adds named users/groups plus a mask.
4. Shell & scripting

Bash basics tested on the exam.

letinteger arithmetic in Bash
let result=4+5 # result = 9 let "count += 1"
Q14: let performs an arithmetic operation in Bash (equivalent to $(( ))).
# commenta comment in a shell script
# this line is a comment, ignored by the shell
Q22: a comment is introduced with the # character. (Note: # at the end of a prompt also signals a root shell.)
Ctrl-Cinterrupt a running command
ping example.com # press Ctrl-C to stop
Q8: ping keeps sending packets until terminated by Ctrl-C (SIGINT).
5. Networking & DNS

Bring interfaces up, query DNS, and configure name resolution.

ip link set <dev> upenable a network interface
ip link set eth0 up # bring eth0 up ip link set eth0 down # take it down
Q7: ip link set eth0 up enables the device (the modern replacement for ifconfig eth0 up).
ping -woverall deadline in seconds
ping -w 10 example.com # exit after 10s regardless of packets
Q9: ping -w maxwait sets a timeout/deadline in seconds after which ping exits, regardless of packets sent or received. (Contrast -c = packet count.)
MX recordmail server for a domain
example.com. IN MX 10 mail.example.com.
Q10: an MX (Mail eXchanger) entry in the DNS zone file defines the mail server for a domain (forward resolution).
/etc/resolv.confDNS resolver configuration
nameserver 8.8.8.8 search example.com
Q24: name resolution (which DNS servers the host queries) is configured in /etc/resolv.conf.
6. Storage & system status

Mounts, swap, and load.

/etc/fstabfilesystems mounted at boot
/dev/sda2 none swap sw 0 0 UUID=... / ext4 defaults 0 1
Q19: every swap partition (and every persistent mount) has an entry in /etc/fstab.
swap partitiondisk-backed virtual memory
swapon --show free -h # see swap usage
Q20: the swap partition frees physical memory by copying temporarily unused memory pages to disk.
uptimeload average over 1/5/15 min
uptime # 14:22 up 3 days, load average: 0.15, 0.21, 0.18
Q21: uptime displays the system load over the last 1, 5, and 15 minutes.
7. Software & builds

Package relationships and building from source.

dependenciespackages / targets a thing needs
target: dependency1 dependency2 command-to-build-target
Q15: every Makefile rule consists of targets, their dependencies (prerequisites that must exist/build first), and the commands that build the target. Package managers resolve software dependencies the same way.
8. Boot & servicesLEGACY

Two items here use older installer / SUSE conventions. Know the exam answer, and the modern equivalent.

Boot from Hard Diskinstaller boot-menu option
Q6: on the installation boot menu, Boot from Hard Disk boots the OS already installed on disk (instead of starting the installer).
chkconfig apache2 offremove a service from the init process
chkconfig apache2 off # SysV: stop apache2 starting at boot
Q17: chkconfig apache2 off removes the apache2 service from the init (boot) process. The distractors (top, vmstat, iostat) are monitoring tools, not service managers.
Legacy → modern: on systemd use systemctl disable apache2 (stop it starting at boot) and systemctl stop apache2 (stop it now).
rcapache2 stopstop Apache (SUSE init script)
rcapache2 stop # SUSE rc-script form
Q18: the exam answer is rcapache2 stop, a SUSE rc service wrapper.
Legacy → modern: on current systemd systems use systemctl stop apache2 (or httpd on RHEL). Enable/disable at boot with systemctl enable/disable (replaces the old chkconfig).
9. Network monitoringLEGACY
Traffic-visanalyze connections to hosts
Q16: the exam answer is Traffic-vis, an older program that analyzes network connections to specific hosts.
Legacy → modern: for live per-connection traffic today use iftop, nload, bmon, or ss -tup / nethogs.
Answer index — all 25 questions (test order)

The correct answer for every question, with a one-line why and the topic it maps to.

QTestsAnswerWhy
Q1View start of a logheadFirst 10 lines; cat=all, tail=end, more=scroll.
Q2Change owner+groupchown john:staffchmod=perms, chgrp=group only, setfacl=ACL.
Q3Copy a directory treecp -rRecursive; preserves all files + subdirs.
Q4Make a directorymkdirCreates the directory in the given location.
Q5Create empty filetouchCreates if absent; updates timestamp if present.
Q6Installer boot menu [legacy]Boot from Hard DiskBoots the OS already installed on disk.
Q7Enable an interfaceip link set eth0 upModern replacement for ifconfig up.
Q8Stop pingCtrl-CSends SIGINT to terminate.
Q9Ping deadlineping -w maxwaitExit after N seconds regardless of packets.
Q10Mail server in DNSMXMX record defines the domain's mail server.
Q11Protect shared-dir filessticky bitOnly the owner/root can delete (e.g. /tmp).
Q12ACL with owner/group/otherminimum ACLJust the standard perm bits as ACL entries.
Q13Archive containertarBundles files/dirs; .tar convention.
Q14Bash arithmeticletPerforms integer arithmetic.
Q15Makefile partsdependenciesTargets, dependencies, and commands.
Q16Analyze connections [legacy]Traffic-visModern: iftop / nload / nethogs.
Q17Remove svc from init [legacy]chkconfig apache2 offSysV/SUSE; modern: systemctl disable apache2.
Q18Stop apache2 [legacy]rcapache2 stopSUSE rc-script; modern: systemctl stop apache2.
Q19Swap partition entry/etc/fstabWhere mounts + swap are declared.
Q20Frees physical memoryswapPages unused memory to disk.
Q21Load over 1/5/15 minuptimeShows uptime + load averages.
Q22Shell comment char#Everything after # on a line is ignored.
Q23Copy dirs over networkrsyncEfficient sync; transfers only changes.
Q24Name resolution config/etc/resolv.confNameservers + search domains.
Q25Change a file's ACLsetfaclgetfacl to view, setfacl to modify.

Note: question order follows the Post Test (Q1 through Q25).

Reviewed the Post-Test material

Mark this review complete once you have gone through the topic guide and the answer index. You can revisit it any time before the exam.