Chapter 9 Practice Questions – Flashcards

question
Which command displays the PPID?
answer
ps -f
question
A user calls with a concern about the display he is seeing after running the command: ps -ef. There are a number of processes that display getty and he is afraid that an unauthorized user is attached to the system. How should you respond?
answer
Assure the user that this is normal
question
Which command displays in the most detail all the processes that are running?
answer
ps -ef
question
You want to view all currently-running processes that include getty in the process name. Which command would you use?
answer
ps -A | grep getty
question
You answer a call from a number of users who cannot access the mail server. Which utility would you use to quickly see if the sendmail service is running?
answer
ps
question
Which command would you use to look for a potential resource hog on a workstation?
answer
top
question
You need to see a listing of running processes and system status such as a memory and CPU usage. Which command will produce the listing?
answer
top
question
Which is the default signal sent to processes by the kill utility?
answer
-15
question
A developer calls with a problem. They were trying to debug a new daemon and mistakenly places it on the production machine instead of on a lab machine. It has now entered runaway mode. The PID number is 2345 and attempts have been made to remove it with the standard kill command but it will not stop. Which command would you use to be assured that the process will terminate?
answer
Kill -9 2345
question
After a severe lightning strike nearby, a number of processes seem to be running on the server in runaway mode. Which utility terminates these processes by name, and not just by process ID number?
answer
killall
question
You have several processes running in the background as shown from the jobs command below: [1]+Running gedit & [2]+Stopped crontab e What command will bring the gedit program to the foreground?
answer
fg 1
question
You have a gedit process with a job ID of 6. Which command would you enter at the command prompt to send the process to the background?
answer
bg 6 (written)
question
You need to send a process to the foreground. Which command should you enter to identify the job ID for the process?
answer
jobs
question
Which kill option stops and restarts the process with the same Process ID (PID)?
answer
-SIGHUP
question
What is the result of the nohup gedit & command?
answer
gedit will start in the background and persist in the background after logging out of the shell
question
You have been called in to a remote site to troubleshoot a problem with a process that needs to be terminated. You are taken to the workstation with the problem and immediately realize that it is an implementation of Linux you have never worked with before. Which option would you use with the kill utility at the command prompt to see the valis signals available with Linux system you're not familiar with?
answer
kill -l (written)
question
You need to manage a process in the foreground by pressing Ctrl+C on the keyboard. What signal code is sent to the process?
answer
SIGINT
question
A developer calls with a problem. They were trying to debug a new daemon and mistakenly placed it on the production machine instead of on a lab machine. To ensure the CPU gives preference to other processes, you need to lower the daemon's priority. The PID number us 2345. Which command would you use to decrease the daemon's priority?
answer
renice -n 10 2345
question
You need to determine the priority of several processes. Which command should you enter to identify the process ID and nice value for each process?
answer
top
question
What would you enter at the command prompt to start the gedit process with the highest priority possible?
answer
nice -n -20 gedit (written)
question
Which of the following commands starts the gedit program with a priority 1 above the default nice priority?
answer
nice -n -1 gedit
question
Which command could you use to verify if a crontab file exists for user thobbs?
answer
crontab -l -u thobbs
question
You are editing the crontab file and want an entry to run every hour at five minutes past the hour. Which of the following entries will accomplish this?
answer
5* * * * /home/emmett/example.sh
question
You want to keep the gshant user from editing his respective crontab file in /var/spool/cron, but still allow all other users on the system to edit their respective crontab file. What is the full path and filename of the file you should edit?
answer
/etc/cron.deny (written)
question
Which file should you edit if you want to permit specific users to edit their respective crontab file, but deny all other users on the system from editing their crontab file?
answer
/etc/cron.allow
question
After logging in as root, you need to manage the crontab files for your Linux system. Which command should you use to edit the crontab file for the gshant user account?
answer
crontab -ue gshant
question
Which command should you enter at the command prompt to list the tasks in the at queue for the current user?
answer
at -l (written)
question
Which daemon must be running if you want to use the at command?
answer
atd
question
You want to keep the gshant user from using the at command, but still allow other users to use it. What is the full path and filename of the file you should edit?
answer
/etc/at.deny (written)
question
Which of the following statements best describes the effects of having only the gshant user account listed in the /etc/at.allow file?
answer
Only gshant and root can use the at command
question
What should be entered at the command prompt to remove tasks 2 and 3 in the at queue?
answer
atrm 2 3 (written)
question
If a system is down at the time a recurring regularly scheduled task is supposed to run, which task scheduling service will run the task when the system is back up again?
answer
anacron
question
What is the full path and filename of the file that is used to schedule tasks for the anacron daemon?
answer
/etc/anacrontab/ (written)
question
What service does cron rely on to run the scripts in the /etc/cron.daily, /etc/cron.weekly, and /etc/cron.monthly directories?
answer
ancron(written)
question
Anacron creates a timestamp file that tells you the last time a regularly scheduled job was run. What is the full path and name of the directory that contains these timestamps files?
answer
/var/spool/anacron/
question
What does the lprm command do?
answer
Remove jobs from the line printer print queue
question
What information about print jobs does the utility lpq display?
answer
-The username of the person who submitted the job -A numerical job ID that can be used to manipulate the job from other utilities
question
You want to send the yearend.txt file to the acctg printer. Which command would you use?
answer
lpr -P acctg yearend.txt
question
User badams sends two print jobs to the Marketing printer (the default printer). He notices the printer is stalled on the first document, and uses the lprm - command. What will be the result?
answer
Both of the jobs will be deleted
question
You want to configure your CUPS from a Web browser. Which command is correct?
answer
http://localhost:631
question
You have connected a new printer to a systemd-based Linux server. You cannot print to the new printer from a user workstation on the network. What tasks should you do first on the server?
answer
-Use rpm -qi cups or dnf list cups to make sure the CUPS daemon is installed -Use systemctl status cups to make sure CUPS printing service is running
question
You want to configure your CUPS from a Web browser. Which URL address and port should you enter within the Web browser's address field?
answer
http://127.0.0.1:631 (written)
question
You are using the cupsctl command to configure the /etc/cups/cupsd.conf file. Which cupstl option will enable the sharing of the locally-connected printer to other computers on the network?
answer
--share-printers (written)
question
You are configuring the /etc/cups/cupsd.conf file. Which command should you use to prevent remote printers from being displayed on the local system?
answer
cupsctl --no-remote-printers
question
Which of the following lines in the /etc/cups/cupsd.conf file will configure CUPS to listen for print jobs sent only from the local system?
answer
Listen localhost:631
question
What should you enter at the command prompt to print 23 copies of the comparables file on the homeprint printer?
answer
lpr -P homeprint - #23 comparables (written)
question
Which lpr option should you use to change the page width of the print job?
answer
-w
question
Which command will show the contents of all the print queues on your Linux system?
answer
lpq -a (written)
question
Which of the following commands removes print job 11 from the hp7 printer?
answer
cancel -P hp7 11
question
Which of the following lines in the /etc/cups/cupsd.conf file will configure CUPS to listen for print jobs coming in on the server's network interface with the IP address 192.168.0.1 through the IPP port?
answer
Listen 192.168.0.1:631
question
For what purpose would you edit the /etc/localtime file?
answer
Set the current time zone
question
You need to create a symbolic link to the /usr/share/zoneinfo/EST time zone file that permanently alters the time zone for the system. What do you enter at the command prompt to accomplish this?
answer
ln -s /usr/share/zoneinfo/ES (written)
question
What is the full path to the directory on a Linux system that contains multiple files and directories used for selecting a time zone?
answer
/usr/share/zoneinfo (written)
question
Which command should you use to change the timezone (TZ) environment variable?
answer
-tzconfig -tzselect
question
You need to set the system date and time using the date command. Which date option should you use?
answer
-s
question
A Linux system can determine the time and date in which of the following ways?
answer
-It can use NTP to set time -It can set the system clock to the local time
question
You have a large TTCP/IP network and want to keep hosts' real time clocks synchronized. What protocol should you use?
answer
NTP
question
You are using a systemd-based Linux system and have made changes in the /etc/ntp.conf file. Which of the following commands should you use to implement these changes?
answer
Systemctl restart ntpd
question
You are managing system time on your Linux computer, and you need to change the settings to point to a local NTP server IP address. What is the full path and filename of the file you should edit?
answer
/etc/ntp.conf (written)
question
Which of the following commands manages the NTP daemon from the command line?
answer
ntpd
question
Your system time is over thirty minutes different than the time on the NTP time provider. When you use the ntpd command, the time is not updated. Which ntpd option should you include?
answer
-g (written)
question
You want to set the system time with the date command to UTC time. Which date options should you use?
answer
-u
question
You want to configure the NTP daemon to receive time from pool.ntp.org. What entry should you place in the /etc/ntp.conf file?
answer
server pool.ntp.org
question
Which of the following commands will set the system time to match the time server on the network at 192.168.1.10?
answer
Netdate 192.168.1.10
question
You need to install an e-mail server. Which of the following applications are valid Linux e-mail applications?
answer
-Sendmail -Postfix
question
What do you enter at the command prompt to display the contents of an MTA mail queue?
answer
mailq (written)
question
Which of the following MTAs use the QMQP and QMTP protocols?
answer
qmail
question
Which of the following MTAs are modular?
answer
-postfix -qmail
question
By default, which protocol is used by an MTA to send messages to other MTAs?
answer
SMTP
question
Which of the following are common protocols used by MTAs to send messages to MUAs?
answer
-POP3 -IMAP
question
Recently, you updated the /etc/aliases file with several email aliases. What command do you use at the command prompt to update /etc/aliases.db file?
answer
newaliases (written)
question
Which of the following files stores the aliasing information for MTAs?
answer
/etc/aliases.db
question
You are logged in as gshant, and you want to forward your mail to the dwant user on the local network. Which file should you edit to redirect the mail for a gshant user?
answer
~/.forward (written)
question
What is the path and filename of the file that contains mail for the gshant user account?
answer
/var/spool/mail/gshant (written)
question
Which of the following directories contains email for each user account on the system?
answer
/var/spool/mail
question
Which database object in an SQL table represents attributes?
answer
columns
question
Enter the SQL command that will list all tables in the grades database.
answer
SHOW TABLES grades; (written)
question
Which of the following SQL command will group information in a list?
answer
GROUP BY
question
Which SQL database object represents a single entity or item?
answer
record
question
Which clause should you add to the SELECT command to filter results from an SQL database?
answer
WHERE (written)
question
You need to show the contents of the location and price fields in the shirt table in an SQl database. Which SQL command should you use?
answer
SELECT location, price FROM shirt;
question
Which clause should you add to the SELECT command to sort results from an SQL database?
answer
ORDER BY (written)
question
You use the following command to retrieve specific entry information from the shirt table: SELECT location, price FROM shirt However, the command is not returning any information. What should you do?
answer
Add a semicolon to the end of the statement.
question
Which of the following statements best describes the purpose of the following SQL command? DELETE FROM shirts WHERE color='pink' AND type='polo' AND gender='male';
answer
Records for men's pink polo shirts will be removed from the shirts table.
1 of

