Unlock hundreds more features
Save your Quiz to the Dashboard
View and Export Results
Use AI to Create Quizzes and Analyse Results

Sign inSign in with Facebook
Sign inSign in with Google

Can You Master Linux Process Management? Take the Quiz!

Put your process listing, at command and cron scheduling skills to the test!

Difficulty: Moderate
2-5mins
Learning OutcomesCheat Sheet
Paper art illustration featuring gears terminal clock calendar on dark blue background for Linux process management quiz

Are you ready to elevate your command-line game? Our Linux process management quiz challenges you to master process listing, background tasks, at scheduling, and cron jobs. In this Linux process management test, tackle scenarios like process listing in Linux quiz and master the at command Linux quiz or cron scheduling Linux quiz. Whether you're prepping for an interview or sharpening your sysadmin toolset, this motivating challenge is perfect for administrators, DevOps pros, and enthusiasts. You'll learn best practices and tips to streamline your workflow under pressure. Plus, boost your skills with linux command practice and a fun Linux commands quiz . Ready to start? Click now and prove your Linux process management prowess!

Which command lists currently running processes in a tree-like format?
ps -ef
pstree
htop
top
The pstree command displays processes as a tree, showing parent-child relationships in a hierarchical view. Unlike ps or top, it focuses on genealogy rather than sorting by resource usage. This is useful for quickly understanding dependencies between processes. source
Which operator at the end of a command line runs the command in the background?
&&
;
&
||
Appending an ampersand (&) to a command tells the shell to start it as a background job, freeing the terminal for new input. Other operators like && and || control execution based on exit status. This is standard in Bash and other POSIX shells. source
Which shell built-in brings a background job to the foreground?
wait
jobs
bg
fg
The fg command resumes a stopped or background job in the foreground, attaching it to the terminal. The bg command moves a stopped job to the background instead. jobs lists current shell jobs, but does not change their state. source
Which command shows a list of current shell jobs?
jobs
kill
top
ps
The built-in jobs command lists processes that were started in the current shell session and are either stopped or in the background. ps and top list all system processes, not just shell jobs. kill sends signals but does not list jobs. source
What real-time resource usage does the top command display?
Network traffic
CPU and memory usage
Process tree
Disk usage
top provides a dynamic, real-time view of system resource usage, focusing on CPU and memory consumption by processes. Disk usage and network traffic require other tools like iostat or ifconfig. It does not show a hierarchical tree. source
What is the default signal sent by the kill command if none is specified?
SIGHUP
SIGTERM
SIGINT
SIGKILL
By default, kill sends the SIGTERM (signal 15) to request a graceful shutdown of the target process. SIGKILL (9) forces termination but is not the default. SIGHUP and SIGINT have different behaviors. source
Which command schedules a one-time job at a specific future time on Linux?
batch
anacron
at
cron
The at command schedules commands to be executed once at a specified future time. cron is for recurring jobs, batch runs at low load, and anacron handles delayed jobs after downtime. source
In crontab syntax, which special string runs a job at system reboot?
@hourly
@reboot
@daily
@weekly
Using @reboot in a crontab entry ensures the job runs once at each system startup. Other strings like @daily or @weekly schedule recurring jobs at fixed intervals. source
Which command alters the nice value of an already running process?
ionice
cpulimit
nice
renice
renice changes the scheduling priority (nice value) of existing processes by PID. nice only sets the initial priority when starting a new process. ionice adjusts I/O priority, and cpulimit limits CPU usage externally. source
What is the command to list pending jobs scheduled with at?
ls /var/spool/at
jobs
crontab -l
atq
atq lists all pending jobs submitted via at for the current user. crontab -l shows cron jobs, not at. jobs lists shell job control entries. source
In a crontab entry, what does the first field represent?
Minute
Day of Month
Month
Hour
Crontab fields follow the order: minute, hour, day of month, month, day of week, then the command. The first field is the minute, from 0 to 59. Misplacing fields leads to incorrect schedules. source
Which ps option sorts processes by memory usage in descending order?
-o mem
-m
--mem-sort
--sort=-%mem
ps supports the --sort option; prefixing a field with a minus sign sorts in descending order. Using --sort=-%mem orders processes by memory usage highest first. Other options do not implement descending sort directly. source
Which utility prevents a process from being terminated when its controlling terminal closes?
nohup
screen
disown
tmux
nohup runs a command ignoring the SIGHUP signal, allowing it to continue after logout. screen and tmux multiplex terminals but are not focused on SIGHUP handling. disown is a shell builtin that removes jobs but doesn't start new commands under SIGHUP protection. source
What is the path to the system-wide crontab file on most Linux distributions?
/etc/cron.allow
/etc/crontab
~/.crontab
/var/spool/cron/crontabs
/etc/crontab is the default system-wide crontab that can schedule jobs under different user contexts. User-specific crontabs reside elsewhere (e.g., /var/spool/cron). /etc/cron.allow controls access, not jobs. source
Which kill command syntax kills all processes in a process group with ID 1234?
kill -- -1234
kill -g 1234
pkill -G 1234
kill -p 1234
By supplying a negative PID to kill (e.g., -1234), you signal the entire process group. The -- separator ensures the negative argument isn't parsed as an option. Other flags do not target process groups in this way. source
How can you schedule a cron job to run only on the last day of every month?
0 0 -1 * * /path/to/script
0 0 28-31 * * [ "$(date +\%d -d tomorrow)" = "01" ] && /path/to/script
59 23 * * * [ "$(date +\%d)" = "$(date -d tomorrow +\%d)" ] && /path/to/script
0 0 L * * /path/to/script
Cron has no built-in 'last day' specifier, so you schedule days 28 - 31 and test if tomorrow's date is the first of the next month. If it is, the script runs. This one-liner is a common workaround in production cron jobs. source
0
{"name":"Which command lists currently running processes in a tree-like format?", "url":"https://www.quiz-maker.com/QPREVIEW","txt":"Which command lists currently running processes in a tree-like format?, Which operator at the end of a command line runs the command in the background?, Which shell built-in brings a background job to the foreground?","img":"https://www.quiz-maker.com/3012/images/ogquiz.png"}

