30 Linux Quiz Questions and Answers

Linux is a free and open-source operating system (OS) based on the Linux kernel, which was originally created by Linus Torvalds in 1991. It is one of the most widely used operating systems in the world, powering everything from personal computers to servers, mobile devices, embedded systems, and supercomputers.

In this article

Part 1: OnlineExamMaker AI quiz generator – The easiest way to make quizzes online

When it comes to ease of creating a Linux skills assessment, OnlineExamMaker is one of the best AI-powered quiz making software for your institutions or businesses. With its AI Question Generator, just upload a document or input keywords about your assessment topic, you can generate high-quality quiz questions on any topic, difficulty level, and format.

What you will like:
● AI Question Generator to help you save time in creating quiz questions automatically.
● Share your online exam with audiences on social platforms like Facebook, Twitter, Reddit and more.
● Display the feedback for correct or incorrect answers instantly after a question is answered.
● Create a lead generation form to collect an exam taker’s information, such as email, mobile phone, work title, company profile and so on.

Automatically generate questions using AI

Generate questions for any topic
100% free forever

Part 2: 30 multiple-choice questions about Linux along with their answers

1. What is the core component of the Linux operating system?
– A) Kernel
– B) GUI
– C) Compiler
– D) BIOS
– **Answer: ** A) Kernel

2. Which of the following is not a Linux distribution?
– A) Ubuntu
– B) Fedora
– C) Apache
– D) Debian
– **Answer: ** C) Apache

3. Linux is known for being:
– A) Proprietary
– B) Closed-source
– C) Open-source
– D) Expensive
– **Answer: ** C) Open-source

4. The command used to navigate to the parent directory in the Linux terminal is:
– A) cd
– B) ls
– C) pwd
– D) cd ..
– **Answer: ** D) cd ..

5. Which package manager is commonly used in Debian and Ubuntu?
– A) RPM
– B) APT
– C) YUM
– D) Pacman
– **Answer: ** B) APT

6. The Linux command to display the contents of a text file is:
– A) cat
– B) echo
– C) ls
– D) grep
– **Answer: ** A) cat

7. Which command is used to change file permissions in Linux?
– A) chmod
– B) chown
– C) mv
– D) cp
– **Answer: ** A) chmod

8. Which runlevel is used for GUI mode in most Linux distributions?
– A) Runlevel 3
– B) Runlevel 5
– C) Runlevel 1
– D) Runlevel 0
– **Answer: ** B) Runlevel 5

9. Which command is used to list all running processes in Linux?
– A) list
– B) ps
– C) tasklist
– D) process
– **Answer: ** B) ps

10. The Linux command to create a new directory is:
– A) create
– B) newdir
– C) mkdir
– D) touch
Answer: C) mkdir

11. Which file in Linux contains the system-wide environmental variables?
– A) .bashrc
– B) .profile
– C) /etc/environment
– D) .env
Answer: C) /etc/environment

12. The command to compress files in Linux is:
– A) zip
– B) tar
– C) compress
– D) gzip
Answer: D) gzip

13. Which command is used to find and replace text in a file in Linux?
– A) search
– B) replace
– C) find
– D) sed
Answer: D) sed

14. In Linux, the command to shut down the system immediately is:
– A) poweroff
– B) shutdown now
– C) halt
– D) init 0
Answer: A) poweroff

15. Which Linux directory contains user-specific configuration files?
– A) /etc
– B) /var
– C) /home
– D) /bin
Answer: C) /home

Part 3: Download Linux questions & answers for free

Download questions & answers for free

Download quiz questions
Generate questions for any topic

16. The process ID (PID) of the most recently executed background command can be obtained using:
– A) $$.
– B) $!
– C) $&
– D) $#
Answer: B) $!

17. Which command is used to display the manual page for a Linux command?
– A) help
– B) info
– C) man
– D) –help
Answer: C) man

18. The default shell in most Linux distributions is:
– A) bash
– B) sh
– C) zsh
– D) csh
Answer: A) bash

19. What does the command “sudo” do in Linux?
– A) Switches to the root user
– B) Displays system information
– C) Lists all users
– D) Allows a user to execute commands with administrative privileges
Answer: D) Allows a user to execute commands with administrative privileges

20. Which command is used to remove a directory and its contents in Linux?
– A) rm
– B) rmdir
– C) rmd
– D) rm -r
Answer: D) rm -r

21. Linux file permissions consist of three sets of permissions. What are they?
– A) Read, Write, Execute
– B) Owner, Group, Other
– C) Public, Private, Restricted
– D) Full Control, Read-Only, Hidden
Answer: B) Owner, Group, Other

22. Which Linux command is used to search for files and directories based on their names?
– A) find
– B) locate
– C) search
– D) grep
Answer: A) find

23. What does the “df” command in Linux do?
– A) Displays the amount of free disk space on the system
– B) Lists all installed fonts
– C) Shows the current date and time
– D) Checks the network connectivity
Answer: A) Displays the amount of free disk space on the system

24. Which Linux command is used to create a symbolic link between files?
– A) sym
– B) link
– C) ln
– D) sl
Answer: C) ln

25. In the context of file permissions, the number “755” means:
– A) Owner has read, write, and execute permissions; Group and Others have read and execute permissions.
– B) Owner has full control; Group and Others have read-only permissions.
– C) Owner has read and write permissions; Group and Others have read permissions only.
– D) Owner has execute permission; Group and Others have read and execute permissions.
Answer: A) Owner has read, write, and execute permissions; Group and Others have read and execute permissions.

26. Which command is used to print the last 10 lines of a text file in Linux?
– A) tail
– B) head
– C) more
– D) less
Answer: A) tail

27. The Linux command to change the ownership of a file is:
– A) own
– B) chown
– C) chmod
– D) changeown
Answer: B) chown

28. What does the command “ls -l” do in Linux?
– A) Lists all files and directories in the current directory.
– B) Lists files and directories in a long format showing permissions, owner, size, etc.
– C) Lists only hidden files and directories.
– D) Lists files sorted by size.
Answer: B) Lists files and directories in a long format showing permissions, owner, size, etc.

29. Which command is used to view real-time changes in a log file in Linux?
– A) live
– B) view
– C) realtime
– D) tail -f
Answer: D) tail -f

30. The Linux command to copy files and directories is:
– A) mv
– B) copy
– C) cp
– D) duplicate
Answer: C) cp