0% found this document useful (0 votes)
608 views

Top 50 Linux MCQs (Multiple-Choice Questions and Answers)

The document provides a summary of 20 multiple choice questions about Linux. It covers topics like who founded the Linux kernel, the core of the Linux operating system, directories in the binary directory, commands to count lines in a file, remove files, delete characters, check the current directory, see hidden files, copy and move files, rename files, and more. The questions are followed by explanations and an option to discuss each question.

Uploaded by

y.al
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
608 views

Top 50 Linux MCQs (Multiple-Choice Questions and Answers)

The document provides a summary of 20 multiple choice questions about Linux. It covers topics like who founded the Linux kernel, the core of the Linux operating system, directories in the binary directory, commands to count lines in a file, remove files, delete characters, check the current directory, see hidden files, copy and move files, rename files, and more. The questions are followed by explanations and an option to discuss each question.

Uploaded by

y.al
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 28

No more Pay

per Captcha Open


Captcha AI

Home » MCQs

Linux MCQs

Linux is an open-source Unix-like operating system that is based on the Linux kernel.
The kernel was first released on September 17, 1991, by Linus Torvalds. Linux is
typically packaged in a Linux distribution. The Linux operating system comprises
several different pieces: Bootloader, Kernel, Init system, Daemons, Graphical server,
Desktop environment, Applications, etc.

Linux MCQs: This section contains multiple-choice questions and answers on the Linux
operating system. It will help the students to test their skills and prepare well for their
exams.

List of Linux MCQs


1. Who founded Linux Kernel?

A. Ken Thompson and Dennis Ritchie


B. Linus Torvalds
C. Linus Torvalds and Ken Thompson
D. Richard Stallman

Answer: B) Linus Torvalds


Explanation:

Linus Torvalds founded Linux Kernel.

Discuss this Question

2. What is the core of the Linux operating system?

A. Vi Editor
B. Command Line
C. Terminal
D. Kernel

Answer: D) Kernel

Explanation:

The kernel is the core of the Linux operating system.

Discuss this Question

3. Which is/are the directories that come under the Binary directory?

A. /bin
B. /sbin
C. /lib
D. /opt
E. All of the above

Answer: E) All of the above

Explanation:

Binary directory contains following directories:

/bin
/sbin
/lib
/opt

Discuss this Question


4. The directory is a type of file?

A. Yes
B. No

Answer: A) Yes

Explanation:

Yes, the directory is a type of file.

Discuss this Question

5. Which symbol represents the top-level directory?

A. ~
B. @
C. #
D. /

Answer: D) /

Explanation:

The symbol "/" represents the top-level directory.

Discuss this Question

Streamlined USA Moves, Stress-Free


Transitions (See More)
USA Moving Services | Search Ads
sponsored by: USA Moving Services LEARN MORE
6. Which symbol represents the user's home directory?

A. ~
B. @
C. #
D. /

Answer: A) ~

Explanation:

The symbol "~" represents the user's home directory.

Discuss this Question

7. Which Linux command is used to count the total number of lines, words, and
characters contained in a file?

A. count
B. wcount
C. wc
D. countw

Answer: C) wc

Explanation:

The "wc" command is used to count the number of lines, words, characters, and bytes
of each given file or standard input and print the result.

Discuss this Question

8. Which Linux command is used to remove files?

A. remove
B. rm
C. delete
D. del

Answer: B) rm

Explanation:

The "rm" command is used to remove files in Linux.


Discuss this Question

9. Which Linux command with vi Editor is used to delete a single character?

A. d
B. r
C. x
D. c

Answer: C) x

Explanation:

The command "x" is used to delete a single character in vi Editor.

Discuss this Question

10. Which Linux command is used to know which directory you are in?

A. know
B. help
C. cwd
D. pwd

Answer: D) pwd

Explanation:

To know which directory you are in, the "pwd" command can be used. The "pwd"
command stands for "Present Working Directory". This command gives us the absolute
path, which means the path that starts from the root.

Discuss this Question

11. Which Linux command is used to see all the hidden files?