Unlock all answers in this set

Unlock answers
question
Which command displays the PPID?
answer
ps -f
question
A user calls with a concern about the display he is seeing after running the command: ps -ef. There are a number of processes that display getty and he is afraid that an unauthorized user is attached to the system. How should you respond?
answer
Assure the user that this is normal
question
Which command displays in the most detail all the processes that are running?
answer
ps -ef
question
You want to view all currently-running processes that include getty in the process name. Which command would you use?
answer
ps -A | grep getty
question
You answer a call from a number of users who cannot access the mail server. Which utility would you use to quickly see if the sendmail service is running?
answer
ps
question
Which command would you use to look for a potential resource hog on a workstation?
answer
top
question
You need to see a listing of running processes and system status such as a memory and CPU usage. Which command will produce the listing?
answer
top
question
Which is the default signal sent to processes by the kill utility?
answer
-15
question
A developer calls with a problem. They were trying to debug a new daemon and mistakenly places it on the production machine instead of on a lab machine. It has now entered runaway mode. The PID number is 2345 and attempts have been made to remove it with the standard kill command but it will not stop. Which command would you use to be assured that the process will terminate?
answer
Kill -9 2345
question
After a severe lightning strike nearby, a number of processes seem to be running on the server in runaway mode. Which utility terminates these processes by name, and not just by process ID number?
answer
killall
question
You have several processes running in the background as shown from the jobs command below: [1]+Running gedit & [2]+Stopped crontab e What command will bring the gedit program to the foreground?
answer
fg 1
question
You have a gedit process with a job ID of 6. Which command would you enter at the command prompt to send the process to the background?
answer
bg 6 (written)
question
You need to send a process to the foreground. Which command should you enter to identify the job ID for the process?
answer
jobs
question
Which kill option stops and restarts the process with the same Process ID (PID)?
answer
-SIGHUP
question
What is the result of the nohup gedit & command?
answer
gedit will start in the background and persist in the background after logging out of the shell
question
You have been called in to a remote site to troubleshoot a problem with a process that needs to be terminated. You are taken to the workstation with the problem and immediately realize that it is an implementation of Linux you have never worked with before. Which option would you use with the kill utility at the command prompt to see the valis signals available with Linux system you're not familiar with?
answer
kill -l (written)
question
You need to manage a process in the foreground by pressing Ctrl+C on the keyboard. What signal code is sent to the process?
answer
SIGINT
question
A developer calls with a problem. They were trying to debug a new daemon and mistakenly placed it on the production machine instead of on a lab machine. To ensure the CPU gives preference to other processes, you need to lower the daemon's priority. The PID number us 2345. Which command would you use to decrease the daemon's priority?
answer
renice -n 10 2345
question
You need to determine the priority of several processes. Which command should you enter to identify the process ID and nice value for each process?
answer
top
question
What would you enter at the command prompt to start the gedit process with the highest priority possible?
answer
nice -n -20 gedit (written)
question
Which of the following commands starts the gedit program with a priority 1 above the default nice priority?
answer
nice -n -1 gedit
question
Which command could you use to verify if a crontab file exists for user thobbs?
answer
crontab -l -u thobbs
question
You are editing the crontab file and want an entry to run every hour at five minutes past the hour. Which of the following entries will accomplish this?
answer
5* * * * /home/emmett/example.sh
question
You want to keep the gshant user from editing his respective crontab file in /var/spool/cron, but still allow all other users on the system to edit their respective crontab file. What is the full path and filename of the file you should edit?
answer
/etc/cron.deny (written)
question
Which file should you edit if you want to permit specific users to edit their respective crontab file, but deny all other users on the system from editing their crontab file?
answer
/etc/cron.allow
question
After logging in as root, you need to manage the crontab files for your Linux system. Which command should you use to edit the crontab file for the gshant user account?
answer
crontab -ue gshant
question
Which command should you enter at the command prompt to list the tasks in the at queue for the current user?
answer
at -l (written)
question
Which daemon must be running if you want to use the at command?
answer
atd
question
You want to keep the gshant user from using the at command, but still allow other users to use it. What is the full path and filename of the file you should edit?
answer
/etc/at.deny (written)
question
Which of the following statements best describes the effects of having only the gshant user account listed in the /etc/at.allow file?
answer
Only gshant and root can use the at command
question
What should be entered at the command prompt to remove tasks 2 and 3 in the at queue?
answer
atrm 2 3 (written)
question
If a system is down at the time a recurring regularly scheduled task is supposed to run, which task scheduling service will run the task when the system is back up again?
answer
anacron
question
What is the full path and filename of the file that is used to schedule tasks for the anacron daemon?
answer
/etc/anacrontab/ (written)
question
What service does cron rely on to run the scripts in the /etc/cron.daily, /etc/cron.weekly, and /etc/cron.monthly directories?
answer
ancron(written)
question
Anacron creates a timestamp file that tells you the last time a regularly scheduled job was run. What is the full path and name of the directory that contains these timestamps files?
answer
/var/spool/anacron/
question
What does the lprm command do?
answer
Remove jobs from the line printer print queue
question
What information about print jobs does the utility lpq display?
answer
-The username of the person who submitted the job -A numerical job ID that can be used to manipulate the job from other utilities
question
You want to send the yearend.txt file to the acctg printer. Which command would you use?
answer
lpr -P acctg yearend.txt
question
User badams sends two print jobs to the Marketing printer (the default printer). He notices the printer is stalled on the first document, and uses the lprm - command. What will be the result?
answer
Both of the jobs will be deleted
question
You want to configure your CUPS from a Web browser. Which command is correct?
answer
http://localhost:631
question
You have connected a new printer to a systemd-based Linux server. You cannot print to the new printer from a user workstation on the network. What tasks should you do first on the server?
answer
-Use rpm -qi cups or dnf list cups to make sure the CUPS daemon is installed -Use systemctl status cups to make sure CUPS printing service is running
question
You want to configure your CUPS from a Web browser. Which URL address and port should you enter within the Web browser's address field?
answer
http://127.0.0.1:631 (written)
question
You are using the cupsctl command to configure the /etc/cups/cupsd.conf file. Which cupstl option will enable the sharing of the locally-connected printer to other computers on the network?
answer
--share-printers (written)
question
You are configuring the /etc/cups/cupsd.conf file. Which command should you use to prevent remote printers from being displayed on the local system?
answer
cupsctl --no-remote-printers
question
Which of the following lines in the /etc/cups/cupsd.conf file will configure CUPS to listen for print jobs sent only from the local system?
answer
Listen localhost:631
question
What should you enter at the command prompt to print 23 copies of the comparables file on the homeprint printer?
answer
lpr -P homeprint - #23 comparables (written)
question
Which lpr option should you use to change the page width of the print job?
answer
-w
question
Which command will show the contents of all the print queues on your Linux system?
answer
lpq -a (written)
question
Which of the following commands removes print job 11 from the hp7 printer?
answer
cancel -P hp7 11
question
Which of the following lines in the /etc/cups/cupsd.conf file will configure CUPS to listen for print jobs coming in on the server's network interface with the IP address 192.168.0.1 through the IPP port?
answer
Listen 192.168.0.1:631
question
For what purpose would you edit the /etc/localtime file?
answer
Set the current time zone
question
You need to create a symbolic link to the /usr/share/zoneinfo/EST time zone file that permanently alters the time zone for the system. What do you enter at the command prompt to accomplish this?
answer
ln -s /usr/share/zoneinfo/ES (written)
question
What is the full path to the directory on a Linux system that contains multiple files and directories used for selecting a time zone?
answer
/usr/share/zoneinfo (written)
question
Which command should you use to change the timezone (TZ) environment variable?
answer
-tzconfig -tzselect
question
You need to set the system date and time using the date command. Which date option should you use?
answer
-s
question
A Linux system can determine the time and date in which of the following ways?
answer
-It can use NTP to set time -It can set the system clock to the local time
question
You have a large TTCP/IP network and want to keep hosts' real time clocks synchronized. What protocol should you use?
answer
NTP
question
You are using a systemd-based Linux system and have made changes in the /etc/ntp.conf file. Which of the following commands should you use to implement these changes?
answer
Systemctl restart ntpd
question
You are managing system time on your Linux computer, and you need to change the settings to point to a local NTP server IP address. What is the full path and filename of the file you should edit?
answer
/etc/ntp.conf (written)
question
Which of the following commands manages the NTP daemon from the command line?
answer
ntpd
question
Your system time is over thirty minutes different than the time on the NTP time provider. When you use the ntpd command, the time is not updated. Which ntpd option should you include?
answer
-g (written)
question
You want to set the system time with the date command to UTC time. Which date options should you use?
answer
-u
question
You want to configure the NTP daemon to receive time from pool.ntp.org. What entry should you place in the /etc/ntp.conf file?
answer
server pool.ntp.org
question
Which of the following commands will set the system time to match the time server on the network at 192.168.1.10?
answer
Netdate 192.168.1.10
question
You need to install an e-mail server. Which of the following applications are valid Linux e-mail applications?
answer
-Sendmail -Postfix
question
What do you enter at the command prompt to display the contents of an MTA mail queue?
answer
mailq (written)
question
Which of the following MTAs use the QMQP and QMTP protocols?
answer
qmail
question
Which of the following MTAs are modular?
answer
-postfix -qmail
question
By default, which protocol is used by an MTA to send messages to other MTAs?
answer
SMTP
question
Which of the following are common protocols used by MTAs to send messages to MUAs?
answer
-POP3 -IMAP
question
Recently, you updated the /etc/aliases file with several email aliases. What command do you use at the command prompt to update /etc/aliases.db file?
answer
newaliases (written)
question
Which of the following files stores the aliasing information for MTAs?
answer
/etc/aliases.db
question
You are logged in as gshant, and you want to forward your mail to the dwant user on the local network. Which file should you edit to redirect the mail for a gshant user?
answer
~/.forward (written)
question
What is the path and filename of the file that contains mail for the gshant user account?
answer
/var/spool/mail/gshant (written)
question
Which of the following directories contains email for each user account on the system?
answer
/var/spool/mail
question
Which database object in an SQL table represents attributes?
answer
columns
question
Enter the SQL command that will list all tables in the grades database.
answer
SHOW TABLES grades; (written)
question
Which of the following SQL command will group information in a list?
answer
GROUP BY
question
Which SQL database object represents a single entity or item?
answer
record
question
Which clause should you add to the SELECT command to filter results from an SQL database?
answer
WHERE (written)
question
You need to show the contents of the location and price fields in the shirt table in an SQl database. Which SQL command should you use?
answer
SELECT location, price FROM shirt;
question
Which clause should you add to the SELECT command to sort results from an SQL database?
answer
ORDER BY (written)
question
You use the following command to retrieve specific entry information from the shirt table: SELECT location, price FROM shirt However, the command is not returning any information. What should you do?
answer
Add a semicolon to the end of the statement.
question
Which of the following statements best describes the purpose of the following SQL command? DELETE FROM shirts WHERE color='pink' AND type='polo' AND gender='male';
answer
Records for men's pink polo shirts will be removed from the shirts table.
Get an explanation on any task
Get unstuck with the help of our AI assistant in seconds
New