Study Outcomes

  1. Understand process listing in Linux -

    Apply commands like ps, top, and htop to identify and monitor running processes in this Linux process management quiz.

  2. Manage background and foreground tasks -

    Use operators such as &, fg, and bg to control job execution and transition tasks between the foreground and background.

  3. Schedule one-time tasks with the at command -

    Configure and execute single-run jobs using at, mastering syntax and troubleshooting in the at command Linux quiz.

  4. Automate recurring tasks using cron -

    Create and manage crontab entries to automate routine jobs, ensuring reliable system maintenance in the cron scheduling Linux quiz.

  5. Analyze process management scenarios -

    Evaluate real-world examples to diagnose process issues and select the appropriate management commands.

  6. Optimize Linux process workflows -

    Apply best practices to streamline process operations, improve efficiency, and maintain system performance.

Cheat Sheet

  1. Efficient Process Listing with ps and top -

    According to The Linux Foundation, using ps aux combined with grep helps you pinpoint processes in a snap. For real-time monitoring, top (or htop) offers a dynamic view; press 'M' to sort by memory usage or 'P' for CPU. This duo ensures you identify resource hogs swiftly and accurately.

  2. Background & Foreground Job Control -

    The Linux process management quiz often tests your grasp of job control: append '&' to run a command like sleep 60 & in the background. Use jobs to list suspended tasks, fg %1 to bring job 1 to the foreground, and bg to resume in the background. Remember Ctrl+Z to pause a task then bg to keep it running - mnemonic: "Z for zap, B for back!"

  3. One-Time Scheduling with at -

    Per The Linux Foundation's Best Practices, the at command schedules one-off jobs: echo "tar -czf backup.tar.gz /home" | at 02:00 sets a daily backup at 2 AM. Use atq to list pending tasks and atrm to cancel. Think "a t" as "at time" to remember its purpose.

  4. Automating Recurring Tasks with cron -

    As detailed in the official cron manual (crontab(5)), cron jobs use a five-field format: minute hour day month weekday command. A handy mnemonic is "MHDMWC" for Minute, Hour, Day, Month, Weekday, Command. Edit schedules with crontab -e, list them with crontab -l, and check /var/log/cron for execution logs.

  5. Graceful & Forceful Termination with kill -

    Linux manpages recommend sending SIGTERM (kill -15) first and resorting to SIGKILL (kill -9) only if needed. Use pkill or killall for convenience across multiple PIDs. Remember the rhyme "15 says hello, 9 says goodbye" to master signal hierarchy.

Powered by: Quiz Maker