CompTIA Linux+ Ch 9
Which of the following characters, when pressed while the top program is running, will allow you to change the niceness of a process?
r
Which of the following commands will most likely increase the chance of a process receiving more time slices?
renice -12
Which of the following commands will show a list of process names along with their process ID (PID)? (Choose two.)
top ps
As daemon processes are not associated with terminals, you must use an option such as -e alongside the ps command to view them. True or False?
true
In which directory would a system administrator store scripts that should be run monthly by the cron daemon?
/etc/cron.monthly
Which of the following is the highest value that can be set for the nice value which would result in a greater chance of a lower priority?
19
What kill level signal cannot be trapped?
9
Which of the following command can be used to remove a job from the list of pending jobs? (Choose all that apply.)
atrm at -r at -d (-r and -d options are aliases for atrm command)
What command is used to view and modify user jobs scheduled to run with cron?
crontab
Which of the following commands will show the current user cron jobs that have been created for the currently logged in user?
crontab -l
What is the name given to a process not associated with a terminal?
daemon process
A process spawning or initiating another process is referred to as ________.
forking
Which process has a PID of 1 and a PPID of 0?
init/systemd
A runaway process that is faulty and consuming mass amounts of system resources ________.
is a rogue process
Which of the following commands can be used to only show jobs that have been paused.
jobs -s
Which of the following commands will send a process's resources to /dev/null to kill the process for process ID 1357?
kill -9 1357 (kill command can be used with a -9 to send the SIGKILL signal)
Which of the following commands can be used to see files that are currently being used by a specific process ID (PID)?
lsof (list open files)
Which command entered without arguments is used to display a list of processes running in the current shell?
ps
What command is used to display the lineage of a process by tracing its PPIDs until the init daemon?
pstree
While the top command is running, what key can be pressed to change the nice value of a process?
r
The at command is used to ________.
schedule processes to run at a single instance in the future
When you run the ps command, how are daemon processes recognized?
there is a question mark in the TTY column
To kill a process running in the background, you must place a % character before its process ID. True or False?
true
Which of the following commands can be used to schedule very frequent recurring tasks, such as running once every minute?
watch
Which of the following can be used preceding a command to prevent a process from terminating when the parent process terminates?
nohup (means no hangup)
Every process has a process ID and a ________.
parent process ID
Which of the following commands can be used to terminate a process by the process name?
pkill
Which command is used to gain real-time information about processes running on the system, with the most processor-intensive processes listed at the beginning of the list?
top
How can you bypass the wait function and send a user process to the background?
you can use the Ctrl+z key combination and the bg command
A system administrator wants to allow most users to be able to run cron jobs, but wants to specifically prevent a couple of users from doing so. Which of the following files could the administrator edit to disallow these users from creating cron jobs?
/etc/cron.deny
If a process state is currently showing as uninterruptible sleep, which letter will show in the output of the ps command?
D (a process is in uninterruptible sleep if it is waiting for disk access)
You have run the top command successfully, but realize that the q key on the keyboard has suddenly stopped working. What is another way that you can exit out of the top program?
ctrl-c
After a background process has been started, what command below can be used to move it to the foreground?
fg
Which command can be used to see processes running in the background?
jobs
Nice values are used to affect process priorities using a range between ________.
-20 and 19
What option can be used with the ps command to display an entire list of processes across all Terminals, including daemons?
-e
Which of the following statements is true? (Choose all that apply.)
If /etc/at.allow exists, only users listed in it can use the at command. If /etc/cron.deny exists and /etc/cron.allow does not exist, any user not listed in /etc/cron.deny can use the cron command. If /etc/cron.allow exists, only users listed in it can use the cron command.
Which kill signal terminates a process by taking the process information in memory and saving it to a file called core on the hard disk in the current working directory?
SIGQUIT
The pkill command terminates ________.
all instances of a process with the same name matched by a regular expression
A system administrator wants to schedule a task to run at 11 pm, but knows that she will not be in the office at that time. Which of the following commands can she use to schedule this task to run that night while she is at home?
at
Which of the following commands will display a list of the pending jobs to be run? (Choose all that apply.)
at -l atq at -q (-l and -q are aliases for the atq command)
Where are scheduled commands stored on Ubuntu Linux systems?
/var/spool/cron/atjobs
Where are individual user tasks scheduled to run with the cron daemon stored on a Fedora system?
/var/spool/cron/username
You have started a job running in the background that you want to now bring to the front so that you can watch it execute. Which of the following commands can be used to display the job's output to the terminal?
fg
Which of the following states describe a process that is waiting for a parent process to release its PID?
zombie