A. ls
B. ls -h
C. ls -a
D. dir -a
Answer: C) ls -a

Explanation:

The "ls" command with argument "-a" can be used to see all the hidden files.

Discuss this Question

12. Which Linux command is used to give a full listing?

A. ls -F
B. ls -h
C. ls -a
D. dir -a

Answer: A) ls -F

Explanation:

The "ls -F" command is used to see a full listing, indicating what type files are by putting
a slash after directories and a star after executable files.

Discuss this Question

13. Which Linux command is used to go back from a folder to the folder before that?

A. cd..
B. cd
C. cd/
D. chdir

Answer: A) cd..

Explanation:

To go back from a folder to the folder before that, we can use the Linux command "cd
.." . Here, the two dots (..) represent back.

Discuss this Question

14. If you want to create a new directory named XYZ, which command will be used for
this purpose?
A. cd XYZ
B. chdir XYZ
C. mkdir XYZ
D. md XYZ

Answer: C) mkdir XYZ

Explanation:

To create a new directory named XYZ, we can use "mkdir XYZ". The "mkdir" command is
used to make a directory in Linux.

Discuss this Question

15. Which Linux command is used to create a new file?

A. create
B. file
C. tch
D. touch

Answer: D) touch

Explanation:

The "touch" command is used to create a file.

Discuss this Question


Your Smooth USA Move Starts Here
(Search Now)
USA Moving Services | Search Ads
sponsored by: USA Moving Services LEARN MORE

16. Which Linux command is used to copy files through the command line?

A. cp
B. copy
C. fcp
D. filecopy

Answer: A) cp

Explanation:

The "cp" command is used to copy files through the command line.

Discuss this Question

17. Which Linux command is used to move files through the command line?

A. move
B. mv
C. ren
D. loc

Answer: B) mv

Explanation:

The "mv" command is used to move files through the command line.
Discuss this Question

18. Which is the correct command syntax to rename a file "abc.txt" to "pqr.txt"?

A. mv abc.txt pqr.txt
B. mv pqr.txt abc.txt
C. mv -a pqr.txt abc.txt
D. mv -all pqr.txt abc.txt

Answer: A) mv abc.txt pqr.txt

Explanation:

The correct command syntax to rename a file "abc.txt" to "pqr.txt" is:

mv abc.txt pqr.txt

Discuss this Question

19. Just like the Windows Search command, which command is used in Linux?

A. search
B. find
C. findall
D. locate

Answer: D) locate

Explanation:

In Linux, the "locate" command is used to locate/search a file, just like the search
command in Windows.

Discuss this Question

20. Which argument with locate command helps us to ignore the case while searching
the file in the Linux system?

A. -c
B. -i
C. -a
D. -x

Answer: B) -i

Explanation:

To ignore the case while searching the file in the Linux system we can use the argument
"-i" with the "locate" command.

Discuss this Question

21. Which is the correct command syntax to locate a file containing the words "hello"
and "this"?

A. locate -i *hello*this
B. locate -i **hello**this
C. locate -i *hello*this*
D. locate -i **hello**this**

Answer: A) locate -i *hello*this

Explanation:

The correct command syntax to locate a file containing the words "hello" and "this":

locate -i *hello*this

Discuss this Question

22. Which Linux command is used to display the content of a file?

A. display
B. show
C. echo
D. cat

Answer: D) cat

Explanation:

The "cat" command is used to display the content of a file in Linux.


Discuss this Question

23. If you want any command to be done with administrative or root privileges, you can
use the ___ command.

A. sud
B. sudo
C. super
D. superuser

Answer: B) sudo

Explanation:

If you want any command to be done with administrative or root privileges, you can use
the sudo command.

Discuss this Question

24. The "sudo" command stands for ___.

A. su
B. superuser does
C. superuser do
D. super do

Answer: C) superuser do

Explanation:

The "sudo" command stands for "superuser do".

Discuss this Question

25. Which Linux command is used to see the available disk space in each of the
partitions in your system?

A. disk
B. diskspace
C. available
D. df
Answer: D) df

Explanation:

To see the available disk space in each of the partitions in your system, we can use "df"
command.

