Linux MCQ: Linux Multiple Choice Questions and Answers

Linux MCQ with answers and explanations for placement tests and job interviews. These solved Linux MCQs are useful for the campus placement for all freshers including Engineering Students, MCA students, Computer and IT Engineers, etc.

Our Linux MCQ (Linux multiple Choice Questions ) focuses on various Linux commands and their command-line options & parameters. It will be useful for anyone learning Linux Basics, Essentials, and/or Fundamentals. We will regularly update the quiz and most interesting thing is that questions come in a random sequence. So every time you will feel new questions.

If you want to learn Linux in detail you can follow these courses created by industry experts, Trial of some courses is free.

Guideline of Linux MCQ:

This Linux MCQ is intended for checking your Linux knowledge. It takes 1 hour to pass the Linux MCQ. If you don’t finish the Linux MCQ within the mentioned time, all the unanswered questions will count as wrong. You can miss the questions by clicking the “Next” button and return to the previous questions by the “Previous” button. Every unanswered question will count as wrong. MCQ on Linux has features of randomization which feel you a new question set at every attempt.

In this Linux Quiz, we have also implemented a feature that not allowed the user to see the next question or finish the quiz without attempting the current Linux MCQ.

0 votes, 0 avg

You have 1 hours to take the Linux MCQs

Your time has been Over.


Linux MCQ

Linux MCQ: Linux Multiple Choice Questions and Answers

1 / 60

What does the /etc/nsswitch.conf file manage?

2 / 60

You are managing an Apache web server on a system using SELinux. By default, it cannot read personal webpages in users' home directories. What SELinux boolean would you set to allow this?

3 / 60

What is the /etc/hosts file used for?

4 / 60

How could one search for the file foo.txt under the directory /home?

5 / 60

When would this system cron job run its task?

0 1 * * *

6 / 60

A backup drive was created using dd to make a bit-for-bit copy. When the drive is inserted into an iSCSI target before it is booted up, the data appears to be missing. What happened?

7 / 60

Linux file access control lists (ACLs) are _.

8 / 60

How can the current directory and its subdirectories be searched for the file name MyFile.xml?

9 / 60

What is not inherited by the child process?

10 / 60

In a systemd-based OS, you can change the system hostname by editing /etc/hostname manually and then doing what?

11 / 60

Which command is used to make a shell variable known to subsequently executed programs?

12 / 60

What is the preferred source for the installation of new applications?

13 / 60

Why doesn't passwd -l keep a user from logging in via other methods?

14 / 60

Packages can be downloaded but not installed with yum or dnf by specifying which option?

15 / 60

To configure the Kerberos client, which command should you use to import the keytab file?

16 / 60

Which command allows you to do packet analysis from the command line?

17 / 60

When using iproute2, how do you show routing information for an IPv6 network?

18 / 60

Which of the following commands can be used to extract files from an archive?

19 / 60

ifconfig has been deprecated. What command is now recommended for changing IP addresses in the live config?

20 / 60

In an extended regular expression, you would use (pattern){3} to match three instances of the pattern. How would you match the same thing with an extended glob?

21 / 60

What is a major advantage of using Logical Volume Management (LVM)?

22 / 60

To mount a drive-by its ID, what command would you use first to retrieve it?

23 / 60

What is the job of the NetworkManager daemon?

24 / 60

To search from the current cursor position up to the beginning of the file using VIM, type __ and then the search criteria.

25 / 60

Which command will tell you how long a system has been running?

26 / 60

How would you describe PCP (Performance Co-Pilot)?

27 / 60

When configuring a Samba share, how would the engineering group be specified in the smb.conf?

28 / 60

What does this command string do?

find / -size +10M -exec ls -l {} ;

 

29 / 60

What is the key difference between a redirect (>) and piping to the tee command?

30 / 60

Which of the following will change the group that is associated with a file?

31 / 60

When archiving files, which command will preserve all file attributes including ACLs and SELinux security context?

32 / 60

The ssh-copy-id command copies _ to the remote host.

33 / 60

What is one major difference between brace expansion and globs?

34 / 60

What character class is equal to this set?

[0-9]

35 / 60

Which command would you use to get comprehensive documentation about any command in Linux?

36 / 60

Why is the passwd command able to modify the /etc/passwd file?

37 / 60

Which of the following is a combined audio/video interface for the transmission of digital data?

38 / 60

What command is used to determine the amount of disk usage for a directory?

39 / 60

When a user deletes a file using the rm command, Linux will _.

40 / 60

You want to resolve a long list of DNS names using dig. What should you do?

41 / 60

Which is a suitable command to find the next appearance of the word hidden in a man page being viewed from the command line?

42 / 60

Which command will display the last line of the file foo.txt?

43 / 60

Which command in Bash executes the last line in the shell history that starts with ls?

44 / 60

To remove all ACLs from a directory, use setfacl with which options?

45 / 60

Which of the following commands can be used to create a file?

46 / 60

You send an email to a remote client using the following syntax. What will be in the body of the email?

date | mail -s "This is a remote test" user1@rhhost1.localnet.com

 

47 / 60

Assume the variable myNumber holds a string consisting of 10 digits. What will this command output?

echo \$myNumber | sed -e 's/^[[:digit:]][[:digit:]][[:digit:]]/(&)/g'

 

48 / 60

Why might would you use the usermod command ?

49 / 60

What NFS option allows the root user to access NFS shares as the root user?

50 / 60

What would this command output?

ps -e --format uid,pid,ppid,%cpu,cmd

 

51 / 60

What are the three sets of permission for a file?

52 / 60

Which option will cause the echo command NOT to output a trailing newline?

53 / 60

Which command displays the list of groups to which a user belongs?

54 / 60

In the Bash shell, what is the difference between piping into | and piping into |&?

55 / 60

Which of the following can be used to access the command line?

56 / 60

Which network interface always exists in a Linux system?

57 / 60

What command would you use to resize an LVM volume group to include an additional physical volume?

58 / 60

Which of the following directories is often used to store log files?

59 / 60

What would this locate command show?

locate --regexp '^/usr.*pixmaps.*jpg$'

 

60 / 60

Which of the following commands can be used to determine the time of the last login of a given user?

Your score is

The average score is 0%

0%

Recommended Articles for you: