Managing Linux Processes (questions)
You want to kill all process IDs of a specific process with a single command. Which command should you use?
killall
Which command is equivalent to the atq command? at -a at -f at -l at -c
at -l
Which process has a PID of 1 and a PPID of 0?
init/systemd
Which metacharacter is used to run a process in the background?
&
Which of the following attributes are associated with a process? [Choose all that apply.] Parent process ID File descriptor table Current directory PWD Process ID
Process ID Parent process ID Current directory PWD File descriptor table
Which command is used to schedule jobs?
at
Which command is equivalent to the atrm command? at -a at -f at -d at -l at -c
at -d
Which command will bring a background process in foreground?
fg
Every process has a process ID and a _______.
parent process ID
The at command is used to ______.
schedule processes to run at a single instance in the future
Which parameter can you use with the ps command to display the active processes? [Choose all that apply.] -e -n -a -m -l
-a -e
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 /etc/cron.d/cron.deny /etc/cron.allow /etc/cron.d/cron.allow
/etc/cron.deny
Which of the following can be used preceding a command to prevent a process from terminating when the parent process terminates? bg runat & nohup
nohup
To display the processes for the current shell, you should use the ____ command.
ps
Which command entered without arguments is used to display a list of processes running in the current shell?
ps
The _________ command displays the lineage of a process by tracing its PPID back to the init daemon.
pstree
Which of the following characters, when pressed while the top program is running, will allow you to change the niceness of a process? n p r d
r
Which command is used to change the priority of an active process?
renice
When you run the ps command, how are daemon processes recognized?
There is a question mark in the TTY column.
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
The pkill command terminates _________.
all instances of a process with the same name matched by a regular expression
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 of the following commands will send a process's resources to /dev/null to kill the process for process ID 1357? sigkill 1357 killall 1357 kill -15 1357 kill -9 1357
kill -9 1357
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
To view the virtual regions being used, you should use the ________ command.
maps
Which command will list the processes for a specific user?
ps
Which of the following commands will most likely increase the chance of a process receiving more time slices? renice 0 renice 15 renice -12 renice 19
renice -12
Which command will list all active processes that are running on a Linux system?
top
Which of the following states describe a process that is waiting for a parent process to release its PID? wait suspended zombie dead
zombie
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? cronjobs --list cron --list cron -l crontab -l
crontab -l
A runaway process that is faulty and consuming mass amounts of system resources ________.
is a rogue process
Which command can be used to see processes running in the background?
jobs
Which command should you run to list the background processes?
jobs
Which of the following commands can be used to see files that are currently being used by a specific process ID (PID)? psfiles lsof pstatus pids
lsof
Which command should be used to change the priority of a process?
nice
To displays the uptime of a process, you should use the ______ command.
uptime
Which directory stores the cron configuration file?
/etc/
In context of cron, which of the following is not the correct directory name? /etc/cron.daily/ /etc/cron.weekly/ /etc/cron.hourly/ /etc/cron.monthly/ /etc/cron.yearly/
/etc/cron.yearly/
The ________ file system is a virtual file system that is available in CentOS.
/proc
Where are individual user tasks scheduled to run with the cron daemon stored on a Fedora system?
/var/spool/cron/username
What is the default priority of a process?
0
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? 20 19 10 0
19
What kill level signal cannot be trapped?
9
To kill a process running in the background, you must place a % character before its process ID. True or False?
False
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.
Nice values are used to affect process priorities using a range between _____________.
-20 and 19
Which of the following is used to create a background process? % $ @ # &
&
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.allow exists, only users listed in it can use the cron 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 and /etc/cron.deny exist, only users listed in the former can use the cron command, and any users listed in the latter are denied access to the cron command. - If a user is listed in both /etc/cron.allow and /etc/cron.deny, then /etc/cron.deny takes precedence and the user cannot access the crontab command.
- If /etc/at.allow exists, only users listed in it can use the at command. - If /etc/cron.allow exists, only users listed in it can use the cron 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.