Question Q-5804 A sysadmin needs to pipe the output of `ps aux`…
2 comments · last active May 31, 2026
By Jordan Blake · Updated Jul 10, 2026
| Questions | 25 |
| Passing Score | 75% |
| Format | 100% Multiple Choice |
| Sessions Logged | 499 |
| Your progress | Log in / Register to track times taken, best score, questions mastered, and coverage on this quiz. |
| Rating |
Uncategorized25 questions
Log in to post a comment, reply, or expand a question.
Bash script: shebang #!/bin/bash, chmod +x, set -e exit on error. Variables $1 $2 positional params.
[[ ]] vs [ ] — modern bash prefers [[ for tests. $(command) for subshell capture.
systemctl start/stop/enable/disable — enable = boot persistence. journalctl -u nginx for service logs.
SysV init scripts legacy — exam still mentions runlevels vs systemd targets (multi-user.target).
cron vs systemd timers — crontab -e for user jobs, /etc/cron.d for packages. @reboot special string.
First five fields: min hour dom month dow. Check system time TZ for scheduled jobs.
grep -r 'pattern' /etc — ripgrep faster in real life but exam says grep. sed/awk for stream edit.
Pipe stderr: 2>&1 | grep error. Know stdout 1 vs stderr 2 file descriptors.
SELinux enforcing vs permissive — getenforce, restorecon after moving files breaks contexts. AppArmor on Ubuntu.
chcon temporary vs semanage fcontext permanent — troubleshoot denials in /var/log/audit/audit.log.
chmod 750 = rwxr-x--- (owner rwx, group rx, other none). Octal: 4 read, 2 write, 1 execute.
Setuid bit (4xxx) runs as file owner — /usr/bin/passwd example. Sticky bit on /tmp prevents others deleting your files.
find /home -user jdoe -perm -0020 finds group-writable files owned by jdoe — know find predicates (-name, -mtime, -size).
locate uses DB updated by updatedb — faster but not real-time. find is live filesystem walk.
chown -R user:group /data/files — recursive ownership change. chmod changes mode bits, chown changes owner.
Only root or current owner can chown (unless CAP_FOWNER nuances). Use sudo.
Catalog listing of the 5 preview questions for this quiz.
A Linux administrator wants to monitor real-time system performance (CPU, memory, disk I/O, network) all in one tool. Which command provides this?
`htop` provides an interactive, color-coded view of CPU, memory, processes. `glances` shows CPU, memory, disk I/O, network, and more in one screen. `top` shows CPU/memory but limited. `vmstat` shows virtual memory stats. `iostat` shows disk I/O. For comprehensive real-time monitoring, htop/glances are preferred.
An administrator finds that the /var/log partition is at 98% capacity, causing some services to fail. What is the CORRECT immediate action?
Before deleting logs (potential loss of audit trail/forensic data), identify the source with `du -sh /var/log/* | sort -rh`. Compress old logs (`gzip`), archive to external storage, or configure logrotate to manage rotation. Investigate which service generated the excessive logs to prevent recurrence.
A system administrator needs to mount an NFS share `/share/data` from server `192.168.1.100` to `/mnt/data` persistently. Which entry in `/etc/fstab` accomplishes this?
/etc/fstab NFS entry format: `[server]:[remote-path] [local-mount] [fs-type] [options] [dump] [pass]`. NFS uses the `nfs` filesystem type. CIFS is for Windows/Samba shares. The URL format is not used in fstab.
A DevOps engineer needs to create a Docker container running Nginx, mapping host port 8080 to container port 80, with the container running in the background. Which command is correct?
`docker run -d -p 8080:80 nginx` — `-d` runs the container detached (in background), `-p 8080:80` maps host port 8080 to container port 80 (format: host:container). `-p 80:8080` would reverse the mapping (host 80 → container 8080).
A Linux administrator needs to install a package from the local filesystem (a .rpm file) on a Red Hat-based system without using a repository. Which command is used?
`rpm -ivh package.rpm` installs (-i) a local .rpm file verbosely (-v) with progress bar (-h). `yum install` can install local .rpm files too but resolves dependencies from repos. `apt` and `dpkg` are Debian/Ubuntu package tools and don't handle .rpm format.
SSH hardening: key-based auth, disable root login, change port optional, fail2ban for brute force.
/etc/ssh/sshd_config vs ssh_config — server vs client. systemctl restart sshd after edits.