Unit 09- Processes and System Services – Flashcards
Unlock all answers in this set
Unlock answersquestion
Which command displays the PPID?
answer
ps -f (-f= detailed information, -A= all processes, -u= user ID)
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. (A getty process represents a terminal that does not currently have a user. This is normal to see on a system that is configured for more than one terminal.)
question
Which command displays in the most detail all the processes that are running?
answer
ps -ef (-e is the same as -A= all processes, -f= detailed information)
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 (-A= all processes, -a= shows processes of specific users, and |find- searches "files")
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 (process)
question
Which command would you use to look for a potential resource hog on a workstation?
answer
top (real time viewing)
question
You need to see a listing of running processes and system status such as memory and CPU usage. Which command will produce the listing?
answer
top (The ps -A command produces a listing of all running processes but no information about memory or CPU. There are no commands systat or cpustat.)
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 placed 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 (kill -2 first, -15 next, -9 last)
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 (pkill- search criteria, kill- PID)
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 (not 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? (typed)
answer
bg 6
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 (not ps, top, or nice)
question
Which kill option stops and restarts the process with the same Process ID (PID)?
answer
-SIGHUP (-SIGINT= -2, -SIGTERM=-15, -SIGKILL= -9)
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 valid signals available with this Linux system you're not familiar with? (typed)
answer
kill-I (lower L)
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 (same as -2)
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 is 2345. Which command would you use to decrease the daemon's priority?
answer
renice -n 10 2345 (decrease, or make slower—backwards)
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 (nice and renice make adjustments, jobs doesn't display PID or nice)
question
What would you enter at the command prompt to start the gedit process with a highest priority possible? (typed)
answer
nice -n -20 gedit
question
What is the default nice value for a process not executed with the nice command? (typed)
answer
0 (not the priority= 80, but nice=0)
question
Which of the following commands starts the gedit program with a priority 1 above the default nice priority?
answer
nice -n -1 gedit (above, or 1 faster than default... Backwards.... Default = 0)
question
Which command could you use to verify if a crontab file exists for user thobbs?
answer
crontab -I -u thobbs (-r= remove, -e=edit, -a=append) (-l=list, -u=user)
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 (min, hour, day, month, dpw)
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? (typed)
answer
/etc/cron.deny (define deny, allow rest)
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 (allow takes precedence over deny, define allowed, block rest)
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 (-u= username, -e=edit) (Don't use vi)
question
Which command should you enter at the command prompt to list the tasks in the *at* queue for the current user? (typed)
answer
atq (at "query")
question
Which daemon must be running if you want to use the at command?
answer
atd (at "daemon") (user systemctl status / is-enabled)
question
You want to keep the gshant user from using the at command, but still allow all other users to use it. What is the full path and filename of the file you should edit? (typed)
answer
/etc/at.deny (same as cron)
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? (typed)
answer
at -d 2 3 (or) atrm 2 3
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? (typed)
answer
/etc/anacrontab (don't forget the "tab," just like /etc/crontab)
question
You have an anacrontab file with the following settings: RANDOM_DELAY=35 START_HOURS_RANGE= 17-23 #period in days delay in minutes job-identifier command 1 5 cron.daily nice run-parts /etc/cron.daily 7 20 cron.weekly nice run-parts /etc/cron.weekly @monthly 50 cron.monthly nice run-parts /etc/cron.monthly Between which hours of the day will tasks scheduled with anacron start to run? If the system was down during the time period a weekly task was scheduled to run, what is the minimum amount of time anacron will wait, after the system is back up, before running the task? If the "delay in minutes" for daily tasks is 5 minutes, how much time will anacron add to the delay of 5 minutes before it runs the scheduled daily task?
answer
1. Between 5pm and 11pm 2. 20 Minutes 3. A randomly chosen number of minutes between 0 and 35 (1= days, 7=mins) (7=days, 20=mins)
question
What *service* does cron rely on to run the scripts in the /etc/cron.daily, /etc/cron.weekly, and /etc/cron.monthly directories? (typed)
answer
Anacron
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 timestamp files?
answer
/var/spool/anacron (Unchecked?)
question
What does the Iprm command do?
answer
Removes jobs from the line printer print queue
question
What information about print jobs does the utility Ipq display? (Select two.)
answer
A numerical job ID that can be used to manipulate the job from other utilities The username of the person who submitted the job
question
You want to send the yearend.txt file to the acctg printer. Which command would you use?
answer
Ipr -P acctg yearend.txt (lower L) (lpr= print, lpc=management info)
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 Iprm - command. What will be the result?
answer
Both of his jobs will be deleted. (regular user= only they jobs will be removed)
question
You want to configure your CUPS from a Web browser. Which command is correct?
answer
http://localhost:631 (always port 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? (Select two.)
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? (typed)
answer
http://localhost:631 (forward "/", not "")
question
You are using the cupsctl command to configure the /etc/cups/cupsd.conf file. Which cupsctl option will enable the sharing of the locally-connected printer to other computers on the network? (typed)
answer
--share-printers (must use "s"... printerS)
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 (not --no-remote-admin, or --no-share 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 (there can't be an IP)
question
What should you enter at the command prompt to print 23 copies of the comparables file on the homeprint printer? (typed)
answer
Ipr -P homeprint -#23 comparables (printer then the number)
question
Which Ipr 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? (typed)
answer
lpq -a
question
Which of the following commands removes print job 11 from the hp7 printer?
answer
cancel -P hp7 11 (not lprm)
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 (match the IP)
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? (typed)
answer
In -s /usr/share/zoneinfo/EST /etc/localtime (symbolic link | time zone file | system time zone reference file)
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? (typed)
answer
/usr/share/zoneinfo (/etc/localtime = the system file reference link)
question
Which command should you use to change the time zone (TZ) environment variable? (Select two.)
answer
tzconfig tz select (date= shows time, netdate= syncs time)
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? (Select two.)
answer
It can set the system clock to the local time. It can use NTP to set time. (SMTP and NNTP don't)
question
You have a large TCP/IP network and want to keep hosts' real time clocks synchronized. What protocol should you use?
answer
NTP (Network Time Protocol)
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 (not enable)
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? (typed)
answer
/etc/ntp.conf (use vi to insert a new server) (/ect/localtime= time zone data)
question
Which of the following commands manages the NTP daemon from the command line?
answer
ntpd (ntpq= queries, ntpdate= syncs time to prevent insane time)
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? (typed)
answer
-g (ntpd -g= ignore insane time)
question
You want to set the system time with the date command to UTC time. Which date option should you use?
answer
-u (-d= displays date specified by date, -s= sets date and time)
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 (long vi file with list of servers)
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 (ip or domain name) (not date, hwclock, or ntpd)
question
You need to install an e-mail server. Which of the following applications are valid Linux e-mail applications? (Select two.)
answer
Postfix Sendmail
question
What do you enter at the command prompt to display the contents of an MTA mail queue? (typed)
answer
mailq
question
Which of the following MTAs use the QMQP and QMTP protocols?
answer
qmail
question
Which of the following MTAs are modular? (Select two.)
answer
qmail postfix (in alphabetical order, the 2 in the middle are modular: exim, postfix, qmail, sendmail)
question
By default, which protocol is used by an MTA to send messages to other MTAs?
answer
SMTP (Simple Mail Transfer Protocol)
question
Which of the following are common protocols used by MTAs to send messages to MUAs? (Select two.)
answer
IMAP POP3 (From the last MTA to the R. MUA)
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? (typed)
answer
newaliases
question
Which of the following files stores the aliasing information for MTAs?
answer
/etc/aliases.db (not ~/.forward)
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? (typed)
answer
-/.forward (~/= home dir, "."= hidden file)
question
What is the full path and filename of the file that contains mail for the qshant user account? (typed)
answer
/var/spool/mail/gshant (don't forget the user)
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 (record=row)
question
Enter the SQL command that will list all tables in the grades database. (typed)
answer
SHOW TABLES grades; (not SELECT * FROM grades;)
question
Which of the following SQL commands will group information in a list?
answer
GROUP BY (located under the SELECT command)
question
Which SQL database object represents a single entity or item?
answer
record (not primary key)
question
Which clause should you add to the SELECT command to filter results from an SQL database? (typed)
answer
WHERE
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; (need the "," without the "()" )
question
Which clause should you add to the SELECT command to sort results from an SQL database? (typed)
answer
ORDER BY (not SORT)
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. (No other commands are needed)
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. (not pink "or" polo... pink "and" polo)