Discuss this Question

26. Which Linux command is used to check the computer's hostname?

A. hostname
B. host
C. comph
D. hname

Answer: A) hostname

Explanation:

The "hostname" command is used to check a computer's hostname in Linux.

Discuss this Question

27. The ___ command gives you your IP address in your network.

A. hostname
B. hostname -I
C. host -I
D. hostname -i

Answer: B) hostname -I

Explanation:

The "hostname -I" command gives you your IP address in your network.

Discuss this Question

28. Which Linux command is used to check your connection to a server?

A. connection
B. isconnect
C. check
D. ping

Answer: D) ping

Explanation:

The "ping" command is used to check your connection to a server.

Discuss this Question

29. Which Linux command is used to clear the terminal if it gets filled up with too many
commands?

A. clear
B. clean
C. cls
D. clr

Answer: A) clear

Explanation:

The "clear" command is used to clear the terminal if it gets filled up with too many
commands.

Discuss this Question

30. OSS stands for ___.

A. Open System Software


B. Open Source Software
C. Open System Source
D. None of the above

Answer: B) Open Source Software

Explanation:

OSS stands for "Open Source Software".

Discuss this Question


Your Smooth USA Move Starts Here
(Search Now)
USA Moving Services | Search Ads
sponsored by: USA Moving Services LEARN MORE

31. Which Linux command is used to force all buffers to disk?

A. sync
B. fflush
C. flush
D. clearx

Answer: A) sync

Explanation:

The "sync" command is used to force all buffers to disk.

Discuss this Question

32. Compressed files or zipped files can be viewed with the help of ___ command.

A. unzip
B. catz
C. zcat
D. All of the above

Answer: C) zcat

Explanation:

Compressed files or zipped files can be viewed with the help of 'zcat' command.
Discuss this Question

33. The command ___ decompresses a file like gunzip command.

A. bunzip
B. bunzip2
C. bunzip3
D. bunzip0

Answer: B) bunzip2

Explanation:

The command "bunzip2" decompresses a file like gunzip command.

Discuss this Question

34. The ___ term stands for the calendar. It displays the current month's calendar with
the current day highlighted.

A. calendar
B. calc
C. cal
D. None of the above

Answer: C) cal

Explanation:

The 'cal' term stands for the calendar. It displays the current month's calendar with the
current day highlighted.

Discuss this Question

35. Which Linux command is used to record a user login session in a file?

A. script
B. style
C. log
D. record

Answer: A) script
Explanation:

The "script" command is used to record a user login session in a file.

Discuss this Question

36. Which Linux command is used to display the operating system name?

A. os
B. osname
C. osinfo
D. uname

Answer: D) uname

Explanation:

The "uname" command is used to display the operating system name.

Discuss this Question

37. Which Linux command is used to print a file?

A. lp
B. pr
C. print
D. ptr

Answer: A) lp

Explanation:

The "lp" command is used to print a file.

Discuss this Question

38. Which is the correct syntax to print the file using the default printer in Linux?

A. lp [printer_name] [path or filename]


B. lp -a [printer_name] [path or filename]
C. lp -d [printer_name] [path or filename]
D. lp -d [path or filename] [printer_name]
Answer: C) lp -d [printer_name] [path or filename]

Explanation:

The correct syntax to print the file using the default printer in Linux is:

lp -d [Printer_name] [path or filename]

Discuss this Question

39. Which is the correct syntax to print the file using the default printer with multiple
copies in Linux?

A. lp -d -n [printer_name] [path or filename]


B. lp -d -n 5[printer_name] [path or filename]
C. lp -d [printer_name] -n [path or filename]
D. lp -d [printer_name] -n 5 [path or filename]

Answer: D) lp -d [printer_name] -n 5 [path or filename]

Explanation:

The correct syntax to print the file using the default printer with multiple copies in Linux
is:

lp -d [printer_name] -n 5 [path or filename]

Discuss this Question

40. Which argument and value with "lp" command specify the page orientation while
printing a file?

A. -o landscape/portrait
B. -o l/p
C. -o land/prt
D. -or landscape/portrait

