Linux – Multiple Choice Questions – MCQ – 91 to 120 Questions with Explanation

91. How many primary and extended partitions are allowed on a hard disk?

A. 1
B. 2
C. 3
D. 4

Answer – – D
Description – Only four total partitions of primary and extended type can exist on a drive.

92. How many primary partitions are allowed on a hard disk?

A. 1
B. 2
C. 3
D. 4

Answer – – D
Description – Four primary partitions can exist on a single drive.

93. Before a file system can be examined using fsck it must first be ____________.

Answer – – unmounted.
Description – A file system must be unmounted before it can be inspected with fsck.

94. Which of the following shows the use of an absolute path?

A. ls
B. ls –al
C. ls /home/angie
D. /bin/ls

Answer – – D
Description – The absolute path to the ls command is /bin/ls.

95. The____________ command will display the contents of the current directory beginning with the letter a.

Answer – – ls a*.
Description – The wildcard is utilized to specify any character or set of characters, including none. This command would list files and directories with the name of simply a as well as all files and directories that begin with the letter a.

96. Which of the following commands will create a new file with the name ourgroup?

A. file ourgroup
B. touch ourgroup
C. ls ourgroup
D. mkfile ourgroup

Answer – – B
Description – Files can be created using the touch command if the filename specified doesn’t already exist. If the file exists then the access time is simply changed.

97. Which command is used to rename the ourgroup file to mygroup?

A. rn ourgroup mygroup
B. rn mygroup ourgroup
C. mv ourgroup mygroup
D. mv mygroup ourgroup

Answer – – C
Description – Files are renamed and moved using the mv command.

98. The ____________ command is used to copy files while converting them.

Answer – – dd
Description – The dd, or direct dump, command is used to convert and copy files.

99. Which directory contains the system kernel?

A. /etc
B. /
C. /boot
D. /proc

Answer – – C
Description – The system kernel is stored in the /boot directory.

100. Which directory contains the system configuration files?

A. /etc
B. /
C. /boot
D. /proc

Answer – – A
Description – The system configuration files are located in the /etc directory.

101. Which directory contains the root user’s home directory?

A. /home
B. /root
C. /sbin
D. /usr

Answer – – B
Description – The root user’s home directory is the /root directory.

102. Which directory contains the mail files?

A. /proc/mail
B. /var/spool
C. /var/mail
D. /usr/mail

Answer – – B
Description – Mail files are found in the /var/spool directory.

103. Which utility is used to update the slocate database?

A. locate
B. find
C. whereis
D. updatedb

Answer – – D
Description – The slocate database is updated using the updatedb command.

104. The __________ command is used to display the path to a specified command.

Answer – – which
Description – The which command displays the path to the specified command.

105. The default action of the ln command is to create a _______________.

Answer – – hard link
Description – By default, the ln command creates a hard link to the specified file.

106. Which of the following results when a soft link is copied?

A. A new copy of the soft link is created.
B. A hard link to the original file is created.
C. A hard link to the soft link is created.
D. A new copy of the original file is created.

Answer – – D
Description – When a soft link is copied, a new copy of the original file is stored at the target location.

107. Which of the following represents read, write, and execute permissions for owner and read and execute for all others?

A. 755
B. 022
C. 733
D. 557

Answer – – A
Description – The permission 7 presents the owner of the file with read (4), write (2), and execute (1) permissions. The group and other permissions here are read (4) and execute (1) for a total of 5.

108. Which umask would create the default file permissions of read, write, and execute permissions for owner and read and execute for all others?

A. 755
B. 022
C. 220
D. 002

Answer – – B
Description – The umask used to create default permissions of 755 is 022. The umask is used to filter permissions from those that are assigned to new files by default. This causes the umask to be the inverse of the permissions assigned to the files. In this case, the umask filters the write permissions from the group and other permissions.

109. Which command is used to change permissions of a file?

A. chown
B. chperm
C. chgrp
D. chmod

Answer – – D
Description – Permissions on files and directories is changed using the chmod command. The chown command is used to change ownership while the chgrp command changes the group assigned to the files or directories. The chperm command is invalid.

110. Which value is used to represent the sticky bit?

A. 1
B. 2
C. 3
D. 4

Answer – – A
Description – The sticky bit value is (1) while the SUID value is 4 and SGID value is 2.

111. Which command (with options) is used to create a new archive file named ang_home.tar.gz that is compressed containing the /home/angie directory contents?

Answer – – tar –czf ang_home.tar.gz /home/angie.
Description – The tar command is used with the c option to create a new archive and the z option specifies that the archive is compressed using the gzip utility. The f option specifies that the archive should be created as the specified file. Utilizing the absolute path ensures that all data within that directory is included in the archive.

112. Which command is used to view quota information for a specific user?

A. edquota
B. quota
C. repquota
D. quotaon

Answer – – B
Description – Quotas for specific users are viewed with the quota command. The repquota command will provide a report of quota usage for all users. The edquota command is used to edit quotas, and quotaon is used to enable quotas on the system.

113. File systems utilizing quotas are configured in which file?

A. /etc/services
B. /etc/hosts
C. /etc/fstab
D. /etc/mtab

Answer – – C
Description – File systems utilizing quotas are configured in the /etc/fstab file.

114. Which of the following would display all man page section numbers with the ls command in their description?

A. man –w ls
B. man –a ls
C. man –f ls
D. man –K ls

Answer – – A
Description – The man –w command is used to search the descriptions of a man page document for a specific string.

115. Which of the following commands would display all man page entries for the ls command?

A. man –w ls
B. man –a ls
C. man –f ls
D. man –K ls

Answer – – B
Description – The man –a command displays all matching man page entries for the command specified.

116. Which of the following commands would display the path to the man page for the ls command?

A. man –w ls
B. man –a ls
C. man –f ls
D. man –K ls

Answer – – A
Description – The man –w command displays the path to the man page located.

117. Which of the following would search the content of all man pages for the ls command?

A. man –k ls
B. man –a ls
C. man –f ls
D. man –K ls

Answer – – D
Description – The man –K command searches all man page entries for the string specified.

118. The ___________ command functions like the man –f command.

Answer – – whatis.
Description – The whatis command functions like man –f.

119. The ___________ command functions like the man –k command.

Answer – – apropos.
Description – The apropos command functions like man –k.

120. Which section of man page documents contains information on kernel errors?

A. 1
B. 2
C. 5
D. 8

Answer – – B
Description – Man page section 2 contains information on kernel errors.

For Linux MCQ 121 – 150 | 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