Linux – Multiple Choice Questions – MCQ – 31 to 60 Questions with Explanation

31. Which of the following is used to end the 408 process without allowing it to exit gracefully?

A. kill 408
B. kill –15 408
C. kill –1 408
D. kill –9 408

Answer – – D
Description – The –9 signal kills the process without allowing it to exit gracefully.

32. The _______ command runs the netscape process in the background.

Answer – – netscape &.
Description – The & symbol is used to start a process as a background job.

33. Which command is used to set the priority of a process when it is started?

A. jobs
B. renice
C. nice
D. top

Answer – – C
Description – The nice command is used to change the priority level of a process when it is started.

34. Which script generates a Makefile for your specific system?

A. ./gen
B. ./genmake
C. ./configure
D. ./config

Answer – – C
Description – The ./configure script runs through many tests and creates a Makefile for that specific system. The other options are invalid.

35. Which command installs compiled software?

A. make
B. ./install
C. make setup
D. make install

Answer – – D
Description – The make install command installs software that has already been compiled. The make command is used to compile the software.

36. Which packaging system does Red Hat use?

A. rpm
B. deb
C. tgz
D. rhp

Answer – – A
Description – Red Hat created the RPM packaging system. Debian uses .deb packages.

37. Which rpm option is used when you receive strange errors when installing packages, suggesting rpm database corruption?

A. rpm –fixdb
B. rpm –rebuilddb
C. rpm –updatedb
D. rpm –regendb

Answer – – B
Description – In some circumstances the RPM database can be corrupted, and the rpm –rebuilddb command will try to rebuild the database. The other options are invalid.

38. Which methods does RPM support to check package integrity? (Select all that apply.)

A. MD5
B. 3DES
C. PGP
D. GnuPG

Answer – – A,C and D
Description – All three are supported by RPM.

39. The command _____________________ would be entered to install the package named processor-4.2.i386.rpm.

Answer – – rpm -i processor-4.2-i386.rpm or rpm –install processor-4.2-i386.rpm.

40. Which tool is used to update the ld.so.cache file?

A. ldcache
B. ldupdate
C. ldconf
D. ldconfig

Answer – – D
Description – ldconfig creates the ld.so.cache file from ld.so.conf.

41. Which linking method creates smaller executable files?

A. Dynamic
B. Unlinked
C. Variable
D. Static

Answer – – A
Description – Dynamic linking does not compile the libraries into the executable like static linking, therefore making the executable smaller. The other options are invalid.

42. Which command(s) is/are used to remove an RPM package?

A. rpm –uninstall B. rpm –remove C. rpm -e D. rpm -u

Answer – – A and C
Description – Both rpm –uninstall and rpm -e remove RPM packages. The other options are invalid.

43. Which file specifies how an RPM source package is compiled?

A. Makefile
B. spec file
C. config file
D. .conf file

Answer – – B
Description – The spec file has the compilation options. A Makefile is used to compile source code not in RPM format.

44. Which tool is used to convert packages from one system to another?

A. alien
B. dpkg
C. apt
D. Pconvert

Answer – – A
Description – The alien tool converts package files. The dpkg tool is used to manipulate packages in Debian.

45. Which command is used to install a Debian package?

A. apt –install B. dpkg –install C. apt-get -I D. rpm -i

Answer – – B
Description – The dpkg –install command installs Debian .deb packages. The rpm tool is used with RPM packages. There is no -I option for apt-get.

46. Which command removes a Debian package, including its configuration files?

A. dpkg –remove B. dpkg -e C. apt-get purge D. dpkg -P

Answer – – D
Description – dpkg -P purges the package, which removes all files including the configuration files.

47. Which tool provides an easy-to-use interface to access Debian package management?

A. dselect
B. apt-get
C. dpkg
D. gnorpm

Answer – – A
Description – The dselect tool has all the functionality of dpkg, but uses a characterbased graphic interface instead of a command-line interface. apt-get is used to retrieve and install packages. gnorpm is a graphical front end to the rpm tool.