Answer: A) -o landscape/portrait

Explanation:

With "ls" command, we can use argument "-0" with value either "landscape" or
"portrait" to specify the page orientation. Consider the below command syntax –
Discover related topics

Mcq Questions and Answers

Mcqs

Mcq

Mcq Questions

Multiple Choice Questions

lp -d [printer_name] -o landscape/portrait [path or filename]

Discuss this Question

41. Which Linux command is used to identify file type?

A. file
B. type
C. info
D. finfo

Answer: A) file

Explanation:

The "file" command is used to identify the file type.

Discuss this Question

42. How many types of users are in Linux?

A. 2
B. 3
C. 4
D. 5
Answer: B) 3

Explanation:

In Linux, there are three types of users: super users, system users, and regular/normal
users.

Discuss this Question

43. How many types of basic permissions to grant a user?

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

Answer: B) 3

Explanation:

There are three basic permissions to grant a user, they are: read, write, and execute.

Discuss this Question

44. The ___ command in Linux is used to convert the content of input in different
formats with the octal format as the default format.

A. od
B. oct
C. o_d
D. octal

Answer: A) od

Explanation:

The "od" command in Linux is used to convert the content of input in different formats
with the octal format as the default format.

Discuss this Question


45. The "od" command in Linux is used to convert the content of input in different
formats with the octal format as the default format.

A. https
B. http
C. named
D. dns

Answer: C) named

Explanation:

The named server is used with the BIND package. In Linux, the named service executes
the DNS (Dynamic Name Service) server daemon. It converts hostnames to IP
addresses and vice versa.

Discuss this Question

46. Which Linux command displays "cat" command's output with syntax highlighting or
colorizing?

A. xcat
B. ccat
C. coloredcat
D. colored

Answer: B) ccat

Explanation:

The "ccat" command displays "cat" command's output with syntax highlighting or
colorizing?

Discuss this Question

47. The operator __ is used to redirect the output of a command to the file by erasing all
existing data of that file.

A. >
B. >>
C. >>
D. <>
Answer: A) >

Explanation:

The operator ">" is used to redirect the output of a command to the file by erasing all
existing data of that file.

Discuss this Question

48. The operator __ is used to redirect the output of a command to the file without
erasing all existing data of that file.

A. >
B. >>
C. >>
D. <>

Answer: B) >>

Explanation:

The operator ">>" is used to redirect the output of a command to the file without
erasing all existing data of that file.

Discuss this Question

49. The operators ">" and ">>" are known as ___.

A. Insertion operators
B. Exertion operators
C. Redirection operators
D. None of the above

Answer: C) Redirection operators

Explanation:

The operators ">" and ">>" are known as Redirection operators.

Discuss this Question


50. Which keys are used to terminate the command execution in the command
prompt?

A. CTRL + C
B. CTRL + Pause/Break
C. Both A and B
D. None of the above

Answer: C) Both A and B

Explanation:

Both the combination of the keys CTRL + C and CTRL + Pause/Break can be used to
terminate the command execution in the command prompt.

Discuss this Question

Ad

Top Enterprise GRC Software | Search Here


GRC Tools | Search Ads

👇 More MCQs (Category-Wise) 👇


Web Technologies MCQs

JAVASCRIPT MCQs JQUERY MCQs REACT-JS MCQs

ANGULARJS MCQs JSON MCQs AJAX MCQs

SASS MCQs HTML MCQs CSS MCQs

ADVANCED CSS MCQs XML MCQs MORE ❯❯

Computer Science Subjects MCQs

MIS MCQs S/W ENGINEERING MCQs DATA ANALYTICS MCQs

CRYPTOGRAPHY MCQs BLOCKCHAIN MCQs COMPUTER GRAPHICS MCQs

EMBEDDED SYSTEM MCQs FOSS MCQs BIG DATA ANALYTICS MCQs

DATA ANALYTICS & VISUALIZATION OPERATING SYSTEM MCQs MORE ❯❯


MCQs

Databases MCQs

SQL MCQs PL/SQL MCQs MYSQL MCQs

