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

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

2 / 60

What are the three sets of permission for a file?

3 / 60

What would this command output?

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

 

4 / 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'

 

5 / 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?

6 / 60

What is not inherited by the child process?

7 / 60

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

8 / 60

What is one major difference between brace expansion and globs?

9 / 60

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

10 / 60

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

11 / 60

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

12 / 60

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

13 / 60

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

14 / 60

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

15 / 60

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

16 / 60

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

17 / 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?

18 / 60

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

19 / 60

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

20 / 60

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

21 / 60

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

22 / 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?

23 / 60

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

24 / 60

Linux file access control lists (ACLs) are _.

25 / 60

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

26 / 60

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

27 / 60

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

28 / 60

Which network interface always exists in a Linux system?

29 / 60

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

30 / 60

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

31 / 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?

32 / 60

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

33 / 60

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

34 / 60

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

35 / 60

What does this command string do?

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

 

36 / 60

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

37 / 60

Why might would you use the usermod command ?

38 / 60

What character class is equal to this set?

[0-9]

39 / 60

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

40 / 60

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

41 / 60

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

42 / 60

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

43 / 60

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

44 / 60

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

45 / 60

What is the /etc/hosts file used for?

46 / 60

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

47 / 60

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

48 / 60

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

49 / 60

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

50 / 60

What is the job of the NetworkManager daemon?

51 / 60

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

52 / 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

 

53 / 60

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

54 / 60

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

55 / 60

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

56 / 60

What would this locate command show?

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

 

57 / 60

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

58 / 60

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

59 / 60

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

60 / 60

When would this system cron job run its task?

0 1 * * *

Your score is

The average score is 0%

0%

Recommended Articles for you:

Leave a Reply

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