Here are 1000 Linux MCQs (Chapterwise).
1. What is Linux primarily known as?
a) A web server
b) An operating system
c) A programming language
d) A hardware platform
View Answer
Explanation: Linux is primarily known as an operating system, specifically a family of open-source Unix-like operating systems based on the Linux kernel.
2. Who is the creator of the Linux kernel?
a) Linus Torvalds
b) Richard Stallman
c) Bill Gates
d) Steve Jobs
View Answer
Explanation: Linus Torvalds is the creator of the Linux kernel, which he first released in 1991.
3. Which of the following statements is true about Linux?
a) It is a proprietary operating system
b) It is only used on servers
c) It is an open-source operating system
d) It does not support multitasking
View Answer
Explanation: Linux is an open-source operating system, meaning its source code is available for anyone to view, modify, and distribute.
4. Which of the following is a popular Linux distribution?
a) Windows
b) Ubuntu
c) MacOS
d) Android
View Answer
Explanation: Ubuntu is a popular distribution of Linux, known for its user-friendly interface and widespread use in both desktop and server environments.
5. What is the significance of the Linux kernel?
a) It provides a graphical user interface
b) It manages system resources and hardware communication
c) It stores user data
d) It compiles software programs
View Answer
Explanation: The Linux kernel is the core component of the operating system that manages system resources, hardware communication, and system calls from user applications.
6. What command is used to display the version of the Linux kernel running on your system?
a) version
b) uname -r
c) kernel
d) sysinfo
View Answer
Explanation: The `uname -r` command displays the version of the Linux kernel currently running on the system.
7. Which command is used to update the package index in Debian-based systems?
a) apt-get update
b) yum update
c) pkg update
d) updatepkg
View Answer
Explanation: The `apt-get update` command is used to update the package index on Debian-based systems, such as Ubuntu.
8. In Linux, what is the purpose of the ‘root’ user?
a) A standard user with limited permissions
b) The system administrator with full privileges
c) A guest user
d) A service account
View Answer
Explanation: The ‘root’ user is the system administrator in Linux, having full access and control over the system.
9. What does the ‘ls -a’ command do?
a) Lists all files except hidden ones
b) Lists all files including hidden ones
c) Lists only directories
d) Lists files in a detailed format
View Answer
Explanation: The `ls -a` command lists all files and directories in the current directory, including hidden ones (those starting with a dot).
10. Which of the following commands is used to change the current directory?
a) cd
b) change
c) goto
d) setdir
View Answer
Explanation: The `cd` (change directory) command is used to change the current working directory in Linux.
11. Which command is used to list all files and directories in a Linux system?
a) ls
b) dir
c) list
d) show
View Answer
Explanation: The `ls` command is used to list files and directories in the current directory in Linux.
12. Which command is used to change the ownership of a file in Linux?
a) chown
b) chmod
c) chgrp
d) mv
View Answer
Explanation: The `chown` command is used to change the ownership of files and directories in Linux.
13. Which file contains the list of users in a Linux system?
a) /etc/users
b) /etc/passwd
c) /etc/groups
d) /etc/userlist
View Answer
Explanation: The `/etc/passwd` file contains user account information, including usernames and user IDs.
14. Which command is used to display the current working directory?
a) pwd
b) current
c) dir
d) ls
View Answer
Explanation: The `pwd` (print working directory) command displays the full path of the current directory.
15. Which command is used to copy files in Linux?
a) copy
b) cp
c) mv
d) xcopy
View Answer
Explanation: The `cp` command is used to copy files and directories in Linux.
16. Which of the following commands will display the contents of a file?
a) cat
b) view
c) show
d) display
View Answer
Explanation: The `cat` command is used to display the contents of a file in the terminal.
17. Which command is used to search for a specific text string in a file?
a) grep
b) find
c) search
d) locate
View Answer
Explanation: The `grep` command is used to search for specific text patterns within files.
18. Which command will change the current directory to the home directory?
a) cd ~
b) cd /home
c) cd .
d) cd ..
View Answer
Explanation: The command `cd ~` changes the current directory to the user’s home directory.
19. What does the ‘chmod’ command do?
a) Change file ownership
b) Change file permissions
c) Change file name
d) Change file location
View Answer
Explanation: The `chmod` command is used to change the permissions of a file or directory in Linux.
20. Which command is used to create a new directory?
a) newdir
b) mkdir
c) createdir
d) dircreate
View Answer
Explanation: The `mkdir` command is used to create new directories in the file system.
21. Which command can be used to display the last lines of a file?
a) tail
b) head
c) end
d) last
View Answer
Explanation: The `tail` command displays the last few lines of a file in the terminal.
22. Which command is used to compress files in Linux?
a) zip
b) gzip
c) compress
d) tar
View Answer
Explanation: The `gzip` command is used to compress files in Linux, producing a .gz file.
23. Which command displays the manual for another command?
a) help
b) man
c) guide
d) info
View Answer
Explanation: The `man` command is used to display the manual pages for other commands in Linux.
24. Which command is used to install a package in Debian-based distributions?
a) install
b) apt-get
c) yum
d) pkg
View Answer
Explanation: The `apt-get` command is used to install and manage packages in Debian-based Linux distributions.
25. What does the ‘df’ command do?
a) Display free disk space
b) Display file permissions
c) Display system processes
d) Display current users
View Answer
Explanation: The `df` command displays information about disk space usage on mounted filesystems.
26. Which command is used to remove files in Linux?
a) delete
b) rm
c) rmdir
d) erase
View Answer
Explanation: The `rm` command is used to remove files and directories in Linux.
27. Which command shows the current processes running in the system?
a) list
b) ps
c) top
d) run
View Answer
Explanation: The `ps` command displays information about currently running processes on the system.
28. Which file is responsible for the boot loader configuration in Linux?
a) /etc/boot.conf
b) /boot/grub/grub.cfg
c) /boot/loader.conf
d) /etc/grub.cfg
View Answer
Explanation: The `/boot/grub/grub.cfg` file is the configuration file for the GRUB boot loader.
29. Which command can be used to monitor real-time system performance?
a) monitor
b) top
c) perf
d) stat
View Answer
Explanation: The `top` command provides a dynamic view of system processes and their resource usage in real time.
30. Which command can be used to view the contents of a directory in a detailed format?
a) ls -l
b) dir -l
c) list -a
d) ls -a
View Answer
Explanation: The `ls -l` command displays files and directories in a detailed (long) format, including permissions, owner, size, and modification date.
31. Which of the following is a Linux distribution?
a) Ubuntu
b) Windows
c) MacOS
d) Solaris
View Answer
Explanation: Ubuntu is a popular distribution (distro) of Linux, while Windows and MacOS are not Linux-based operating systems.
32. What is the default shell for most Linux distributions?
a) tcsh
b) bash
c) sh
d) zsh
View Answer
Explanation: The default shell for most Linux distributions is `bash` (Bourne Again SHell).
33. Which command is used to check network connectivity in Linux?
a) netstat
b) ping
c) trace
d) route
View Answer
Explanation: The `ping` command is used to check network connectivity to a specified host by sending ICMP Echo Request packets.
34. What is the purpose of the ‘sudo’ command?
a) To switch users
b) To execute a command as a superuser
c) To shut down the system
d) To display disk usage
View Answer
Explanation: The `sudo` command allows a permitted user to execute a command as the superuser or another user, as specified by the security policy.
35. Which command is used to view the contents of a compressed file?
a) unzip
b) gunzip
c) extract
d) untar
View Answer
Explanation: The `gunzip` command is used to decompress files that have been compressed using `gzip`.
36. Which file contains system-wide environment variables?
a) /etc/environment
b) /etc/profile
c) /etc/bashrc
d) All of the above
View Answer
Explanation: All of these files can contain system-wide environment variables in Linux, depending on the specific settings and user sessions.
37. What is the purpose of the ‘kill’ command?
a) To terminate processes
b) To restart services
c) To delete files
d) To change user permissions
View Answer
Explanation: The `kill` command is used to send signals to processes, typically to terminate them gracefully or forcefully.
38. Which command is used to display disk usage of files and directories?
a) du
b) df
c) space
d) usage
View Answer
Explanation: The `du` (disk usage) command is used to estimate and report the disk space used by files and directories.
39. In Linux, what is the purpose of the ‘etc’ directory?
a) Contains user home directories
b) Contains system configuration files
c) Contains executable programs
d) Contains temporary files
View Answer
Explanation: The `/etc` directory contains system configuration files for various applications and services in Linux.
40. Which command would you use to change to the root user?
a) su
b) root
c) admin
d) sudo
View Answer
Explanation: The `su` command is used to switch to another user account, including the root user, if the correct password is provided.
41. What command is used to manage user accounts in Linux?
a) useradd
b) adduser
c) usermod
d) All of the above
View Answer
Explanation: All these commands (`useradd`, `adduser`, and `usermod`) are used to manage user accounts in Linux, each serving different functions.
42. Which command is used to monitor system performance and resource usage?
a) vmstat
b) top
c) htop
d) All of the mentioned
View Answer
Explanation: `vmstat`, `top`, and `htop` are all commands used to monitor system performance and resource usage in Linux.
43. Which command is used to schedule tasks in Linux?
a) at
b) cron
c) schedule
d) at and cron
View Answer
Explanation: Both the `at` command (for one-time scheduled tasks) and `cron` (for recurring tasks) are used to schedule tasks in Linux.
44. Which directory contains log files for system events in Linux?
a) /var/log
b) /etc/log
c) /usr/log
d) /tmp/log
View Answer
Explanation: The `/var/log` directory contains log files for various system events, applications, and services in Linux.
Chapterwise Multiple Choice Questions on Linux
- Linux Administration Interview Questions
- Linux Developer, Makefile, Debugging & Build Environment MCQs
- Linux Programming Interview Questions
- Linux Program Debugging/Tricky/Buggy Questions with Code/Examples
Linux Administration Interview Questions
Linux administration is essential for managing systems effectively. This section features multiple-choice questions (MCQs) that highlight the key skills every Linux administrator should have.
Linux Developer, Makefile, Debugging & Build Environment MCQs
For developers working in a Linux environment, understanding Makefiles, debugging, and build processes is essential. This section covers a range of multiple-choice questions related to Linux development practices.
Linux Programming Interview Questions
Linux programming covers a range of important topics needed to build efficient applications. This section features key questions that focus on fundamental programming concepts in a Linux environment.
Linux Programming Interview Questions | |
Linux Process Management Linux Memory Management Linux File Management – 1 Linux File Management – 2 Linux Signal Handling Linux IPCs – 1 Linux IPCs – 2 Linux Systems |
Linux Program Debugging/Tricky/Buggy Questions with Code/Examples
Debugging is an important skill for every programmer. This section includes questions that test your knowledge of common mistakes and tricky code examples.
Wish you the best in your endeavor to learn and master Linux!
Important Links:

You can connect with me on LinkedIn, watch my Youtube Masterclasses, or join my Telegram tech discussions.
If you’re in your 40s–60s and exploring new directions in your career, I also offer mentoring. Learn more here.