Articles

Linux – Multiple Choice Questions – MCQ – 181 to 210 Questions with Explanation

181. Which parameter allows syslog to receive network messages?

A. -n
B. -r
C. -m
D. -s

Answer – – B
Description – The syslog -r command is used to allow syslog to receive network messages.

182. Where are user crontab files stored?

A. /etc/crontab
B. /var/spool
C. /var/spool/cron
D. ~/.cron

Answer – – C
Description – User crontab files are stored in /var/spool/cron.

183. Which command(s) will decompress the file named file.gz?

A. uncompress file.gz
B. gunzip file.gz
C. tar zxvf file.gz
D. gzip -d file.gz

Answer – – B and D
Description – Files can be decompressed using the commands gunzip and gzip -d.

184. The proper way to tar files without compressing is:

A. tar -cvf backup.tar /home/Jason
B. tar -cvzf backup.tar /home/Jason
C. tar -zvf backup.gz /home/Jason

Answer – – A
Description – The command tar -cvf backup.tar /home/Jason will create a new file named backup.tar and list the files during creation. The -z option compresses the files.

185. To limit the amount of space core dumps may occupy use:

A. climit
B. ulimit
C. quota
D. ~/.ulimit

Answer – – B
Description – The size of .core files can be limited using ulimit.

186. The location of system logs can be specified in the file /var/log/syslog.conf file.

A. True
B. False

Answer – – B
Description – The location of system log files can be specified in the /etc/syslog.conf file.

187. _____________ is used to automatically run a job when system load is low.

Answer – – batch
Description – The batch utility allows jobs to automatically be run when system load is low.

188. Which type of backup is used to back up only the files that have changed since the last full backup?

A. Full
B. Partial
C. Incremental
D. Differential

Answer – – D
Description – Differential backups are used to back up files that have changed since the last full backup.

189. Which mode of cpio is used to copy files from an archive file?

A. Copy-out
B. Copy-in
C. Copy-pass

Answer – – B
Description – The cpio utility will copy files from an archive when used in the copy-out mode.

190. The tar utility is capable of using the gzip utility to compress files during archival.

A. True
B. False

Answer – – A
Description – The tar utility can use the gzip utility to automatically compress and uncompress files during file creation.

191. The default location of the system log containing login times for users is:

A. /var/log/utmp
B. /var/log/users
C. /var/log/lastlog
D. var/log/login

Answer – – C
Description – The log file containing login times for users is stored in /var/log/lastlog by default.

192. The ___________ command is used to rotate system logs.

Answer – – logrotate.
Description – The logrotate command is used to rotate system logs.

193. The gunzip utility is capable of uncompressing files that were compressed with both the gzip and compress utilities.

A. True
B. False

Answer – – A
Description – The gunzip utility can compress files created with gzip and compress.

194. Which option on the cron command is used to display entries in the current crontab?

A. -e
B. -r
C. -l
D. -s

Answer – – C
Description – The cron -l command is used to display the current contents of crontab.

195. In the /etc/syslog.conf file, which character is used to increase the speed of system logging?

A. *
B. =
C. !
D. –

Answer – – D
Description – The – character increases the speed of system logging by not synching the log after each write.

196. Which file is used to specify message levels that are displayed using the dmesg command?

A. dmesg.conf
B. kernel.h
C. kernel.conf
D. dmesg.h

Answer – – B
Description – The kernel.h file is used to specify the message levels that are displayed using dmesg.

197. Core files are viewed using which of the following?

A. coreview
B. debug
C. gbd
D. dumpview

Answer – – C
Description – Core dump files can be viewed using the GNU Debugger or gdb.

198. Which command would be used to view the queue for all printers?

A. lpd status all
B. lpq status all
C. lpc status all
D. lprm status all

Answer – – B
Description – The lpq command is used to view the contents of the print queue.

199. Which of the following spools print jobs to the print device?

A. lpq
B. lpc
C. lpd
D. lpr

Answer – – C
Description – The lpd daemon receives jobs from the user and spools them to the print device.

200. Which command would be used to print the file mydoc.txt to the printer named hplj?

A. lpr mydoc.txt
B. print -Phplj mydoc.txt
C. cat mydoc.txt | lpr hplj
D. lpr -Phplj mydoc.txt

Answer – – D
Description – The lpr command is used to manually print files, and the -P option specifies the destination printer.

201. To place all new print jobs on hold you would use the _____________ command.

Answer – – lpc hold all.
Description – The hold all option for lpc prevents new jobs from being spooled.

202. Which command should be used to restart the lpd daemon?

A. /etc/rc.d/init.d/lpd restart
B. /usr/sbin/lpd restart
C. /etc/init.d/lpd stop | start
D. kill -1 lpd

Answer – – A
Description – You should use the startup script, if available.

203. Which of the following is used to define a filter in the /etc/printcap file?

A. of
B. filter
C. fi
D. if

Answer – – D
Description – Remember that if means input filter.

204. Which sequence should be put at the end of a line in the /etc/printcap file, assuming this is not the last line in the printer block?

A. \:
B. :\
C. ;
D. ;\

Answer – – B
Description – The last line in a printer block ends in a semicolon.

205. Which command is used to move a print job to the top of the queue?

A. lpc
B. lprm
C. lpq
D. lpr

Answer – – C
Description – Use lpq to move a print job to the top of the queue.

206. Which definition in /etc/printcap disables print banners?

A. :sh:
B. :nb:
C. :nh:
D. :hs:

Answer – – A
Description – The :sh: definition disables banners.

207. Which definition in /etc/printcap sets the maximum print job size?

A. :ms:
B. :js:
C. :xm:
D. :mx#:

Answer – – D
Description – This sets the maximum job size in 1KB blocks.

208. To remove job 243 from the print queue, you would type ___________.

Answer – – lprm 243.
Description – The lprm command removes print jobs.

209. What needs to be done after editing the /etc/printcap file?

A. kill -1
B. /etc/rc.d/init.d/lpd restart
C. /etc/init.d/lpd reload
D. nothing

Answer – – B
Description – The lpd daemon should be restarted after any configuration changes.

210. Which of the following is not a valid lpc command?

A. refresh
B. up
C. down
D. enable

Answer – – A
Description – Up, down, and disable are valid commands, but refresh is not.

For Linux MCQ 211 – 240 | Main Linux MCQ Page

Have something to say about this article? Comment below or share it with us on Facebook or Twitter.

Yeahhub.com
Step by step hacking tutorials about wireless cracking, kali linux, metasploit, ethical hacking, seo tips and tricks, malware analysis and scanning.
https://www.yeahhub.com/

Leave a Reply

Your email address will not be published. Required fields are marked *

thirteen − twelve =