DBMS MCQs ORACLE MCQs MONGODB MCQs

SQLITE MCQs COUCHDB MCQs MORE ❯❯

Programming MCQs

OOPS MCQs C LANGUAGE MCQs C++ MCQs

PHP MCQs C# MCQs JAVA MCQs

SCALA MCQs PERL MCQs PYTHON MCQs

ASP.NET MCQs MORE ❯❯


Testing Software MCQs

JIRA MCQs ETL TESTING MCQs BUGZILLA MCQs

SOFTWARE TESTING MCQs SELENIUM MCQs AGILE METHODOLOGY MCQs

JMETER MCQs JUNIT MCQs APPIUM MCQs

CUCUMBER TESTING MCQs UIPATH MCQs MORE ❯❯

Digital Marketing Subjects MCQs

DIGITAL MARKETING MCQs SEO MCQs SMO MCQs

SMM MCQs ONLINE MARKETING MCQs MORE ❯❯

Cloud Computing Softwares MCQs

OPENSTACK MCQs AWS MCQs Microsoft Azure MCQs

MORE ❯❯

AI/ML Subjects MCQs

ARTIFICIAL INTELLIGENCE REINFORCEMENT LEARNING PYSPARK MCQs

KERAS MCQs PYBRAIN MCQs DATA SCIENCE MCQs

STATISTICS MCQs

Engineering Subjects MCQs

AutoCAD MCQs Discrete Mathematics MCQs Environment Engineering


MCQs

CONTROL SYSTEMS MCQs Software Architecture MCQs Microwave Engineering MCQs


Network Theory MCQs Electrical Machines MCQs MORE ❯❯

Office Related Programs MCQs

MICROSOFT WORD MCQs MICROSOFT EXCEL MCQs MICROSOFT POWERPOINT MCQs

GOOGLE SHEETS MCQs

Commerce MCQs

BASIC ACCOUNTING BUSINESS STUDIES CAPITAL MARKET

GOODS & SERVICES TAX COOPERATIVE SOCIETY SOLE PROPRIETORSHIP

DEPRECIATION PARTNERSHIP INDIAN ECONOMY

MORE ❯❯

Graphic Design Softwares MCQs

ADOBE PHOTOSHOP MCQs ADOBE INDESIGN MCQs ADOBE AFTER EFFECTS MCQs

ADOBE DREAMWEAVER MCQs ADOBE ILLUSTRATOR MCQs CORELDRAW MCQs

General Knowledge (GK) MCQs

MARKETING MCQs MARKETING 4.0 MCQs CONSUMER BEHAVIOR MCQs

NATIONAL SYMBOLS SPAIN GK MCQs MORE ❯❯

Class-wise MCQs

Class 11 Poli Sci MCQs Class 12 Poli Sci MCQs BA Poli Sci MCQs

Class 11 Business Studies Class 11 History (NCERT)


Others

DATA PRIVACY MCQs GOOGLE CHROME MCQs SQLAlchemy MCQs

APACHE FLINK MCQs SWAGGER MCQs SOAPUI MCQs

ADVERTISEMENT

ADVERTISEMENT

🤝 Join Our Telegram Channel

Comments and Discussions!

Load comments ↻
Top MCQs
Marketing MCQs
Blockchain MCQs
Artificial Intelligence MCQs
Data Analytics & Visualization MCQs
MIS MCQs
C MCQs
C+ MCQs
Python MCQs
Java MCQs
Excel MCQs
Top Programs/Examples
C Programs
C++ Programs
Python Programs
Java Programs
D.S. Programs
Golang Programs
C# Programs
JavaScript Examples
jQuery Examples
CSS Examples
Top Tutorials
C Tutorial
C++ Tutorial
Python Tutorial
ML/AI Tutorial
MIS Tutorial
Software Engineering Tutorial
Scala Tutorial
More...

About
About us
Contact us
Privacy policy
Student's Section
Internship
Certificates
Content Writers of the Month
Subscribe
Telegram
Facebook
LinkedIn
Email

Copyright © 2023 www.includehelp.com. All rights reserved.

You might also like