48. To change the sources for apt-get, the ________ file is edited.

A. sources.list
B. apt.sources
C. sources.apt
D. dpkg.sources

Answer – – A
Description – The sources for apt-get are stored in the sources.list file. The other options are invalid.

49. Which apt-get parameter updates the available package database?

A. upgrade
B. refresh
C. reload
D. update

Answer – – D
Description – The update command checks all the sources in the sources.list file and updates the package database accordingly. The upgrade command tells aptget to download and install all packages that are newer than those installed on the system. The other options are invalid.

50. The apt-get tool supports which of the following sources? (Select all that apply.)

A. FTP
B. HTTP
C. NFS
D. CD-ROM

Answer – – A,B,C and D
Description – The apt-get tool can get packages from local NFS and CD-ROM drives and from the Internet via FTP and HTTP.

51. Which command clears old packages from the Debian archives?

A. dpkg -clean
B. apt-get autoclean
C. dpkg -autoclean
D. dselect

Answer – – C
Description – The autoclean parameter removes only old packages that can no longer be retrieved. The other options are invalid.

52. alien supports which of the following package formats? (Select all that apply.)

A. RPM
B. .deb
C. BSD
D. .tgz

Answer – – A,B and D
Description – alien supports Red Hat, Debian, and Slackware package formats, but not BSD.

53. Which command converts an RPM package to Debian format?

A. alien -r package.rpm
B. alien -t package.rpm
C. alien -d package.deb
D. alien -d package.rpm

Answer – – C
Description – The -d option tells alien to create a Debian package. The -r option specifies RPM, and the -t option specifies .tgz.

54. Which of the following would be used to locate the following words: and, made, named, standard?

A. a*d
B. a.*d
C. [a..d]
D. a.d

Answer – – B
Description – In regular expressions, the . is used to specify any character and the * is used to specify any occurrence of the previous character including no occurrences.

55. Which command would search lines 2 through 20 of the file records for the characters 1st and replace them with the characters first?

A. sed ‘s2-20/1st/first/’ records
B. sed ‘2-20s/1st/first/’ records
C. sed ‘s2,20/1st/first/’ records
D. sed ‘2,20s/1st/first/’ records

Answer – – D
Description – When using addressing with the sed utility the line numbers and ranges are specified before the s command. The range is separated by a comma.

56. Which command would separate the file researchpaper into multiple files, each containing 60 lines? (Select all that apply.)

A. split -60 researchpaper
B. split -C 60b researchpaper
C. split -C 60 researchpaper
D. split -l 60 researchpaper

Answer – – A and D
Description – The -l option is used to specify the number of lines contained in each file using split. However, when no option is given the number specified is assumed to be the number of lines.

57. Which utility is used to combines the lines from two files? (Select all that apply.)

A. split
B. join
C. paste
D. cut

Answer – – B and C
Description – The paste and join utilities are used to combine lines from a file. The split command is used to divide a file into multiple pieces. cut removes text from a file.

58. Which of the following would send the data from the ls command to the file myfiles?

A. ls | myfiles
B. ls > myfiles
C. ls < myfiles
D. ls | xargs myfiles

Answer – – A
Description – Pipes are used to send data from one command to another.

59. Which of the following would be used to view the last five lines of the file myfiles?

A. tac myfiles
B. tail myfiles
C. tac -5 myfiles
D. tail -5 myfiles

Answer – – D
Description – The tail command is used to view the end of a file and the -5 option specifies the number of lines to view.

60. Which of the following allows you to view the file myfiles in octal format? (Select all that apply.)

A. od myfiles
B. od -t o myfiles
C. od -t x myfiles
D. od -o myfiles

Answer – – A and B
Description – The od utility is used to view files in octal format by default. The -t option, followed by o, is used to specify octal format.

For Linux MCQ 61 – 90 | Main Linux MCQ Page

You may also like:

Sarcastic Writer

Step by step hacking tutorials about wireless cracking, kali linux, metasploit, ethical hacking, seo tips and tricks, malware analysis and scanning.

Related Posts