361. You are told by a co-worker that information pertaining to the syslog command can be found in man page 3. How would you view this information?
A. man syslog 3
B. man syslog -3
C. man -3 syslog
D. man 3 syslog
Answer – – D
Description – The man page can be specified using the syntax man NUMBER command. This correct syntax is shown as man 3 syslog.
362. Which command is not used to view the contents of a file?
A. cat
B. more
C. less
D. expand
Answer – – D
Description – The cat, more, and less utilities are all used to view file contents. The expand utility is used to convert tab characters to spaces.
363. The ________ command is used to unmount a file system.
Answer – – umount
Description – File systems are unmounted using the umount command.
364. The ________ command will display previously entered commands.
Answer – – history
Description – The history command allows you to view previously entered commands.
365. What type of information might you find using www.deja.com?
A. man pages
B. Usenet postings
C. software patches
D. kernel updates
Answer – – B
Description – The Web site www.deja.com enables you to search Usenet postings.
366. Which directory utilizes no disk space?
A. /proc
B. /boot
C. /root
D. /local
Answer – – A
Description – The /proc directory is virtual. It is used to store information about system resources and processes.
367. The __________ command is used to perform a consistency check on file systems.
Answer – – fsck
Description – The fsck utility is used to verify and correct problems on file systems.
368. Which command would create a file called mydirlisting that includes a detailed listing of all the files and directories located within your home directory?
A. ls -alR $HOME > mydirlisting
B. ls -d > mydirlisting
C. mydirlisting < ls -al $HOME
D. ls -al | mydirlisting
Answer – – A
Description – The -R option specifies that a recursive directory listing be performed. Data is sent to a file when the > symbol is used for redirection.
369. The ________ command is used to create an ext2 file system.
Answer – – mkfs
Description – The mkfs tool is used to create a file system.
370. You’re repairing the master boot record on a system. You have booted the system via a boot disk and currently have the root volume mounted to /recover. How would you reinstall LILO?
A. lilo -r /recover/boot
B. lilo -f /recover
C. lilo -r /recover
D. lilo -r /recover -b /recover/boot
Answer – – C
Description – The -r parameter on lilo specifies a different root directory. This is used when you are doing recovery and /etc and /boot are actually mounted under a new root.
371. The __________ file needs to be updated when a new library is added.
Answer – – ld.so.conf.
Description – Whenever a new library is added manually, you must edit the ld.so.conf file and run ldconfig.
372. Which command removes a package named editor-2.0.i386.rpm?
A. rpm -i editor-2.0.i386.rpm
B. rpm -e editor-2.0.i386.rpm
C. dpkg -install editor-2.0.i386.rpm
D. apt-get install editor-2.0.i386.rpm
Answer – – B
Description – The -e parameter is used to remove a package with RPM. The other choices install packages.
373. To make a single change to the kernel configuration before compiling, you would edit which file?
A. /usr/src/linux/Makefile
B. /usr/src/linux/.config
C. /usr/src/linux/config
D. /usr/src/linux/configure
Answer – – B
Description – By default, kernel configuration options are stored in the .config file.
374. Which command will tell you which package owns the file /etc/printcap?
A. dpkg -F /etc/printcap
B. rpm -f /etc/printcap
C. who /etc/printcap
D. rpm -qf /etc/printcap
Answer – – D
Description – The -qf parameters tell RPM to query (-q) the database to see who owns a certain file (-f).
375. The __________ file is executed for all nonlogin bash sessions.
Answer – – ~/.bashrc or /etc/bashrc.
Description – The .bashrc script is executed when a bash shell is started, but not when logging in. For example, if you open a new xterm in X11 with bash, this script will run.
376. Which command shows the route between your host and the remote host www.somedomain.org?
A. traceroute -n www.somedomain.org
B. route www.somedomain.org
C. ping -r www.somedomain.org
D. route -n www.somedomain.org
Answer – – A
Description – traceroute is used to show the path a packet takes to a destination. The ping command tells you only if a remote host is up, and the route command is used to modify the local routing table.
377. Which command is the best to use to find a contact name for another domain?
A. nslookup
B. whoinfo
C. whois
D. dig
Answer – – C
Description – The whois command shows contact information relating to a domain. The nslookup and dig tools are used to check DNS information. The whoinfo command is invalid.
378. Which command(s) must be run after the inetd.conf file is updated?
A. /etc/rc.d/init.d/inetd restart
B. kill -1 inetd
C. kill -1 `cat /var/run/inetd.pid`
D. No command needed.
Answer – – A and C
Description – When a change is made to inetd.conf, the daemon must be restarted by either using the script or issuing a HUP.
379. The __________ file can be created to keep nonroot users from logging in to the system.
Answer – – /etc/nologin.
Description – This file causes the system to disallow all nonroot logins.
380. Which command(s) is/are used to enable shadow passwords?
A. shadow
B. pw-conv
C. pwconv
D. grpconv
Answer – – C and D
Description – The pwconv and grpconv tools convert the passwd and group files to use shadow passwords. The other commands are fake.
381. Which command(s) is/are used to decompress the file mydoc.gz?
A. gunzip mydoc.gz
B. tar -zxv mydoc.gz
C. gzip -d mydoc.gz
D. gunzip -d mydoc.gz
Answer – – A, C and D
Description – All three methods can be used to ungzip the file. The tar command does support gzip, but is used only when uncompressing a tar file.
382. To activate all swap partitions on the system you would use the _______ command (with options).
Answer – – swapon -a.
Description – The swapon -a command enables all swap partitions in the /etc/fstab file.
383. Which command displays the output of the utmp file?
A. what
B. who
C. last
D. when
Answer – – C
Description – The last command shows the utmp file by default, and the who command uses the wtmp file. The other two commands are invalid.
384. The _______ tool is used to control the Apache httpd service.
A. apached
B. httpdctl
C. htmgr
D. apachectl
Answer – – D
Description – The Apache package includes the apachectl tool to manage the httpd daemon. The other Answers are invalid.
385. Which command displays queue information for all local printers?
A. lpq -a
B. lpc -a
C. printq
D. lpq -v
Answer – – A
Description – The lpq tool is used to manage and view the print queue, while lpc is used to manage the printing system. The lpq –a command will display information for all local printers. The printq command is invalid.
386. Which disk partitioning tool provides a GUI?
A. fdisk
B. cfdisk
C. Disk Druid
D. gnodisk
Answer – – C
Description – Disk Druid is a GUI tool supplied by Red Hat. Answers A and B provide text interfaces. Answer D is invalid.
387. The ________ command shows all loaded kernel modules.
Answer – – lshmod.
Description – The lsmod command displays all loaded modules.
388. Which command in vi searches for the text Linux?
A. ESC, s, Linux
B. ESC, f, Linux
C. \Linux
D. /Linux
Answer – – D
Description – The forward slash tells vi to search the file for the given expression. The s command is used for substitution, while the f command searches for a single character in the current line. Answer C is invalid.
389. Which command must be run when a new mail alias is added?
A. newalias
B. newaliases
C. genaliases
D. kill -1 `cat /var/run/sendmail.pid`
Answer – – B
Description – Any time an alias is added, the newaliases command needs to be run. Answers A and C are invalid. Restarting the sendmail process will not activate the new aliases.
390. You want to make the directory /share available via NFS. All users on your local network should be allowed to read and write files. Which of the following is correct, assuming that your local network is 192.168.1.0 and your machine is part of the DNS domain mydomain.org?
A. /local 192.168.1.0/255.255.255.0(rw)
B. /local 192.168.1.0/*(rw)
C. /local *.org(rw)
D. /local ALL.mydomain.org(rw)
Answer – – A
Description – Choice B is invalid due to the subnet mask. Choice C allows anyone from a .org domain to have access. The ALL wildcard is invalid as well.
For Linux MCQ 391 – 420 | Main Linux MCQ Page
You may also like:- Top 10 Computer Fundamentals Questions and Answers
- Quiz Time – Testing Your Knowledge on Popular Computer Questions
- 15 Important Questions Related to Computer
- Certified Ethical Hacker v10 – Multiple Choice Questions with Answers – Part 14
- Certified Ethical Hacker v10 – Multiple Choice Questions with Answers – Part 13
- Certified Ethical Hacker v10 – Multiple Choice Questions with Answers – Part 12
- Certified Ethical Hacker v10 – Multiple Choice Questions with Answers – Part 11
- Certified Ethical Hacker v10 – Multiple Choice Questions with Answers – Part 10
- Certified Ethical Hacker v10 – Multiple Choice Questions with Answers – Part 9
- Certified Ethical Hacker v10 – Multiple Choice Questions with Answers – Part 8