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

Dump Linux MCQs

The document contains 15 multiple choice questions about Linux installation and boot process topics like the purpose of the bootloader, swap partition, and file systems like Ext4. Common commands covered include chmod, df, and mount. The questions also address steps in the Linux installation process such as partitioning, package management, and user account setup.

Uploaded by

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

Dump Linux MCQs

The document contains 15 multiple choice questions about Linux installation and boot process topics like the purpose of the bootloader, swap partition, and file systems like Ext4. Common commands covered include chmod, df, and mount. The questions also address steps in the Linux installation process such as partitioning, package management, and user account setup.

Uploaded by

draxy069
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 181

15 Marks

Question 1:
To print the lines in which 2nd word starts with letter “A” from the file names.txt,the command
will be?
a) cat names.txt | grep \s+A
b) cut -d “ “ 2 names.txt | grep A
c) cat names.txt | grep ^A
d) cut -d “ “ -f 2 names.txt | grep ^A
Answer: cut -d “ “ -f 2 names.txt | grep ^A
Question 2:
Consider the commands for some user named “rajat”
mkdir testdir
chmod 0444 testdir
cd testdir
touch abc.txt
Which line will give error ?
a) Line 1 : wrong command syntax
b) Line 2 : can not change the permissions of the directory
c) Line 3 : Can not change directory : permission denied
d) Line 4 : can not create file : permission denied
Answer:3

Question 3:
Consider the commands
touch myfile.c
cat>myfile.c
#include<stdio.h>
int main()
{
printf(“Vi Editor”);
return 0;
}
Control + Z
vi myfile.c
yy
p
:wq

After this the file will be:


Same as after cat command
First line will be duplicated #include<stdio.h> #include<stdio.h>
First line of the file will be : yyp#include<stdio.h>
First line will be deleted

Answer: b
Question 4:
Consider the following commands entered and then what will be the output
cat>names.txt
Sumit
Rajan
Suresh
Anita
Control + Z
cp names.txt names2.txt
cat>>names2.txt
Anamika
Control + Z
diff names.txt names2.txt
a) 4a0 > Anamika
b) 0d5 < Anamika
c) 4c5 < Anamika
d) 4a5 > Anamika
Answer:4a5 > Anamika
Question 5:
Consider the commands executed with present working directory empty :
1. mkdir fol1
2. touch fol1/abc.txt
3. cat>fol1/abc.txt
4. this is the content.
5. Control + Z
6. cp fol1/abc.txt fol2/abc.txt
Which of these command will give error :
a) Line 2 : Can not create file in some other folder
b) Line 3 : can not write to a file in some other folder
c) Line 6 : can not copy to some other folder
d) Line 6 : Directory “fol2” does not exist. Hence Error

Answer:Line 6 : Directory “fol2” does not exist. Hence Error


Question 6:

In Linux operating system, the __ is the default input device and the ____ is the default output device.

a) Keyboard, printer
b) Mouse, printer
c) Keyboard, monitor
d) Mouse, monitor

Answer:Keyboard, monitor

Question 7:

In vi editor, there are __ and __ modes.

a) Insert, Execute
b) Command, insert
c) Command, Execute
d) Insert, append
Answer: Command, insert

Question 8:

The command cat with option_ is used for creating a new file whereas option __ is used for appending to the
already existing file.

a) >,>>
b) >,<
c) <,>
d) <,>>

Answer:>,>>

Question 9:

In the chmod command, the octal value for read permission is __ and for execute is ___.

a) 4, 2
b) 2, 1
c) 4, 1
d) 2, 4

Answer:2, 1

Question 10:

The filename __ refers to the current working directory and the filename __ refers to the parent directory.

a) /,.
b) .., /
c) /, ..
d) ., ..

Answer:/, ..

11.Which command deletes all files in the current directory whose filename ends

with the characters .html.

a. rm *.html

b. rm -r *.html

c. rm .html

d. none of the above


Answer a
12. Which command is used to search for a pattern starting with new followed by a
number and then an alphabet in file mona
a. $grep “New [0-z]” mona
b. $grep “New [0-9] [a-z]” mona
c. $grep “New 0-9 mona
d. None of the above
ans b
13.Which of the following command is used to write the output to a new file, output.txt from
file.txt
a. sort -o output.txt file.txt
b. sort file.txt &gt; output.txt
c. Both of the above
d.None of the above
Ans c
14.which command is used to show the content of text.txt file in octal form
a. od -b text.txt
b. od -c text.txt
c. od -tc text.txt
d None of the above
Ans a
15. which command is used to make hello-world.sh file executable for owner,group and
others.
a. chmod w+x hello-world.sh
b. chmod a+x hello-world.sh
c.chown a+x hello-world.sh
d. None of the above
Ans b
Marks 1
Q 1. What is the purpose of a bootloader in Linux installation?

A. To load the Linux kernel into memory and start the operating system

B. To provide a graphical user interface for the Linux desktop

C. To manage software packages and updates in Linux

D. To create and manage user accounts in Linux

Answer: A

Q 2. Which file system is commonly used in Linux installations due to its robustness and journaling
capabilities?

A. FAT32

B. NTFS

C. Ext4

D. HFS+

Answer: C

Q 3. During Linux installation, what is the purpose of the swap partition?

A. It stores user data and application files

B. It acts as a backup of the Linux kernel

C. It provides additional virtual memory when the RAM is full

D. It hosts the root filesystem

Answer: C

Q 4. Which of the following is a Linux distribution known for its focus on simplicity and ease of
use,cpmes with apt package manager making it a popular choice for beginners?

A. Ubuntu

B. CentOS

C. Arch Linux

D. Fedora

Answer: A
Q 5. What is the purpose of the 'partitioning' step during Linux installation?

A. To create multiple user accounts

B. To allocate disk space and create partitions for the operating system and user data

C. To configure network settings

D. To install essential system utilities

Answer: B

Q 6. Which is the default file system that is used in centos ?

A. Ext3

B. Ext4

C. XFS

D. Btrfs

Answer: C

Q 7. Which of the following options is not available from the Installation Summary screen?

A. Time & Date

B. Keyboard

C. Language Support

D. Troubleshoot an Existing Installation

Answer: D

Q 8. Which statement about the system language is not true?

A. You can change the system language from the Installation Summary screen.

B. You can change the system language directly after booting from the installation media.

C. When setting the installation language, you can also select a keyboard layout.

D. After installation, you cannot change the language settings.

Answer: D

Q 9. Which of the following commands enables you to redirect standard output as well as standard
error to a file?

A. 1&2> file
B. file 2>&1

C. >1&2 file

D. 1>2& file

Answer: B

Q 10. What is the primary function of the BIOS (Basic Input/Output System) in the boot process?

A. Manage installed applications

B. Initialize hardware components and perform a Power-On Self-Test (POST)

C. Load the operating system into memory

D. Manage user accounts and permissions

Answer: B

Q 11. Which bootloader is commonly used in many Linux distributions to manage the boot
process?

A. GRUB (Grand Unified Bootloader)

B. NTLDR (NT Loader)

C. Boot Camp

D. LILO (LInux LOader)

Answer: A

Q 12. What is the purpose of the MBR (Master Boot Record) in the boot process?

A. Store the operating system files

B. Manage user profiles and settings

C. Load the bootloader and initiate the boot sequence

D. Encrypt the system files for security purposes

Answer: C

Q 13. In the boot process of a typical computer, what follows the BIOS and MBR?

A. Loading the operating system kernel

B. Running system diagnostics

C. Checking for software updates


D. Initializing peripheral devices

Answer: A

Q 14. What is the purpose of the bootloader in the boot process?

A. To manage user accounts and permissions

B. To load the operating system kernel into memory and start the OS

C. To perform virus scans on the system files

D. To create backup copies of user data

Answer: B

Q 15. Which command is used in Linux to display the available disk space on the filesystems?

A. df

B. du

C. ls

D. diskinfo

Answer: A

Q 16. What is the purpose of the mkdir command in Linux?

A. To remove a directory

B. To create a new directory

C. To list the contents of a directory

D. To rename a directory

Answer: B

Q 17. Which file in Linux contains information about installed packages and their locations?

A. /etc/packages

B. /var/pkglist

C. /usr/local/packages

D. /var/lib/dpkg/status

Answer: D
Q 18. What is the purpose of the mount command in Linux?

A. To display the mounted filesystems

B. To create a new filesystem

C. To mount a filesystem onto a directory

D. To unmount a filesystem

Answer: C

Q 19. Which Linux command is used to change the ownership of a file or directory?

A. chown

B. chmod

C. own

D. alterowner

Answer: A

Q 20. Which of the following is a commonly used package management system in Linux
distributions, allowing users to install, update, and remove software packages in debian Operating
system?

A. RPM

B. APT

C. ZIP

D. EXE

Answer: B

Q 21. What is the purpose of the GRUB bootloader in Linux installations?

A. To manage user accounts and permissions

B. To provide a graphical user interface for the Linux desktop

C. To load the Linux kernel into memory and start the operating system

D. To configure network settings

Answer: C

Q 22. During Linux installation, what is the role of the root user?

A. The root user is a regular user with elevated privileges


B. The root user has complete control over the system and its configuration

C. The root user can only access specific folders in the system

D. The root user is a guest user with limited access

Answer: B

Q 23. What is the purpose of the 'user account setup' step during Linux installation?

A. To configure system-wide settings such as network configurations

B. To create user accounts and set their passwords and privileges

C. To install additional software packages

D. To partition the hard drive for Linux installation

Answer: B

Q 24. What is the role of the POST (Power-On Self-Test) during the boot process?

A. Initialize hardware components and perform system diagnostics

B. Load the operating system into memory

C. Establish network connections

D. Manage user accounts and permissions

Answer: A

Q 25. Which component is responsible for storing the bootloader in UEFI (Unified Extensible
Firmware Interface) systems?

A. MBR (Master Boot Record)

B. GPT (GUID Partition Table)

C. VBR (Volume Boot Record)

D. PBR (Partition Boot Record)

Answer: B

Q 26. What does the acronym UEFI stand for in the context of modern computer boot processes?

A. Universal Extensible Firmware Interface

B. Unified Extensible Firmware Interface

C. Universal Enhanced Firmware Interface


D. Unified Enhanced Firmware Interface

Answer: B

Q 27. n a typical boot sequence, what loads after the bootloader, responsible for initializing the
user interface and system services?

A. Shell

B. Kernel

C. System Registry

D. Device Drivers

Answer: B

Q 28. What is the purpose of the init system or its successor (such as systemd) in the Linux boot
process?

A. Manage user accounts and permissions

B. Initialize hardware components

C. Launch system processes and services

D. Load the graphical user interface

Answer: C

Q 29. What is the purpose of the chmod command in Linux?

A. To change the file format

B. To change file permissions

C. To compress files

D. To copy files and directories

Answer: B

Q 30. Which command is used to create a compressed archive file in Linux?

A. tar

B. zip

C. compress

D. gzip

Answer: A
Q 31. What is the purpose of the fdisk command in Linux?

A. To format a filesystem

B. To check disk usage

C. To create or manipulate disk partitions

D. To display disk information

Answer: C

Q 32. Which file in Linux stores user account information, including usernames and encrypted
passwords?

A. /etc/passwd

B. /etc/shadow

C. /etc/users

D. /var/account

Answer: B

Q 33. What is the purpose of the umount command in Linux?

A. To mount a filesystem

B. To unmount a filesystem

C. To list mounted filesystems

D. To check filesystem integrity

Answer: B

Q 34. Which command is used to search for files and directories in Linux?

A. find

B. search

C. locate

D. scan

Answer: A

Q 35. What is the purpose of the du command in Linux?


A. To display disk usage statistics

B. To delete files and directories

C. To update the system packages

D. To create symbolic links

Answer: A

Q 36. Which command is used to rename a file in Linux?

A. rn

B. rename

C. cp

D. mv

Answer: D

Q 37. What does the acronym LVM stand for in the context of Linux storage management?

A. Logical Volume Manager

B. Linux Virtual Machine

C. Logical Filesystem Version Manager

D. Linux Volume Mapper

Answer: A

Q 38. Which command is used to check and repair Linux file systems?

A. chkfs

B. fsck

C. fixfs

D. repairfs

Answer: B

Q 39. You are currently in the directory /home/user/downloads in the Linux terminal. You want to
move to the directory /home/user/documents. What is the correct relative path?

A. /home/user/documents

B. ../documents
C. /user/documents

D. ../user/documents

Answer: B

Q 40. Which OS allows users to create symbolic links?

A. Windows

B. Both Windows and Linux

C. Linux

D. Neither Windows nor Linux

Answer: B

Q 41. What is the primary purpose of virtual memory in an operating system?

A. Increasing RAM capacity

B. Providing extra storage space

C. Enhancing CPU performance

D. Managing user accounts

Answer: A

Q 42. Which distribution played a pivotal role in popularizing Linux in the late 1990s and early
2000s?

A. Red Hat

B. Ubuntu

C. Debian

D. Fedora

Answer: A

Q 43. Who is the primary creator of the Linux kernel?

A. Linus Torvalds

B. Richard Stallman

C. Steve Jobs

D. Mark Zuckerberg
Answer: A

Q 44. You want to create a new file named "report.docx" in a specific directory, such as
/var/reports, in the Linux terminal. What command should you use?

A. create /var/reports/report.docx

B. touch /var/reports/report.docx

C. newfile /var/reports/report.docx

D. makefile /var/reports/report.docx

Answer: B

Q 45. In the Linux terminal, you need to create a new file named "notes.txt" in the current
directory. Which command should you use?

A. create notes.txt

B. touch notes.txt

C. newfile notes.txt

D. makefile notes.txt

Answer: B

Q 46. Which operating system had a significant influence on Linus Torvalds when he created Linux?

A. Minix

B. Windows

C. MacOS

D. Unix

Answer: A

Q 47. Which Linux component allows users to run Windows applications on Linux?

A. Kernel

B. Wine

C. Shell

D. GNU Compiler

Answer: B
Q 48. In a scenario where a Linux system is using a swap partition extensively, what can be a
possible consequence for system performance?

A. Increased speed of application execution

B. Enhanced system responsiveness

C. Slower response time and reduced performance

D. Improved security

Answer: C

Q 49. What happens when a Linux system exhausts its available swap space, and there is still high
memory demand?

A. Processes are terminated

B. Additional swap space is automatically allocated

C. Kernel panics occur

D. Data is moved back to RAM

Answer: A

Q 50. In what year was the GNU General Public License (GPL) first applied to the Linux kernel?

A. 1990

B. 1995

C. 1985

D. 2000

Answer: A

Q 51. What is the primary purpose of the /mnt directory in a Linux file system structure?

A. Storing user files

B. Managing system services

C. Temporarily mounting external filesystems

D. Running graphical applications

Answer: C

Q 52. What happens when a Linux system experiences high memory demand, and available RAM is
insufficient to accommodate all active processes?
A. Processes are terminated

B. Data is moved from RAM to swap space

C. CPU performance decreases

D. Swap space is disabled

Answer: B

Q 53. You have a file named "document.txt" in your home directory, and you want to make a
backup of it in the same directory with the name "document_backup.txt." What command should
you use?

A. cp document.txt document_backup.txt

B. mv document.txt document_backup.txt

C. copy document.txt document_backup.txt

D. backup document.txt document_backup.txt

Answer: A

Q 54. Which Linux distribution is known for its rolling release model, where software is continually
updated?

A. CentOS

B. Fedora

C. Arch Linux

D. Debian

Answer: C

Q 55. In a Unix-like file system structure, which directory contains system configuration files?

A. /home

B. /etc

C. /usr

D. /tmp

Answer: B

Q 56. Which Linux directory contains dynamic runtime data and log files, such as system logs and
mail spools?
A. /mnt

B. /var

C. /bin

D. /lib

Answer: B

Q 57. Which component in the Linux architecture handles user authentication and authorization?

A. Kernel

B. Shell

C. PAM (Pluggable Authentication Module)

D. X Window System

Answer: C

Q 58. Which Linux feature provides security by isolating processes and controlling access to system
resources?

A. Shell

B. Kernel

C. Firewall

D. SELinux

Answer: D

Q 59. In a hierarchical file system structure, which directory contains the user-specific files and
configurations?

A. /var

B. /etc

C. /home

D. /lib

Answer: C

Q 60. What is the term for a situation in which a Linux system relies heavily on swap space due to
memory overcommitment?

A. Thrashing
B. Swapping

C. Buffering

D. Paging

Answer: A

Q 61. You are currently in the directory /var/log in the Linux terminal. To access a file named
syslog.log located in the /var/log/archives directory, what is the correct relative path?

A. /var/log/syslog.log

B. archives/syslog.log

C. ../archives/syslog.log

D. /archives/syslog.log

Answer: B

Q 62. You want to create an empty directory named "images" in your current location using the
Linux terminal. What command should you use?

A. touch images

B. mkdir images

C. newdir images

D. make images

Answer: B

Q 63. What is the primary difference between the root directory (/) and the home directory (~) in
Linux?

A. The root directory is for system files, while the home directory is for user files

B. The root directory is for temporary files, while the home directory is for system files

C. The root directory is where user files are stored, while the home directory is for system files

D. They are identical and can be used interchangeably

Answer: A

Q 64. In a Linux file system, what is the root directory often represented by?

A. / (forward slash)

B. \ (backslash)
C. : (colon)

D. ; (semicolon)

Answer: A

Q 65. Which of the following methods allows you to install Linux alongside an existing operating
system without affecting it?

A. Dual boot

B. Overwriting

C. Virtualization

D. Wubi installation

Answer: A

Q 66. Which parameter can be adjusted in Linux to reduce swap space usage and prioritize keeping
data in RAM?

A. Swappiness

B. Overcommit ratio

C. Filesystem size

D. Disk partition

Answer: A

Q 67. In a Linux terminal, you are located in the directory /home/user/music. You want to navigate
to a directory named photos located in the same directory. Which path should you use?

A. /photos

B. ./photos

C. ~/photos

D. photos

Answer: D

Q 68. What is the primary purpose of a Live CD or Live USB when installing Linux?

A. It contains Linux system files

B. It boots and runs a functional Linux system without installation

C. It provides user authentication for Linux


D. It installs Linux on the computer

Answer: B

Q 69. In a Linux terminal, you are located in the directory /home/user/documents. You need to
access a file named report.pdf in the directory /home/user/downloads. What is the correct
relative path?

A. /home/user/downloads/report.pdf

B. ../downloads/report.pdf

C. downloads/report.pdf

D. ~/downloads/report.pdf

Answer: C

Q 70. Which component in the Linux architecture is responsible for managing system calls and
providing an interface for user applications?

A. Kernel

B. Shell

C. Registry

D. File System

Answer: A

Q 71. What is the primary function of the /dev directory in a Linux file system structure?

A. Storing device files

B. Managing user permissions

C. Running system backups

D. Hosting system libraries

Answer: A

Q 72. What is the primary difference between RAM and swap space in a Linux system?

A. RAM is permanent storage, while swap space is temporary

B. RAM is used for running applications, while swap space stores user files

C. RAM is faster but limited, while swap space is slower but abundant

D. RAM and swap space serve the same function


Answer: C

Q 73. In the Linux terminal, you are in the directory /var/www/html and need to create a new
subdirectory named "pictures." What command should you use?

A. make /pictures

B. mkdir pictures

C. create pictures

D. mk pictures

Answer: B

Q 74. You want to navigate to your home directory in the Ubuntu terminal. What command will
you use?

A. goto ~

B. cd /home

C. cd ~

D. cd /

Answer: C

Q 75. What event led to the development of the Linux operating system by Linus Torvalds?

A. Frustration with Windows

B. Need for a Unix-like OS

C. A school project

D. Competition with Microsoft

Answer: B

Q 76. What is the primary goal of the Windows Task Manager and the Linux Task Manager (e.g.,
top, htop)?

A. Managing hardware resources

B. Monitoring and controlling running processes

C. Running graphical applications

D. Managing file systems

Answer: B
Q 77. You are in the directory /home/user/documents in the Linux terminal, and you want to
create a subdirectory named "work" within this directory. However, you want to avoid any error
messages if it already exists. What command should you use?

A. mkdir -p work

B. make work

C. mkdir -u work

D. mkwork work

Answer: A

Q 78. Which file in a Linux system is used to specify the location and size of the swap partition or
swap file?

A. /etc/partitions

B. /etc/fstab

C. /swap.conf

D. /etc/swap

Answer: B

Q 79. What is the purpose of the /bin directory in a Linux file system structure?

A. Storing system libraries

B. Managing user home directories

C. Hosting essential system binaries

D. Organizing temporary files

Answer: C

Q 80. You need to create a new file named "book.txt" in your home directory using the Linux
terminal. What command should you use?

A. new book.txt

B. make book.txt

C. create ~/book.txt

D. touch ~/book.txt

Answer: D
Q 81. You are in the directory /home/user/photos in the Linux terminal, and you want to create a
new file named "vacation.jpg" within this directory. What command should you use?

A. touch /home/user/photos/vacation.jpg

B. newfile vacation.jpg

C. makefile /home/user/photos/vacation.jpg

D. touch vacation.jpg

Answer: D

Q 82. In Linux, what is the purpose of the /usr directory?

A. User home directories

B. System binaries and libraries

C. Temporary files

D. Configuration files

Answer: B

Q 83. In the Ubuntu terminal, you want to move one directory up from your current location. What
command will you use?

A. cd ..

B. cd /

C. cd -

D. cd ~

Answer: A

Q 84. What is the primary function of the Linux Kernel?

A. Managing user applications

B. Managing hardware resources

C. Compiling source code

D. Providing a graphical user interface

Answer: B

Q 85. Which programming language is primarily used for developing the Linux Kernel?
A. C++

B. Python

C. Java

D. C

Answer: D

Q 86. What is the role of init process in Linux Kernel?

A. Handling user input

B. Initializing the system

C. Running shell scripts

D. Managing device drivers

Answer: B

Q 87. Which of the following is not the part of Linux Kernel?

A. Device drivers

B. System calls

C. Shell scripts

D. Process scheduler

Answer: C

Q 88. Which type of kernel architecture combines the advantages of both monolithic and
microkernel designs by providing a modular structure with certain essential functions running in
kernel space?

A. Monolithic kernel

B. Micro kernel

C. Hybrid kernel

D. Exo kernel

Answer: C

Q 89. Which type of kernel architecture is often associated with the Linux OS?

A. Monolithic kernel

B. Micro kernel
C. Hybrid kernel

D. Exo kernel

Answer: A

Q 90. Which file system is used in Linux OS?

A. FAT

B. FAT32

C. EXT3

D. NTFS

Answer: C

Q 91. Which bootloader is commonly used in Linux distributions to load the Linux kernel into
memory during the boot process?

A. LILO

B. GRUB

C. System-boot

D. Syslinux

Answer: B

Q 92. During the Linux boot process, what is the final step that occurs after the kernel is loaded
and the init process starts?

A. Running the first user-level program

B. Initializing the hardware

C. Executing the bootloader

D. Loading the initramfs

Answer: A

Q 93. Which directory contains user-specific configuration files and data in a typical Linux system?

A. /etc

B. /var

C. /proc

D. /home
Answer: D

Q 94. In the Linux file system, where are all the device files typically located?

A. /dev

B. /var

C. /etc

D. /bin

Answer: A

Q 95. What is the purpose of /tmp directory in Linux system?

A. Storing user home directories

B. Holding temporary files and directories

C. Managing system libraries

D. Archiving log files

Answer: B

Q 96. What symbol is used to represent the user’s home directory?

A. # symbol

B. ~ symbol

C. ! symbol

D. None of the above

Answer: B

Q 97. Which symbol represents the current directory in Linux?

A. @ symbol

B. ~ symbol

C. . symbol

D. .. symbol

Answer: C

Q 98. To change the ownership of a file in Linux, which command is typically used?
A. chmod

B. chown

C. chgrp

D. finger

Answer: B

Q 99. In a directory, if you want to see the long listing of all files and directories with their
modification time in reverse order (most recent first), which option is used with ‘ls’ command?

A. -t

B. -l

C. -la

D. -lt

Answer: D

Q 100. What is the role of Master Boot Record (MBR) in the boot process of BIOS-based Linux
system?

A. Managing the boot loader configuration

B. Providing a boot menu

C. Initializing the boot loader

D. Storing the kernel image

Answer: C

Q 101. What is the primary difference between find and locate commands in Linux?

A. ‘find’ searches based on file attributes while ‘locate’ uses an index for faster search

B. ‘find’ is used for searching files, ‘locate’ is used for searching directories

C. ‘locate’ provides GUI while ‘find’ is a command line utility

D. ‘find’ can search within current directory while ‘locate’ can search the entire file system

Answer: A

Q 102. What is the purpose of ‘updatedb’ command in relation to ‘locate’ command?

A. It updates the system’s locate database for faster file searches

B. It displays the list of recently modified files


C. It retrieves the detailed information for all files

D. It creates a backup of important system files

Answer: A

Q 103. What is the primary purpose of ‘chown’ command?

A. Changing file permissions

B. Modifying file contents

C. Changing file ownership

D. Changes in only one copy of file

Answer: C

Q 104. What is the minimum permission required to delete a file in a directory?

A. Read

B. Write

C. Execute

D. Both a and b

Answer: B

Q 105. You have a file with permission “-rwxr-xr--”. Who can modify the file contents?

A. The owner of the file

B. The group associated with the file

C. Any user on the system

D. Nobody can modify

Answer: A

Q 106. You want to grant read and write permissions to the owner, group and others for a file
called ‘file.txt’. Which of the following command you will use to achieve it?

A. chmod 744 file.txt

B. chmod 644 file.txt

C. chmod 755 file.txt

D. chmod 666 file.txt


Answer: D

Q 107. You need to set execute permission to the owner, group and others for a file called
‘testcode.exe’. Which of the following command you will give?

A. chmod u+xgo+x testcode.exe

B. chmod a+x testcode.exe

C. chmod 111 testcode.exe

D. both b and c

Answer: D

Q 108. You need to change the group ownership of a file ‘report.xls’ to a new group called ‘sales’.
Which of the following command you will give?

A. chown sales report.xls

B. chgrp sales report.xls

C. chgrp report.xls sales

D. chmod 777 sales report.xls

Answer: B

Q 109. Which of the following is a key feature of Linux operating systems?

A. Proprietary codebase

B. Limited customization options

C. Multitasking and multi-user support

D. Closed-source licensing

Answer: C

Q 110. Which component of the Linux operating system manages hardware resources and acts as
an interface between the hardware and software?

A. Kernel

B. Shell

C. Compiler

D. Window manage

Answer: A
Q 111. If a user wants a Linux distribution specifically designed for servers and enterprise
environments, which distribution would be the most suitable choice?

A. Ubuntu

B. Fedora

C. CentOS

D. Linux Mint

Answer: C

Q 112. How does Linux handle virtual memory?

A. It doesn't support virtual memory.

B. It uses a fixed-size swap partition.

C. It allows processes to use more memory than physically available by utilizing disk space as virtual
memory.

D. It relies entirely on RAM and does not use virtual memory.

Answer: C

Q 113. In Linux, which directory contains system configuration files and libraries essential for
system booting?

A. /home

B. /var

C. /etc

D. /bin

Answer: C

Q 114. Which command is used to change the current directory in Linux?

A. mv

B. cd

C. ls

D. cp

Answer: B
Q 115. What is an absolute path in Linux?

A. A path that starts from the root directory

B. A path that starts from the current directory

C. A path that includes only file names, not directories

D. A path that includes spaces in file names

Answer: A

Q 116. What is a relative path in Linux?

A. A path that starts from the root directory

B. A path that starts from the current directory

C. A path that includes spaces in file names

D. A path that includes only file names, not directories

Answer: B

Q 117. What does the pwd command in Linux stand for?

A. Print Working Directory

B. Present Working Directory

C. Print Whole Directory

D. Present Whole Directory

Answer: A

Q 118. What is the purpose of the /tmp directory in Linux?

A. Contains temporary files that are deleted upon system reboot

B. Stores system binaries

C. Holds configuration files

D. Contains user home directories

Answer: A

Q 119. What command is used to change the password of a user in Linux?

A. passwd

B. passchange
C. usermod

D. pswd

Answer: A

Q 120. Which command is used to find files and directories based on their names in Linux?

A. search

B. locate

C. find

D. grep

Answer: C

Q 121. What command is used to remove a file in Linux?

A. rd

B. rm

C. del

D. erase

Answer: B

Q 122. Which option is used with grep to display lines that do not match the specified word?

A. -m

B. -v

C. -x

D. -n

Answer: B

Q 123. What is the purpose of the -i option in the grep command?

A. Displays lines after the result

B. Performs a case-insensitive search

C. Displays lines in reverse order

D. Limits the number of matched lines

Answer: B
Q 124. Which command displays lines before the result in a grep search?

A. grep -A

B. grep -B

C. grep -C

D. grep -P

Answer: B

Q 125. What does the -C1 option in the grep command signify?

A. Displays the line and the next succeeding line after the result

B. Displays the line before the result

C. Displays the line and one preceding line before and after the result

D. Displays the line and two succeeding lines after the result

Answer: C

Q 126. In the command sed 's/apples/oranges/g' file.txt, what does 'g' stand for?

A. Global (replacing all occurrences)

B. Group (for pattern matching)

C. Go (execute the substitution)

D. Given (specifically replace the given occurrence)

Answer: A

Q 127. What does the -n option do in the grep command?

A. Displays lines not matching the specified word

B. Suppresses automatic printing of pattern space

C. Displays line numbers along with matching lines

D. Limits the number of lines displayed

Answer: B

Q 128. Which command is used to substitute the entire line in sed?

A. s/old/new/
B. c\

C. s/.*/new text/

D. s/^/new text/

Answer: B

Q 129. What does the command sed '/^$/d' file.txt do?

A. Deletes all lines containing empty spaces

B. Deletes lines not matching the specified word

C. Deletes empty lines in the file.txt

D. Appends empty lines at the end of the file.txt

Answer: C

Q 130. What does the -e option in sed allow you to do?

A. Edit files in place

B. Use extended regular expressions

C. Use multiple sed commands together

D. Perform case-insensitive search

Answer: C

Q 131. Which sed command is used to replace the pattern "apple" with "orange" in a file named
fruits.txt?

A. sed 's/apple/orange/g' fruits.txt

B. sed 's/apple=orange' fruits.txt

C. sed 'replace/apple/orange/' fruits.txt

D. sed 'change/apple/orange/' fruits.txt

Answer: A

Q 132. What is the primary purpose of the comm command in Linux?

A. To concatenate two files

B. To compare two files or streams

C. To compress files
D. To create a new file

Answer: B

Q 133. What is the purpose of the grep command in Linux?

A. To perform mathematical calculations

B. To manipulate files and directories

C. To search for patterns in text files

D. To create new files

Answer: C

Q 134. How can you use grep with a pipe?

A. grep <searchWord> <file name>

B. command | grep <searchWord>

C. grep -v <searchWord> <fileName>

D. grep -i <searchWord> <fileName>

Answer: B

Q 135. What does the -v option do in the grep command?

A. Displays lines after the result

B. Displays lines before the result

C. Displays lines not matching the specified word

D. Displays lines in a case-insensitive way

Answer: C

Q 136. How can you make grep perform a case-insensitive search?

A. grep -A <lineNumber> <searchWord> <fileName>

B. grep -i <searchWord> <fileName>

C. grep -B <lineNumber> <searchWord> <fileName>

D. grep -C <lineNumber> <searchWord> <fileName>

Answer: B
Q 137. What does the grep -A1 command do?

A. Displays the line after the result

B. Displays the line before the result

C. Displays the line after and the line before the result

D. Displays the line and the next succeeding line after the result

Answer: D

Q 138. In the comm command, what does the first column indicate?

A. Matching items of both files

B. Non-matching items of the first file

C. Non-matching items of the second file

D. Number of lines in the first file

Answer: B

Q 139. Which of the following statements about the comm command is true?

A. The order of items in the input files does not matter

B. Input files must be in sorted order for the comm command to work correctly

C. The comm command can only compare files, not streams

D. The comm command always displays four columns

Answer: B

Q 140. How can you display the first column (non-matching items of the first file) using the comm
command?

A. comm -13 file1.txt file2.txt

B. comm -23 file1.txt file2.txt

C. comm -12 file1.txt file2.txt

D. comm -33 file1.txt file2.txt

Answer: B

Q 141. What does the -23 option do in the comm command?

A. Displays the first column (non-matching items of the first file)


B. Displays the second column (non-matching items of the second file)

C. Displays the third column (matching items of both files)

D. Sorts the output in descending order

Answer: A

Q 142. If you want to display the second column (non-matching items of the second file), what
option would you use?

A. -13

B. -23

C. -33

D. -12

Answer: A

Q 143. What does the third column in the comm command output represent?

A. Non-matching items of both files

B. Matching items of both files

C. Line numbers of matching items

D. Total number of lines in both files

Answer: B

Q 144. Which of the following is NOT a valid comm command syntax?

A. comm file1.txt file2.txt

B. comm -23 file1.txt file2.txt

C. comm -o file1.txt file2.txt

D. comm -12 file1.txt file2.txt

Answer: C

Q 145. What is the kernel's role in the Linux operating system?

A. Manages user interfaces

B. Interacts directly with hardware

C. Executes user programs


D. Manages file storage

Answer: B

Q 146. Which programming language is the Linux kernel primarily developed in?

A. C++

B. Python

C. Java

D. C

Answer: D

Q 147. What is a module in the context of monolithic kernels?

A. A device driver

B. An object file linked to the kernel at runtime

C. A user program

D. A kernel process

Answer: B

Q 148. In monolithic kernel architecture, where are all the basic system services packaged?

A. User space

B. Application space

C. Kernel space

D. Device space

Answer: C

Q 149. What is the main advantage of micro kernel architecture over monolithic kernels?

A. Consumes less disk space

B. Easier maintenance

C. Faster execution of programs

D. Better compatibility with all hardware

Answer: B
Q 150. Which part of the Linux kernel manages the interaction between user space and kernel
space?

A. Device module

B. Kernel (core component)

C. System call interface

D. Microkernel

Answer: C

Q 151. What is the purpose of the GNU C library in the Linux kernel architecture?

A. Manages graphical user interfaces

B. Provides a mechanism for switching between user space and kernel space

C. Performs arithmetic calculations

D. Manages network connections

Answer: B

Q 152. In the context of the Linux kernel, what does the term "user space" refer to?

A. Area of memory accessible only by the kernel

B. Area of memory accessible by user programs and applications

C. Area of memory exclusively used by device drivers

D. Area of memory reserved for system processes

Answer: B

Q 153. What role does the system call interface play in the Linux kernel architecture?

A. Manages device drivers

B. Provides a way for user space applications to interact with the kernel

C. Manages file storage

D. Handles graphical user interfaces

Answer: B

Q 154. Which component of the Linux kernel handles file management, memory management, and
process management?

A. User Space
B. Device Module

C. Kernel (core component)

D. System Call Interface

Answer: C

Q 155. What does the kernel act as in the context of resource management?

A. User interface

B. Graphics manager

C. Device driver

D. Resource manager

Answer: D

Q 156. What is the key difference between Windows and Linux in terms of source code
availability?

A. Windows source code is open-source, while Linux source code is proprietary

B. Both Windows and Linux have open-source code

C. Windows source code is proprietary, while Linux source code is open-source

D. Both Windows and Linux have proprietary source code

Answer: C

Q 157. Which operating system allows developers to view, modify, and distribute their own
versions of the operating system?

A. Windows

B. Linux

C. Both Windows and Linux

D. Neither Windows nor Linux

Answer: B

Q 158. What does NTFS stand for in the context of Windows file systems?

A. New Technology File System

B. Network Transfer File System

C. National Text File System


D. Non-Traditional File Storage

Answer: A

Q 159. Which file system is commonly used in Linux distributions?

A. NTFS

B. FAT32

C. ext4

D. HFS+

Answer: C

Q 160. What does the user privilege system in Linux require for making significant changes to the
system?

A. Administrative privileges

B. Guest privileges

C. User privileges

D. Moderator privileges

Answer: A

Q 161. Which operating system is generally considered more secure due to its Unix-based
architecture?

A. Windows

B. macOS

C. Linux

D. Android

Answer: C

Q 162. Which operating system allows a higher degree of customization, including modification of
desktop environments?

A. Windows

B. macOS

C. Linux

D. Android
Answer: C

Q 163. Which operating system is known for being resource-intensive and requiring powerful
hardware to run smoothly?

A. Linux

B. macOS

C. Windows

D. Android

Answer: C

Q 164. What is the primary reason for Linux's ability to run efficiently on a wide range of devices?

A. Linux has a simplified user interface

B. Linux is specifically designed for high-end hardware

C. Linux distributions come in various versions, including lightweight options

D. Linux has fewer software applications

Answer: C

Q 165. Which operating system has official support from Microsoft and a vast user base with
online forums and resources?

A. Windows

B. macOS

C. Linux

D. Android

Answer: A

Q 166. What is the purpose of the BIOS/UEFI in the boot process?

A. Manages hardware resources

B. Checks essential hardware components

C. Initializes system processes

D. Displays the login screen

Answer: B
Q 167. What does the boot loader contain instructions about?

A. How to load the operating system

B. How to manage hardware resources

C. How to display graphical user interfaces

D. How to initialize system processes

Answer: A

Q 168. What is the kernel in the context of the boot process?

A. Hardware components

B. Core part of the operating system

C. User interfaces

D. System services

Answer: B

Q 169. What does the init process do in the boot process?

A. Manages hardware resources

B. Initializes system processes, services, and user interfaces

C. Loads the operating system

D. Displays the login screen

Answer: B

Q 170. When does the operating system display the login screen?

A. After the BIOS/UEFI performs POST

B. After the boot loader is located

C. After the kernel is loaded into memory

D. After the init process completes its tasks

Answer: D

Q 171. What is the role of the init process during booting?

A. Loading the kernel into memory

B. Initializing system processes, services, and user interfaces


C. Checking essential hardware components

D. Managing hardware resources

Answer: B

Q 172. What initiates the Power-On Self-Test (POST) during the boot process?

A. Boot Loader

B. Kernel

C. BIOS/UEFI

D. Init Process

Answer: C

Q 173. What does the 'cat' command do in Linux?

A. Creates directories

B. Displays file contents

C. Deletes files

D. Renames files

Answer: B

Q 174. How can you create a new file using the 'cat' command?

A. cat create > newfile

B. cat -n newfile

C. cat > newfile

D. cat -e newfile

Answer: C

Q 175. What does the 'cat >>' command do?

A. Copies content from one file to another

B. Appends content to an existing file

C. Creates a new file

D. Displays line numbers in a file

Answer: B
Q 176. How can you copy the content of 'source_file' to 'destination_file' using the 'cat' command?

A. cat [source_file] > [destination_file]

B. cat [destination_file] > [source_file]

C. cat [destination_file] >> [source_file]

D. cat [source_file] >> [destination_file]

Answer: A

Q 177. What does the command 'cat file1 file2 file3 > combo' do?

A. Combines the contents of file1, file2, and file3 into a new file called 'combo'

B. Overwrites the content of 'combo' with the content of file1

C. Appends the content of file3 to 'combo'

D. Deletes file1, file2, and file3

Answer: A

Q 178. What does the command 'cat << EOF' allow you to do in Linux?

A. Create a file with the name 'EOF'

B. Display the content of a file

C. Display an end marker and save file content until 'EOF'

D. Delete the content of a file

Answer: C

Q 179. How can you append the result of 'source_file' to 'destination_file' without overwriting the
destination file?

A. cat [source_file] > [destination_file]

B. cat [destination_file] >> [source_file]

C. cat [source_file] >> [destination_file]

D. cat [destination_file] > [source_file]

Answer: C

Q 180. What is the purpose of the 'cat' command when used with the greater than sign (>)?
A. To display file contents

B. To create a new file

C. To delete a file

D. To rename a file

Answer: B

Q 181. How can you display line numbers in front of each line of a file using the 'cat' command?

A. cat -n filename

B. cat -b filename

C. cat -l filename

D. cat -t filename

Answer: A

Q 182. What does the command 'cat file1 file2 > combined_file' do?

A. Creates a new directory named 'combined_file'

B. Merges the contents of file1 and file2 into a new file named 'combined_file'

C. Appends the content of file2 to file1

D. Deletes file1 and file2

Answer: B

Q 183. How can you append the content of 'file1' to 'file2' using the 'cat' command?

A. cat file1 > file2

B. cat file1 >> file2

C. cat file2 > file1

D. cat file2 >> file1

Answer: B

Q 184. What does the 'cat' command do when used inside pipes in Linux?

A. It moves stdin to stdout

B. It renames files

C. It deletes files
D. It creates new directories

Answer: A

Q 185. What is Linux?

A. A programming language

B. An operating system

C. A web browser

D. A hardware component

Answer: B

Q 186. Who created the Linux kernel?

A. Bill Gates

B. Linus Torvalds

C. Steve Jobs

D. Richard Stallman

Answer: B

Q 187. Which of the following statements about Linux is true?

A. Linux is a proprietary operating system

B. Linux is based on Windows architecture

C. Linux is open-source and free to use

D. Linux can only be used on mainframe computers

Answer: C

Q 188. What is the main advantage of open-source software like Linux?

A. It is always bug-free

B. It can be freely used, modified, and distributed by anyone

C. It is always faster than closed-source software

D. It is supported only by paid subscriptions

Answer: B
Q 189. Which Linux distribution is known for its enterprise solutions and stability?

A. Ubuntu

B. Fedora

C. CentOS

D. Arch Linux

Answer: C

Q 190. What is the shell in the context of Linux?

A. A protective layer for the Linux kernel

B. The outer casing of a Linux computer

C. A command-line interface for interacting with the operating system

D. A type of Linux file system

Answer: C

Q 191. Which file system is commonly used in Linux?

A. NTFS

B. FAT32

C. ext4

D. HFS+

Answer: C

Q 192. What is the purpose of package managers in Linux?

A. To manage software installation, upgrades, and removal

B. To manage hardware components

C. To manage user accounts and permissions

D. To manage system backups

Answer: A

Q 193. Which command is used to update the package list and upgrade installed packages in
Debian-based Linux distributions?

A. apt-get update and apt-get upgrade


B. yum update

C. pacman -Syu

D. dnf update

Answer: A

Q 194. What is the root user in Linux?

A. The first user created during Linux installation

B. A user with limited permissions

C. The superuser with administrative privileges

D. A guest user without any system access

Answer: C

Q 195. Who is often referred to as the father of Linux?

A. Linus Torvalds

B. Richard Stallman

C. Steve Jobs

D. Bill Gates

Answer: A

Q 196. In which year was the Linux kernel first released by Linus Torvalds?

A. 1985

B. 1991

C. 2000

D. 2005

Answer: B

Q 197. Which organization plays a significant role in promoting and advancing the Linux platform?

A. Linux Corporation

B. GNU Project

C. Linux Foundation

D. Open Source Initiative


Answer: C

Q 198. What are the minimum hardware requirements for running a basic Linux system?

A. 8GB RAM, Dual-core processor, 500GB storage

B. 1GB RAM, Pentium 4 processor, 10GB storage

C. 16GB RAM, Quad-core processor, 1TB storage

D. 4GB RAM, Core i3 processor, 250GB storage

Answer: B

Q 199. Which of the following is NOT a core component of the Linux operating system?

A. Kernel

B. Shell

C. GUI

D. Filesystem

Answer: C

Q 200. Which Linux distribution is known for its focus on stability and long-term support?

A. Ubuntu

B. Fedora

C. CentOS

D. Arch Linux

Answer: C

Q 201. Which package manager is commonly used in Debian-based Linux distributions?

A. YUM

B. RPM

C. APT

D. DNF

Answer: C
Q 202. Which Linux distribution is often associated with Red Hat and primarily used in enterprise
environments?

A. Ubuntu

B. Fedora

C. CentOS

D. Kali Linux

Answer: C

Q 203. What is the primary advantage of using open-source software in Linux?

A. High cost

B. Limited customization

C. Vendor lock-in

D. Freedom and flexibility

Answer: D

Q 204. Which Linux feature provides the ability to run multiple processes concurrently without
interference?

A. Multitasking

B. Multiprocessing

C. Multithreading

D. Multicore

Answer: A

Q 205. What is the primary role of the GRUB bootloader in a Linux system?

A. Managing user accounts

B. Loading the Linux kernel

C. Managing software packages

D. Handling networking functions

Answer: B

Q 206. Which Linux component is responsible for managing hardware resources and providing
system services?
A. Shell

B. Kernel

C. GUI

D. Compiler

Answer: B

Q 207. Which Linux distribution is often used for penetration testing and ethical hacking?

A. Ubuntu

B. Fedora

C. CentOS

D. Kali Linux

Answer: D

Q 208. What is the purpose of a Linux desktop environment?

A. To manage server hardware

B. To provide a graphical user interface (GUI) for users

C. To compile and run software

D. To administer network services

Answer: B

Q 209. Which Linux distribution is designed for experienced users who prefer a highly customizable
system?

A. Ubuntu

B. Fedora

C. CentOS

D. Arch Linux

Answer: D

Q 210. Which feature is characteristic of the systemd init system used in many modern Linux
distributions?

A. It uses a shell-based init script

B. It is not compatible with systemd


C. It manages system processes and services

D. It is used only in embedded Linux systems

Answer: C

Q 211. What is the primary function of the package manager in a Linux distribution?

A. It manages user accounts

B. It compiles source code

C. It installs, updates, and removes software packages

D. It controls hardware resources

Answer: C

Q 212. Which of the following is NOT a file system commonly used in Linux?

A. NTFS

B. ext4

C. XFS

D. Btrfs

Answer: A

Q 213. Which Linux distribution is a popular choice for servers and cloud environments due to its
lightweight nature?

A. Ubuntu

B. Fedora

C. CentOS

D. Alpine Linux

Answer: D

Q 214. When choosing a suitable Linux distribution, what should you consider to match your needs
and preferences?

A. The color of the distribution's logo

B. The availability of pre-installed games

C. The purpose, hardware requirements, and user interface preferences

D. The number of available software packages


Answer: C

Q 215. Which command is used to list files and directories in a Linux terminal?

A. list

B. show

C. display

D. ls

Answer: D

Q 216. What is the purpose of the 'chmod' command in Linux?

A. Change file ownership

B. Change file permissions

C. Create a new file

D. List directory contents

Answer: B

Q 217. What does the acronym "GPL" stand for in the context of Linux and open-source software?

A. General Public License

B. Graphical Presentation Layer

C. Grand Product Library

D. GNU Project Locator

Answer: A

Q 218. Which text editor is commonly found on most Linux systems and is often used for quick text
editing in the terminal?

A. Vim

B. Nano

C. Gedit

D. Emacs

Answer: B
Q 219. Which command is used to compress and decompress files in Linux?

A. zip

B. tar

C. unzip

D. compress

Answer: B

Q 220. What is the default shell in most Linux distributions?

A. Bash

B. Zsh

C. Ksh

D. Tcsh

Answer: A

Q 221. Which Linux command is used to create a new directory?

A. mkdir

B. touch

C. cd

D. rmdir

Answer: A

Q 222. What is the primary role of the 'cron' service in Linux?

A. Monitor system processes

B. Manage user accounts

C. Schedule tasks and jobs

D. Control hardware resources

Answer: C

Q 223. Which file is used to configure the network settings in a Linux system?

A. /etc/network.conf

B. /etc/network/interfaces
C. /etc/hosts

D. /etc/config/network

Answer: B

Q 224. Which Linux command is used to display the current working directory in the terminal?

A. pwd

B. dir

C. ls

D. cd

Answer: A

Q 225. In Linux, what does the command 'ps' stand for?

A. Process Status

B. Print Screen

C. Program Search

D. Package Source

Answer: A

Q 226. Which package manager is commonly used in Red Hat and CentOS Linux distributions for
installing and managing software packages?

A. YUM

B. APT

C. RPM

D. DNF

Answer: A

Q 227. What is the primary purpose of the 'grep' command in Linux?

A. Display system logs

B. Search and filter text in files

C. Create new files

D. Rename files and directories


Answer: B

Q 228. What does the acronym "SSH" stand for in the context of secure communication in Linux?

A. Secure Shell

B. Superuser Shell

C. System Security Handler

D. Software Source Hosting

Answer: A

Q 229. In Linux, what is the purpose of the 'passwd' command?

A. Display the current date and time

B. Change the user's password

C. Print system documentation

D. List all installed packages

Answer: B

Q 230. Which runlevel is typically used for a Linux system to enter a state where it is fully
operational with a graphical user interface (GUI)?

A. Runlevel 2

B. Runlevel 3

C. Runlevel 5

D. Runlevel 7

Answer: C

Q 231. What is the primary role of the 'crontab' command in Linux?

A. Edit system configuration files

B. Manage user accounts

C. Schedule tasks and jobs for a user

D. Create system backups

Answer: C
Q 232. Which Linux utility is commonly used for monitoring system performance and resource
usage?

A. top

B. ping

C. scp

D. grep

Answer: A

Q 233. In Linux, what is the purpose of the 'ifconfig' command?

A. View system logs

B. Display system information

C. Configure network interfaces

D. Install software packages

Answer: C

Q 234. Which Linux distribution is known for its rolling release model, where updates are
continuous rather than version-based?

A. Debian

B. Ubuntu

C. Fedora

D. Arch Linux

Answer: D

Q 235. What is the primary role of the Linux kernel in the operating system?

A. Managing user accounts

B. Providing a graphical user interface

C. Managing hardware resources and system services

D. Running web servers

Answer: C

Q 236. In terms of architecture, what is a key difference between Windows and Linux operating
systems?
A. Windows uses a microkernel, while Linux uses a monolithic kernel

B. Windows is open-source, while Linux is proprietary

C. Windows lacks a file system, while Linux uses ext4

D. Windows only supports a command-line interface

Answer: A

Q 237. What is the primary purpose of the 'init' process in Linux?

A. Managing hardware resources

B. Loading the graphical user interface

C. Initializing system processes and services

D. Monitoring system performance

Answer: C

Q 238. Which configuration file in Linux is commonly used to customize system-wide settings and
environment variables?

A. .bashrc

B. /etc/environment

C. /usr/bin/config

D. /home/user/settings.conf

Answer: B

Q 239. In Linux, what is the typical location for system-wide software packages and libraries?

A. /home

B. /opt

C. /usr

D. /var

Answer: C

Q 240. When installing a new Linux distribution, which of the following partitions is NOT a
common requirement?

A. /boot

B. /home
C. /root

D. /swap

Answer: C

Q 241. Which of the following bootloaders is commonly used for dual-booting Linux and Windows
systems?

A. GRUB

B. LILO

C. BCD

D. NTFS

Answer: A

Q 242. In Linux, what is the purpose of the 'fstab' file?

A. Storing system log files

B. Managing file system tables

C. Configuring network interfaces

D. Setting user passwords

Answer: B

Q 243. Which command can be used to add a user to a specific group in Linux?

A. useradd

B. passwd

C. usermod

D. adduser

Answer: C

Q 244. In Linux, what is the primary function of the 'swap' partition?

A. Storing user data

B. Providing a backup of system files

C. Extending available RAM by using disk space

D. Managing network connections


Answer: C

Q 245. What is the main purpose of the 'chroot' command in Linux?

A. Creating a new user

B. Changing a user's password

C. Changing the root directory for a process

D. Changing the hostname of the system

Answer: C

Q 246. Which configuration file is commonly used to set the system's default runlevel in Linux?

A. /etc/runlevel.conf

B. /etc/inittab

C. /etc/rc.local

D. /etc/bootconfig

Answer: B

Q 247. In the context of Linux, what is meant by "shell scripting"?

A. Writing code for user interfaces

B. Writing scripts to automate tasks using shell commands

C. Writing code for web applications

D. Writing code for system drivers

Answer: B

Q 248. What is the purpose of the 'dpkg' command in Debian-based Linux distributions?

A. Installing, updating, and removing software packages

B. Managing hardware resources

C. Configuring network interfaces

D. Changing the system's runlevel

Answer: A

Q 249. What is the purpose of the 'yum' command in Red Hat-based Linux distributions?
A. Creating user accounts

B. Monitoring system performance

C. Installing, updating, and removing software packages

D. Configuring network interfaces

Answer: C

Q 250. In Linux, what does the 'grub.cfg' file contain?

A. System log files

B. Configuration settings for the bootloader

C. User account information

D. Network configuration data

Answer: B

Q 251. What is the primary role of the 'sudo' command in Linux?

A. Running processes in the background

B. Providing superuser privileges for executing commands

C. Managing hardware resources

D. Generating random numbers

Answer: B

Q 252. Which Linux directory contains system log files and is used for troubleshooting and
monitoring system events?

A. /etc

B. /var

C. /usr

D. /tmp

Answer: B

Q 253. When configuring a network interface in Linux, which command is commonly used to set
the IP address and subnet mask?

A. ipconfig

B. ifconfig
C. netconfig

D. setip

Answer: B

Q 254. Which package manager is commonly used in Arch Linux for installing and managing
software packages?

A. RPM

B. DPKG

C. APT

D. Pacman

Answer: D

Q 255. Which Linux component is responsible for managing hardware drivers and device
interactions?

A. Kernel

B. Shell

C. Bootloader

D. Filesystem

Answer: A

Q 256. What is a major architectural difference between Windows and Linux when it comes to file
systems?

A. Windows uses NTFS, while Linux uses ext4

B. Windows uses ext4, while Linux uses NTFS

C. Both use the same file system

D. Windows doesn't have a file system

Answer: A

Q 257. What is the primary function of the 'rc.local' file in Linux?

A. Managing user accounts

B. Running startup scripts

C. Handling hardware resources


D. Storing system logs

Answer: B

Q 258. Which configuration file is used to customize the behavior of the Bash shell for a specific
user?

A. .bash_profile

B. /etc/environment

C. /usr/bin/config

D. /etc/bashrc

Answer: A

Q 259. In Linux, which directory typically contains executable files and command binaries for all
users?

A. /bin

B. /etc

C. /usr/local

D. /var

Answer: A

Q 260. During the Linux installation process, which partition is commonly designated as the root
file system?

A. /boot

B. /home

C. /root

D. /swap

Answer: C

Q 261. What is the purpose of the 'GRUB' bootloader in Linux?

A. Managing system logs

B. Loading the graphical user interface

C. Booting the operating system and handling multiple OS options

D. Configuring network interfaces


Answer: C

Q 262. What does the 'ssh' command allow you to do in Linux?

A. Share files between users

B. Establish a secure remote connection to another machine

C. Change system runlevels

D. Format and partition storage devices

Answer: B

Q 263. In Linux, what does the 'passwd' command do for a user?

A. Change the user's password

B. Set the user's username

C. Create a new user

D. Display system logs

Answer: A

Q 264. What is the primary role of the 'swappiness' setting in Linux?

A. Setting the user's shell

B. Controlling system memory usage and swap space

C. Managing network connections

D. Adjusting CPU frequency

Answer: B

Q 265. Which runlevel in Linux is typically used for single-user mode with minimal services
running?

A. Runlevel 0

B. Runlevel 1

C. Runlevel 3

D. Runlevel 5

Answer: B
Q 266. What is the primary function of the 'sed' command in Linux?

A. Secure data transfer

B. Search and replace text in files

C. Send email messages

D. Configure system firewalls

Answer: B

Q 267. Which package manager is commonly used in SUSE Linux distributions for software
management?

A. YUM

B. RPM

C. APT

D. Zypper

Answer: D

Q 268. In Linux, what is the purpose of the 'umask' command?

A. Set user quotas

B. Change file permissions for directories

C. Create a user's home directory

D. Set default file permissions for new files

Answer: D

Q 269. What is the primary function of the 'ip' command in Linux?

A. Display system logs

B. Configure network interfaces and routing tables

C. Create user accounts

D. Manage software packages

Answer: B

Q 270. In Linux, what is the purpose of the 'syslog' service?

A. Manage system hardware


B. Store system configuration files

C. Collect and manage system logs

D. Install software packages

Answer: C

Q 271. Which Linux directory contains temporary files that can be deleted periodically to free up
space?

A. /etc

B. /tmp

C. /home

D. /var

Answer: B

Q 272. What is the primary role of the 'sshd' service in Linux?

A. Manage the system's hostname

B. Control system performance

C. Provide secure remote access via SSH

D. Run user applications

Answer: C

Q 273. What is the purpose of the 'uname' command in Linux?

A. List installed software packages

B. Display the current username

C. Print system documentation

D. Show system information, including the kernel version

Answer: D

Q 274. Which utility in Linux is commonly used for managing system and application logs, including
log rotation and retention policies?

A. syslogd

B. logrotate

C. logstash
D. logsrv

Answer: B

Q 275. What is the first stage of the boot process in a typical Linux system?

A. Bootloader

B. Kernel

C. Init

D. Shell

Answer: A

Q 276. In the context of partitioning, what is the purpose of the Master Boot Record (MBR)?

A. Manage file permissions

B. Store the partition table and bootloader information

C. Run system services

D. Configure network settings

Answer: B

Q 277. What does "dual boot" mean in the context of operating systems?

A. Running two instances of the same OS

B. Booting multiple OSes on the same machine

C. Using a single OS for all tasks

D. Running a primary and secondary shell

Answer: B

Q 278. What is the primary function of virtual memory in an operating system?

A. Managing user accounts

B. Extending physical RAM by using disk space

C. Loading system services

D. Running graphical applications

Answer: B
Q 279. In Linux, what does the 'df' command do when executed in a terminal?

A. List available disk partitions

B. Display system logs

C. Show network connections

D. Calculate free and used disk space on mounted file systems

Answer: D

Q 280. Which command-line utility in Linux is commonly used for disk partitioning and
management?

A. lsblk

B. gparted

C. fdisk

D. mkfs

Answer: C

Q 281. When adding swap space to a Linux system, what is the purpose of the 'mkswap'
command?

A. Create a new user account

B. Create a new swap partition

C. Format a device as a swap space

D. Mount a network share

Answer: C

Q 282. In a typical boot process, what is the main role of the bootloader?

A. Manage user accounts

B. Load the kernel into memory and start the OS

C. Manage network connections

D. Display the graphical user interface

Answer: B

Q 283. What is the name of the default partitioning scheme used in Linux installations?

A. NTFS
B. ext4

C. FAT32

D. GUID Partition Table (GPT)

Answer: B

Q 284. In a dual-boot setup, how can you choose the operating system you want to boot into at
startup?

A. The operating system is chosen automatically

B. By pressing a specific key during boot (e.g., F12)

C. Through the BIOS/UEFI settings

D. By creating separate user accounts for each OS

Answer: B

Q 285. What is the purpose of the 'swapon' command in Linux?

A. Create a new partition

B. Display system logs

C. Enable a swap partition or file

D. Manage user accounts

Answer: C

Q 286. Which part of the boot process in Linux is responsible for loading and initializing system
services and daemons?

A. Bootloader

B. Kernel

C. Init

D. Shell

Answer: C

Q 287. When configuring swap space, what is the recommended size for the swap partition,
relative to physical RAM?

A. Equal to or larger than physical RAM

B. Half the size of physical RAM


C. One-quarter the size of physical RAM

D. It doesn't need to be related to physical RAM

Answer: A

Q 288. In the context of disk partitioning, what does "GPT" stand for?

A. Global Partition Table

B. Guided Partition Table

C. GigaByte Partition Table

D. GNU Partitioning Toolkit

Answer: B

Q 289. When using the 'fdisk' command for disk partitioning, what key allows you to create a new
partition?

A. 'C'

B. 'N'

C. 'D'

D. 'P'

Answer: B

Q 290. What is the purpose of the 'blkid' command in Linux?

A. Display system logs

B. List available block devices and their attributes

C. Create swap partitions

D. Manage user accounts

Answer: B

Q 291. In a dual-boot configuration, where is information about available operating systems


typically stored?

A. In the BIOS/UEFI settings

B. In the MBR of the primary drive

C. In the 'init' process

D. In a separate configuration file


Answer: B

Q 292. What is the primary function of the 'initrd' (initial RAM disk) in the Linux boot process?

A. Manage user accounts

B. Load and initialize essential drivers and modules

C. Control network connections

D. Start the graphical user interface

Answer: B

Q 293. When configuring a swap file, what is the recommended size for the swap file, relative to
physical RAM?

A. At least twice the size of physical RAM

B. Equal to the size of physical RAM

C. Half the size of physical RAM

D. It doesn't need to be related to physical RAM

Answer: B

Q 294. In Linux, what does the 'cat /proc/swaps' command display?

A. System logs

B. List of available swap devices and files

C. Network interfaces

D. Installed software packages

Answer: B

Q 295. In a dual-boot setup, what is the purpose of the "boot menu"?

A. To display system logs

B. To configure network settings

C. To select the operating system to boot

D. To create a new partition

Answer: C
Q 296. What is the function of the 'mount' command in Linux?

A. To format a disk partition

B. To create a new directory

C. To attach a file system to a directory

D. To change user passwords

Answer: C

Q 297. When configuring virtual memory, what is the Linux equivalent of the Windows "page file"?

A. Kernel module

B. Swap partition

C. RAM disk

D. Temporary file

Answer: B

Q 298. Which command allows you to view detailed disk space usage in Linux, including filesystem
type and space availability?

A. du

B. df

C. diskusage

D. spaceinfo

Answer: B

Q 299. What is the primary purpose of the 'gparted' tool in Linux?

A. To create swap partitions

B. To manage user accounts

C. To format USB drives

D. To graphically manage disk partitions

Answer: D

Q 300. In a typical boot process, what is the role of the 'initramfs' or 'initrd' image?

A. To configure the bootloader


B. To initialize RAM memory

C. To provide an initial file system and essential drivers

D. To display system logs

Answer: C

Q 301. When configuring a dual-boot system, what is the significance of the "bootloader
configuration"?

A. It sets the BIOS password

B. It defines the location of the swap partition

C. It specifies which OS to boot by default

D. It configures network interfaces

Answer: C

Q 302. What is the primary function of the 'mkfs' command in Linux?

A. To format a file system on a disk partition

B. To manage user accounts

C. To configure network settings

D. To display system logs

Answer: A

Q 303. When using the 'lsblk' command in Linux, what kind of information does it provide?

A. Network interface statistics

B. Block device attributes and relationships

C. RAM usage statistics

D. User account information

Answer: B

Q 304. In a dual-boot system, how can you switch between the installed operating systems during
the boot process?

A. By editing the kernel source code

B. By running a shell script

C. By pressing a specific key (e.g., Esc, F2) during boot


D. By changing the BIOS/UEFI settings

Answer: C

Q 305. What is the primary purpose of the 'fdisk' tool in Linux?

A. To create and manage disk partitions

B. To format text files

C. To compile C programs

D. To change user passwords

Answer: A

Q 306. In Linux, what is the 'grub.cfg' file responsible for?

A. Configuring network settings

B. Controlling user permissions

C. Bootloader configuration settings

D. Displaying system logs

Answer: C

Q 307. What is the purpose of the 'fstab' file in Linux?

A. To list available partitions

B. To manage user accounts

C. To specify file systems and their mount points

D. To change the system runlevel

Answer: C

Q 308. In a dual-boot setup, what does "boot order" refer to?

A. The sequence of processes during system startup

B. The order in which programs are loaded

C. The priority of user accounts

D. The sequence in which operating systems are attempted to boot

Answer: D
Q 309. What does the 'swapon -s' command display in Linux?

A. List of available swap devices and their sizes

B. System logs

C. Network configuration details

D. Software packages installed

Answer: A

Q 310. What is the primary role of the 'init' process in the Linux boot sequence?

A. To manage user accounts

B. To initialize system services and daemons

C. To configure network interfaces

D. To compile source code

Answer: B

Q 311. In Linux, what does the 'cfdisk' tool do?

A. Configures file permissions

B. Manages user accounts

C. Graphically manages disk partitions

D. Generates random numbers

Answer: C

Q 312. In a dual-boot system, what does "GRUB" stand for?

A. Grand Resource Uploader Bootloader

B. Graphical Recovery Utility for Boot

C. GNU GRand Unified Bootloader

D. Global Running Unix Boot

Answer: C

Q 313. When adding swap space in Linux, what is the recommended file system type for the swap
partition?

A. ext4
B. NTFS

C. swap

D. FAT32

Answer: C

Q 314. What is the purpose of the 'noexec' option in Linux file systems?

A. Prevents execution of files on that partition

B. Grants execution permissions to all files

C. Disables file listing

D. Enables read-only access

Answer: A
Marks 2
Q 1. What is the correct sequence of commands to display the contents of a file named
"example.txt" in Linux?

A. cat example.txt

B. display example.txt

C. open example.txt

D. show example.txt

Answer: A

Q 2. Which sequence of commands allows you to display the first 10 lines of a file named
"data.txt" in Linux?

A. head -n 10 data.txt

B. first 10 data.txt

C. cat -n 10 data.txt

D. display --lines=10 data.txt

Answer: A

Q 3. What is the correct sequence of commands to display the last 20 lines of a file named "log.txt"
in Linux?

A. tail -n 20 log.txt

B. last 20 log.txt

C. show --lines=20 log.txt

D. end 20 log.txt

Answer: A

Q 4. Which sequence of commands allows you to display the contents of a file named "output.txt"
and also number the lines?

A. show -n output.txt

B. cat -b output.txt

C. nl output.txt

D. display --line-numbers output.txt

Answer: C
Q 5. What is the correct sequence of commands to display the contents of multiple files named
"file1.txt" and "file2.txt" in Linux?

A. cat file1.txt file2.txt

B. show file1.txt file2.txt

C. display --files=file1.txt,file2.txt

D. open -m file1.txt file2.txt

Answer: A

Q 6. Which sequence of commands allows you to display the contents of a file named "report.txt"
and paginate the output, displaying one screen at a time?

A. more report.txt

B. less report.txt

C. cat --paginate report.txt

D. display -p report.txt

Answer: B

Q 7. What is the correct sequence of commands to display the contents of a file named "notes.txt"
and search for a specific term "Linux"?

A. search "Linux" notes.txt

B. grep "Linux" notes.txt

C. cat notes.txt | search "Linux"

D. cat notes.txt | grep "Linux"

Answer: D

Q 8. Which sequence of commands allows you to display the contents of a file named
"summary.txt" and sort the lines alphabetically?

A. cat summary.txt | sort

B. sort summary.txt

C. display --sort summary.txt

D. order summary.txt

Answer: A
Q 9. What is the correct sequence of commands to display the contents of a file named
"details.txt" and display line numbers?

A. cat -n details.txt

B. display --line-numbers details.txt

C. nl details.txt

D. show -l details.txt

Answer: A

Q 10. Which sequence of commands allows you to display the contents of a file named "info.txt"
and display line numbers, including empty lines?

A. nl -ba info.txt

B. cat --line-numbers=nonempty info.txt

C. display -e info.txt

D. show -l --empty info.txt

Answer: A

Q 11. During a Linux installation, what is the purpose of the chroot command, and when is it
typically used?

A. chroot is used to change the root directory for installation purposes, ensuring that commands
executed within the chroot environment do not affect the actual root filesystem.

B. chroot is used to create a new user account during the installation process, allowing secure access
to the system.

C. chroot is used to change the default shell for the root user, enhancing security by limiting access to
certain commands.

D. chroot is used to configure the network settings of the Linux system, ensuring proper connectivity
during and after installation.

Answer: A

Q 12. Which Linux file system feature, represented by the command tune2fs -l /dev/sda1, displays
the last time a file system was mounted and the number of times it has been mounted?

A. Mount Count

B. Last Mounted Time

C. Mount Frequency
D. Mount History

Answer: B

Q 13. During Linux installation, which partitioning scheme and file system combination provides
the best performance and fault tolerance for a system with multiple hard drives?

A. RAID 0 with ext3

B. RAID 1 with XFS

C. RAID 5 with Btrfs

D. RAID 10 with ext4

Answer: D

Q 14. Which command, commonly used in Linux installation scripts, is used to format a partition
with the ext4 file system?

A. format -t ext4 /dev/sda1

B. mkfs.ext4 /dev/sda1

C. fsformat -ext4 /dev/sda1

D. ext4format /dev/sda1

Answer: B

Q 15. In Linux installations, what is the purpose of the grub-install command?

A. A. grub-install is used to create a new GRUB configuration file, ensuring compatibility with the
installed hardware.

B. B. grub-install is used to reinstall the GRUB bootloader, updating the Master Boot Record (MBR) or
EFI system partition to include GRUB.

C. C. grub-install is used to configure the graphical interface for GRUB, allowing users to customize
the boot menu appearance.

D. D. grub-install is used to set up encrypted boot partitions, ensuring data security during the boot
process.

Answer: B

Q 16. Which command is used to display the first 15 lines of a file named "data.txt" in Linux?

A. head -n 15 data.txt

B. cat -l 15 data.txt
C. display --start=1 --end=15 data.txt

D. first 15 data.txt

Answer: A

Q 17. What is the correct sequence of commands to display the last 10 lines of a file named
"log.txt" and continuously monitor the file for changes?

A. tail -f -n 10 log.txt

B. watch -n 10 tail log.txt

C. tail -c 10 -f log.txt

D. monitor -l 10 log.txt

Answer: A

Q 18. Which command is used to display the contents of a file named "notes.txt" and highlight
lines containing the word "important"?

A. highlight "important" notes.txt

B. grep --color=auto "important" notes.txt

C. cat -h "important" notes.txt

D. display --highlight="important" notes.txt

Answer: B

Q 19. What is the correct sequence of commands to display the contents of a file named
"report.txt" in reverse order (from the last line to the first line)?

A. cat -r report.txt

B. tac report.txt

C. display --reverse report.txt

D. reverse report.txt

Answer: B

Q 20. Which command is used to display the differences between two files named "file1.txt" and
"file2.txt" in Linux?

A. diff file1.txt file2.txt

B. cmp file1.txt file2.txt


C. compare file1.txt file2.txt

D. delta file1.txt file2.txt

Answer: A

Q 21. What is the correct sequence of commands to display the contents of a file named
"output.txt" and save the output to a new file named "result.txt"?

A. cat output.txt > result.txt

B. copy output.txt result.txt

C. save output.txt result.txt

D. display output.txt --save=result.txt

Answer: A

Q 22. Which command is used to display the contents of a file named "document.txt" and show
non-printable characters?

A. cat --show-nonprinting document.txt

B. display -np document.txt

C. show -v document.txt

D. view --nonprint document.txt

Answer: A

Q 23. What is the correct sequence of commands to display the contents of a file named "file.txt"
and display the line numbers, starting from 100?

A. cat -n -s 100 file.txt

B. display --line-numbers=100 file.txt

C. nl -b a -n 100 file.txt

D. show -l 100 file.txt

Answer: C

Q 24. Which command is used to display the size of files and directories in a human-readable
format in Linux?

A. ls -sH

B. du -h
C. size -hr

D. info -human

Answer: B

Q 25. What is the correct sequence of commands to display the contents of a file named "data.txt"
and display only the lines containing the word "Linux"?

A. cat data.txt | grep "Linux

B. display --grep="Linux" data.txt

C. grep "Linux" data.txt

D. show --lines="Linux" data.txt

Answer: A

Q 26. In Linux, what is the purpose of the dd command during the installation process, and how is
it commonly used?

A. A. dd is used for disk defragmentation, optimizing file placement on the hard drive.

B. B. dd is used for creating bootable USB drives or copying raw data between devices or partitions
bit by bit.

C. C. dd is used for dynamic disk allocation, ensuring efficient usage of available storage space.

D. D. dd is used for directory duplication, creating exact copies of specific folders during installation.

Answer: B

Q 27. During a Linux installation, which command is used to configure the system's hostname,
allowing it to be identified on the network?

A. sethostname

B. hostnamectl

C. confighost

D. netname

Answer: B

Q 28. During a Linux installation, which command is used to create a new partition table on a block
device, ensuring proper initialization for further partitioning?

A. mkpart

B. parted
C. fdisk

D. gdisk

Answer: B

Q 29. During the Linux installation process, which command is used to configure the Logical
Volume Manager (LVM) for dynamic disk allocation, allowing for easy resizing and snapshot
creation?

A. lvcreate

B. pvdisplay

C. vgextend

D. lvextend

Answer: A

Q 30. In Linux, which command is used to install the bootloader in the Master Boot Record (MBR)
or EFI system partition, ensuring the system can boot successfully?

A. grub-install

B. bootctl install

C. syslinux-install_update

D. lilo

Answer: A

Q 31. In Linux, what is the purpose of the shell?

A. Managing hardware resources

B. Running Windows applications

C. Providing a command-line interface

D. Managing user accounts

Answer: C

Q 32. What is the primary purpose of a directory in a file system structure?

A. Storing user files

B. Executing system commands

C. Organizing and managing files


D. Managing user accounts

Answer: C

Q 33. You are currently in the directory /home/user/documents in the Linux terminal. What
command should you use to create a new subdirectory named "projects" within this directory?

A. create projects

B. make projects

C. mkdir projects

D. newdir projects

Answer: C

Q 34. In a Linux terminal, you are located in the directory /home/user/documents. You want to
navigate to the directory /var/log. Which path should you use?

A. /var/log

B. ../var/log

C. /home/user/var/log

D. var/log

Answer: A

Q 35. What is the purpose of the /tmp directory in a Linux file system structure?

A. Storing user home directories

B. Hosting temporary files

C. Managing system services

D. Running graphical applications

Answer: B

Q 36. Which Linux distribution is often used for ethical hacking and penetration testing?

A. Ubuntu

B. Fedora

C. Kali Linux

D. Debian

Answer: C
Q 37. How can you quickly navigate to your home directory from any location in the Ubuntu
terminal?

A. cd /home

B. cd ~

C. cd ..

D. cd /

Answer: B

Q 38. Which directory in the Linux file structure contains system configuration files and is not
intended for user manipulation?

A. /home

B. /var

C. /etc

D. /usr

Answer: C

Q 39. What is the primary function of the swappiness parameter in Linux?

A. Controlling CPU clock speed

B. Adjusting the size of RAM

C. Managing swap space usage

D. Configuring the user interface

Answer: C

Q 40. In a Linux terminal, you are in the directory /etc/network. To access a configuration file
located in the /etc/security directory, what is the correct relative path?

A. /etc/security/config.txt

B. ./security/config.txt

C. ../security/config.txt

D. security/config.txt

Answer: C
Q 41. What type of file path separator does Linux use?

A. \ (backslash)

B. / (forward slash)

C. : (colon)

D. ; (semicolon)

Answer: B

Q 42. Which component of the Linux operating system is responsible for managing hardware
resources?

A. Kernel

B. Shell

C. Compiler

D. Text Editor

Answer: A

Q 43. In the Ubuntu terminal, you want to copy a file named "file.txt" from your current directory
to the "/backup" directory. What command should you use?

A. cp file.txt /backup

B. mv file.txt /backup

C. copy file.txt /backup

D. cp /backup/file.txt

Answer: A

Q 44. What was the initial release date of Linux?

A. 1991

B. 1984

C. 2000

D. 1995

Answer: A

Q 45. Which OS is known for its case-sensitive file system?

A. Windows
B. Linux

C. Both Windows and Linux

D. Neither Windows nor Linux

Answer: B

Q 46. To navigate to the root directory in the Ubuntu terminal, which command should you use?

A. cd /

B. cd .

C. cd ~

D. cd ..

Answer: A

Q 47. What is the primary function of the Linux shell?

A. Graphical user interface

B. User authentication

C. Command interpretation

D. Disk management

Answer: C

Q 48. You need to create a new directory named "docs" in your current directory in the Ubuntu
terminal. What command will you use?

A. create docs

B. mkdir docs

C. touch docs

D. newdir docs

Answer: B

Q 49. The kernel of an operating system is responsible for what aspect of system operation?

A. Low-level hardware

B. Graphical user interface

C. Applications
D. Network connectivity

Answer: A

Q 50. Which feature is typically associated with the "package manager" in Linux distributions?

A. Graphical user interface

B. Software updates

C. Dependency management

D. Hardware drivers

Answer: C

Q 51. You are currently in the directory /usr/bin in the Linux terminal. You want to move to the
parent directory, which is /usr. What is the correct relative path?

A. /usr

B. ../usr

C. ..

D. /bin

Answer: B

Q 52. Which Linux distribution is often considered a good choice for beginners due to its user-
friendly nature?

A. Debian

B. CentOS

C. Arch Linux

D. Ubuntu

Answer: D

Q 53. In the Linux architecture, what is the primary purpose of the init process?

A. Running graphical applications

B. Managing hardware drivers

C. Initializing system services

D. Managing memory allocation

Answer: C
Q 54. You have a file named "file.txt" in your current directory, and you want to create a copy of it
in a different location, say, in the /backup directory. What command should you use?

A. cp file.txt /backup

B. copy file.txt /backup

C. mv file.txt /backup

D. backup file.txt /backup

Answer: A

Q 55. Which Linux distribution is known for its use in servers and enterprise environments?

A. Ubuntu

B. Fedora

C. CentOS

D. Arch Linux

Answer: C

Q 56. If you give ‘pwd’ command, what type of path you will get in the output?

A. Relative path

B. Home path

C. Absolute path

D. Parent directory path

Answer: C

Q 57. Suppose you are in a directory ‘/var/opt’ and you want to go to the directory ‘/var/log’.
Which of the following relative path you will use?

A. ./log

B. /var/log

C. ../log

D. Log

Answer: C
Q 58. You have two directories ‘dir1’ and ‘dir2’ in your home directory and you are currently in
your home directory. If you give command ‘cp -R dir1 dir2’ what it will do?

A. Copy all the files from ‘dir1’ directory to ‘dir2’ directory

B. Copy the directory ‘dir1’ as the subdirectory under ‘dir2’ along with all its files and directories.

C. Move all the files only from directory ‘dir1’ to directory ‘dir2’

D. Removes all the files from directory ‘dir1’

Answer: B

Q 59. You have two files called ‘file1.txt’ and ‘file2.txt’. Permissions on ‘file1.txt’ are ‘-rwxrwxrwx’
and permissions on ‘file2.txt’ are ‘-r—r—r—'. What command you will use to overwrite the
contents of ‘file2.txt’ with the content of ‘file1.txt’?

A. cp -r file1.txt file2.txt

B. cp -R file1.txt file2.txt

C. cp file1.txt file2.txt

D. cp -f file1.txt file2.txt

Answer: C

Q 60. Suppose you create a file with data “Hello!” store inside it. If you will give ‘ls -ls’ command
what will be the first column represent in the output?

A. 4

B. 7

C. 6

D. -rw-r--r--

Answer: A

Q 61. If you create a directory (which is empty) in Linux file system, how much memory space
allocated to it by default?

A. 512 bytes

B. 2048 bytes

C. 0 bytes

D. 4096 bytes

Answer: D
Q 62. If you give the command ‘link file1.txt file2.txt’, what will be the second column represents if
you give ls -l command with respect to ‘file1.txt’ and ‘file2.txt’?

A. 2 and 1

B. 1 and 2

C. 2 and 2

D. 1 and 1

Answer: C

Q 63. Suppose there is a file called ‘-myfile.txt’ in your current directory. Which of the following
command you will give to interactively delete this file?

A. rm -i -myfile.txt

B. rm -i -- -myfile.txt

C. rm -- -myfile.txt

D. all of the above

Answer: B

Q 64. What will be the output of command ‘locate -0 file.txt’?

A. Search the entire file system for file ‘file1.txt’ and display all files.

B. Search the locate database for the ‘file1.txt’ and display all files.

C. Search the locate database for ‘file1.txt’ and display all matching pattern by omitting new line
character.

D. None of the above.

Answer: C

Q 65. If you give command ‘touch -t 201210280605 file1.txt’, what it will do?

A. Set only the access time of ‘file1.txt’ to 2012-10-28 06:05

B. Set only the modification time of ‘file1.txt’ to 2012-10-28 06:05

C. Display all the files having pattern ‘file1.txt’ and modification time as 2012-10-28 06:05

D. Set the access and modification date & time of file ‘file1.txt’ to 2012-10-28 06:05

Answer: D

Q 66. What command is used to mount a file system in Linux?


A. mount

B. unmount

C. fsck

D. df

Answer: A

Q 67. What Linux command is used to change the permissions of a file or directory?

A. chmod

B. chown

C. chdir

D. perm

Answer: A

Q 68. Which command is used to display information about disk space usage on Linux file systems?

A. du

B. ls

C. df

D. free

Answer: C

Q 69. Which command is used to display the contents of a file in Linux?

A. cat

B. more

C. head

D. less

Answer: A

Q 70. Which command is used to display the last few lines of a file in Linux?

A. tail

B. more

C. head
D. less

Answer: A

Q 71. What does the "w" permission allow in Linux file permissions

A. Read

B. Write

C. Execute

D. Rename

Answer: B

Q 72. Which symbol is used for redirecting the standard input from a file in Linux?

A. >

B. <

C. |

D. &

Answer: B

Q 73. Why is Linux considered open-source software?

A. Its user interface can be customized

B. Its source code is freely available for modification and distribution

C. It is compatible with all software applications

D. It is developed by a large and active community

Answer: B

Q 74. What does the customizability of Linux allow users to do?

A. Change the color scheme of the desktop

B. Install and configure different software packages according to their needs

C. Increase the processing speed of the computer

D. Modify the hardware components of the computer

Answer: B
Q 75. Why is Linux known for its stability and security?

A. It has a complex user interface

B. It is prone to frequent crashes

C. It is less prone to crashes and viruses than other operating systems

D. It requires regular paid subscriptions for security updates

Answer: C

Q 76. What makes Linux a cost-effective option for individuals and businesses?

A. It offers a wide variety of paid applications

B. It requires minimal hardware specifications

C. It is free to download and use

D. It comes with lifetime warranty and support

Answer: C

Q 77. What advantage does the open-source nature of Linux provide in terms of development and
maintenance?

A. It limits the number of developers contributing to the operating system

B. It allows for a large and active community of developers to contribute

C. It restricts the modification of source code

D. It requires developers to pay for using Linux

Answer: B

Q 78. Which Linux distribution is the base for Ubuntu, Kali Linux, and Linux Mint?

A. Red Hat Enterprise Linux

B. Debian

C. Arch Linux

D. Slackware

Answer: B

Q 79. Which specialized Linux distribution is specifically designed for digital forensics and
penetration testing?

A. Puppy Linux
B. Raspberry Pi OS

C. Kali Linux

D. Tails

Answer: C

Q 80. What is the focus of Tails, a specialized Linux distribution?

A. Gaming and entertainment

B. Security through compartmentalization

C. Privacy and anonymity

D. Educational use

Answer: C

Q 81. Which educational-focused Linux distribution is a derivative of Ubuntu?

A. Edubuntu

B. SoaS

C. Puppy Linux

D. Tails

Answer: A

Q 82. What is the primary focus of Qubes OS, a specialized Linux distribution?

A. Server management

B. Digital forensics

C. Gaming and entertainment

D. Security through compartmentalization using virtualization

Answer: D

Q 83. Which Linux distribution is optimized for Raspberry Pi single-board computers?

A. Alpine Linux

B. Raspberry Pi OS

C. Slackware

D. ClearOS
Answer: B

Q 84. What is the primary focus of SteamOS, a specialized Linux distribution developed by Valve
Corporation?

A. Educational use

B. Gaming and entertainment

C. Server management

D. Digital forensics

Answer: B

Q 85. Which Linux distribution is lightweight, security-oriented, and often used for containers?

A. Alpine Linux

B. ClearOS

C. Arch Linux

D. Slackware

Answer: A

Q 86. Which community-driven Linux distribution has an independent rolling-release model and its
package manager?

A. Void Linux

B. Solus

C. Debian

D. Red Hat Enterprise Linux

Answer: A

Q 87. What is the primary focus of Solus, an independent Linux distribution?

A. Server management

B. Gaming and entertainment

C. Educational use

D. Desktop experience and gaming

Answer: D
Q 88. Which professor created the Minix operating system, serving as an educational tool for
students?

A. Linus Torvalds

B. Richard Stallman

C. Andrew S. Tanenbaum

D. Bill Gates

Answer: C

Q 89. What was the main purpose of Minix when it was developed by Andrew S. Tanenbaum?

A. Research purposes

B. Educational tool

C. Business applications

D. Entertainment platform

Answer: B

Q 90. Which Linux distribution is known for its focus on security through compartmentalization
using virtualization?

A. Ubuntu

B. Fedora

C. Qubes OS

D. CentOS

Answer: C

Q 91. What is the role of Linux in embedded systems and the Internet of Things (IoT)?

A. Linux is not used in embedded systems and IoT devices.

B. Linux is widely used in embedded systems and IoT devices.

C. Linux is used only in specific IoT applications.

D. Linux is used exclusively in gaming consoles.

Answer: B

Q 92. Which term describes Linux distributions that are developed and maintained by the
community rather than a specific company?
A. Proprietary distributions

B. Corporate distributions

C. Community-driven distributions

D. Enterprise distributions

Answer: C

Q 93. What does the term "rolling-release distribution" mean in the context of Linux distributions?

A. The distribution includes a variety of entertainment software.

B. The distribution provides continuous updates without a specific new version release.

C. The distribution is designed for server management only.

D. The distribution focuses on educational applications.

Answer: B

Q 94. Which major Linux distribution is known for its focus on simplicity and minimalism, often
used for containers?

A. CentOS

B. Alpine Linux

C. Fedora

D. Ubuntu Server

Answer: B

Q 95. In what way did the release of Linux 0.01 contribute significantly to the development of the
Linux community?

A. It introduced a graphical user interface.

B. It marked the beginning of Linux being used in enterprises.

C. It allowed developers to freely distribute the operating system on the Internet.

D. It enabled Linux to run Windows applications.

Answer: C

Q 96. Which Linux distribution is specifically optimized for small and medium-sized businesses?

A. Red Hat

B. Ubuntu
C. ClearOS

D. Fedora

Answer: C

Q 97. What is the primary focus of Red Hat Enterprise Linux (RHEL), making it a popular choice for
enterprises?

A. Gaming and entertainment

B. Educational applications

C. Server management and security

D. Cloud computing

Answer: C

Q 98. What was the primary inspiration behind Linus Torvalds' creation of Linux?

A. Windows operating system

B. Minix operating system

C. Unix operating system

D. macOS operating system

Answer: B

Q 99. In which year was the first version of Linux, Linux 0.01, released by Linus Torvalds?

A. 1985

B. 1991

C. 1995

D. 2000

Answer: B

Q 100. What was the significance of Minix in the development of Linux?

A. Minix served as the source code for Linux development.

B. Minix was the first fully graphical operating system.

C. Minix was developed by Linus Torvalds.

D. Minix inspired the creation of the Internet.


Answer: A

Q 101. What event marked the beginning of Linux's presence in the consumer market?

A. Introduction of Linux-based smart TVs

B. Release of Linux 1.0

C. Adoption by enterprises and businesses

D. Launch of Linux 0.01

Answer: A

Q 102. Which operating system heavily influenced the development of Linux due to its multi-user,
multi-tasking capabilities?

A. Windows

B. Minix

C. macOS

D. Unix

Answer: D

Q 103. What was the key factor that led to the growth of the Linux community in its early stages?

A. Proprietary licensing

B. Closed-source development

C. Open-source nature

D. Paid subscriptions

Answer: C

Q 104. What made Linux a popular choice for enterprises and businesses in the late 1990s and
early 2000s?

A. It had a colorful user interface.

B. It was more flexible, cost-effective, and secure than proprietary operating systems.

C. It was the first operating system to support cloud computing.

D. It was exclusively used in educational institutions.

Answer: B
Q 105. Which term refers to the various versions of Linux created by different developer groups?

A. Versions

B. Revisions

C. Distributions

D. Variants

Answer: C

Q 106. In what areas is Linux widely used in the enterprise today?

A. Only in servers

B. Servers, mainframes, supercomputers, embedded systems, mobile devices, and IoT

C. Mainframes and supercomputers

D. Only in cloud computing

Answer: B

Q 107. What role did the open-source nature of Linux play in its adoption by enterprises?

A. It allowed for free downloads for personal use.

B. It facilitated the development of commercial support and services.

C. It restricted its use to non-profit organizations.

D. It prevented enterprises from adopting Linux.

Answer: B

Q 108. What does the 'sudo' command do in Linux?

A. It updates the system's package lists.

B. It allows a user to run commands with elevated privileges.

C. It removes a package from the system.

D. It searches for specific packages.

Answer: B

Q 109. Which package manager is commonly used in Debian-based systems like Ubuntu?

A. yum

B. apt
C. pacman

D. dnf

Answer: B

Q 110. What does the 'apt update' command do?

A. Installs new packages on the system.

B. Updates the package lists on the system.

C. Removes outdated packages.

D. Searches for specific packages.

Answer: B

Q 111. How do you search for a specific package using apt?

A. apt list <package name>

B. apt find <package name>

C. apt search <package name>

D. apt locate <package name>

Answer: C

Q 112. Which command is used to install a specific package named 'nmap' using apt?

A. apt install nmap

B. apt get nmap

C. apt add nmap

D. apt install-package nmap

Answer: A

Q 113. What does the 'apt upgrade' command do?

A. Installs new packages on the system.

B. Upgrades the installed packages to the latest versions.

C. Removes outdated packages.

D. Searches for specific packages.

Answer: B
Q 114. Which package manager is used in Red Hat-based systems like CentOS?

A. apt

B. pacman

C. dnf

D. yum

Answer: C

Q 115. How can you remove a package named 'package_name' using apt?

A. apt uninstall package_name

B. apt remove package_name

C. apt delete package_name

D. apt purge package_name

Answer: B

Q 116. What does the 'apt search' command do?

A. Searches for specific files on the system.

B. Searches for specific packages in the repository.

C. Lists all installed packages.

D. Displays package usage statistics.

Answer: B

Q 117. What should you do if the 'sudo' command is not working in Linux?

A. Use 'apt-get install sudo' to install the sudo package.

B. Restart the system to fix the issue.

C. Use 'apt update' to refresh the package lists.

D. Reinstall the Linux distribution.

Answer: A

Q 118. What is the purpose of the 'apt search' command in Linux?

A. It searches for specific packages in the repository.


B. It removes a package from the system.

C. It updates the system's package lists.

D. It upgrades installed packages to the latest versions.

Answer: A

Q 119. Which command is used to install a new package on a Debian-based system using apt?

A. apt get <package name>

B. apt install <package name>

C. apt upgrade <package name>

D. apt remove <package name>

Answer: B

Q 120. What does the 'sudo apt update' command do?

A. Installs new packages on the system.

B. Updates the package lists on the system.

C. Removes outdated packages.

D. Searches for specific packages.

Answer: B

Q 121. How can you remove a package named 'example_package' using apt?

A. apt uninstall example_package

B. apt remove example_package

C. apt delete example_package

D. apt purge example_package

Answer: B

Q 122. Which command is used to upgrade all installed packages to their latest versions using apt?

A. apt update

B. apt upgrade

C. apt dist-upgrade

D. apt install
Answer: C

Q 123. What is the purpose of the 'apt purge' command in Linux?

A. It removes configuration files associated with a removed package.

B. It upgrades the system to a new release.

C. It searches for specific packages in the repository.

D. It displays package usage statistics.

Answer: A

Q 124. Which package manager is commonly used in Red Hat-based systems like CentOS?

A. yum

B. dnf

C. apt

D. pacman

Answer: B

Q 125. How do you search for packages containing the term 'network' using apt?

A. apt find network

B. apt search network

C. apt list network

D. apt query network

Answer: B

Q 126. What does the 'sudo' command stand for in Linux?

A. Super User Directory Operations

B. Secure User Delegation Order

C. Super User DO

D. System Utility Directory Organizer

Answer: C

Q 127. In the context of file systems, what is the purpose of an "inode"?


A. It represents a file's name and metadata

B. It stores file data blocks

C. It is used for managing network shares

D. It contains file permissions

Answer: B

Q 128. Which command is used to create a hard link to a file in a Linux file system?

A. link

B. ln

C. mklink

D. create

Answer: B

Q 129. What is the maximum file size limit for the ext4 file system on a typical Linux distribution?

A. 2 GB

B. 4 GB

C. 16 TB

D. 1 PB

Answer: C

Q 130. In the context of file systems, what does the acronym "UUID" stand for?

A. Universal Unique Identifier

B. Uniform User Directory

C. Unique Uniform Disk

D. Universal User Domain

Answer: A

Q 131. When using the 'cd' command, what is the purpose of the double hyphen (cd --)?

A. It moves up two directories

B. It switches to the root directory

C. It ignores any symbolic links


D. It goes to the user's home directory

Answer: C

Q 132. What is the key difference between "soft links" and "hard links" in Linux file systems?

A. Soft links store the actual file data, while hard links store references to file data

B. Soft links can link to directories, while hard links cannot

C. Soft links always have the same inode as the target file

D. Soft links are immune to changes in the target file's path

Answer: A

Q 133. In the 'df' command output, what does the "Use%" column represent?

A. The percentage of used inodes

B. The percentage of used block devices

C. The percentage of used swap space

D. The percentage of used disk space

Answer: D

Q 134. When using the 'du' command to calculate disk usage, what option is used to display sizes
in human-readable format (e.g. MB, GB)?

A. -s

B. -h

C. -t

D. -r

Answer: B

Q 135. What is the primary purpose of the 'tar' command in Linux?

A. To create compressed archives

B. To remove directories and files

C. To create hard links between files

D. To display system logs

Answer: A
Q 136. What is the maximum number of primary partitions allowed on a disk using the Master
Boot Record (MBR) partitioning scheme?

A. 2

B. 4

C. 6

D. 8

Answer: B

Q 137. In the context of file systems, what is the primary role of the "superblock"?

A. To store user data

B. To contain the file's name

C. To manage file permissions

D. To store file system metadata

Answer: D

Q 138. When using the 'touch' command to create a new file, what does the '-a' option do?

A. Updates the access time

B. Updates the modification time

C. Appends content to the file

D. Sets the file as executable

Answer: A

Q 139. What is the primary function of the 'mount' command in Linux?

A. To create a new directory

B. To list available block devices

C. To attach a file system to a directory

D. To calculate disk usage

Answer: C

Q 140. Which file system is commonly used in USB flash drives and memory cards due to its
compatibility with both Linux and Windows?
A. ext4

B. NTFS

C. FAT32

D. HFS+

Answer: C

Q 141. In Linux file systems, what is the main function of the "dentry" cache?

A. To store file data

B. To manage user accounts

C. To cache directory entries

D. To display system logs

Answer: C

Q 142. When using the 'find' command to search for files, what does the -maxdepth option
specify?

A. The maximum file size to search for

B. The maximum depth of subdirectories to search

C. The maximum number of search results to display

D. The maximum search time

Answer: B

Q 143. What does the 'mv' command do in Linux?

A. Move files and directories

B. Display system logs

C. Manage user accounts

D. Create symbolic links

Answer: A

Q 144. In the context of file systems, what does the term "journaling" refer to?

A. Keeping a diary of user activities

B. Maintaining a record of file system changes


C. Managing network connections

D. Monitoring system performance

Answer: B

Q 145. In the 'ls' command, what does the '-i' option display for each file or directory?

A. Inode number

B. Owner's username

C. File size

D. File permissions

Answer: A

Q 146. When mounting a file system in Linux, what does the 'bind' option do?

A. It connects to a remote file system

B. It makes a read-only mount

C. It creates a loopback file system

D. It binds two partitions into one

Answer: C

Q 147. What does the 'fstab' file in Linux contain?

A. User account passwords

B. File system table entries for mounting

C. System logs

D. Network configuration details

Answer: B

Q 148. What is the primary role of the 'stat' command in Linux?

A. List available swap partitions

B. Display system logs

C. Retrieve file and file system status

D. Calculate disk space usage

Answer: C
Q 149. What does the 'blkid' command display when used in a Linux terminal?

A. List of block devices and their attributes

B. Network interface statistics

C. User account information

D. System logs

Answer: A

Q 150. In the context of disk partitions, what does "LVM" stand for?

A. Logical Volume Manager

B. Large Volume Memory

C. Logical Virtual Machine

D. Low-Level Volume Map

Answer: A

Q 151. When configuring a swap file, what is the recommended size for the swap file, relative to
physical RAM?

A. Equal to physical RAM

B. Twice the size of physical RAM

C. Half the size of physical RAM

D. No relationship to physical RAM

Answer: A

Q 152. What is the primary function of the 'rsync' command in Linux?

A. Manage user accounts

B. Synchronize and copy files and directories

C. Display system logs

D. Create hard links

Answer: B

Q 153. In the context of disk partitions, what is the role of a "primary partition"?
A. To store user data

B. To contain the file's name

C. To be used as the boot partition

D. To hold a file system

Answer: C

Q 154. What is the purpose of the 'noatime' option in Linux file systems?

A. To disable file access times

B. To enable file access times

C. To set file permissions

D. To display system logs

Answer: A

Q 155. What does the 'quota' command in Linux allow administrators to do?

A. List available file systems

B. Manage user accounts

C. Set disk usage limits for users

D. Display system logs

Answer: C

Q 156. In the context of file systems, what does the term "chattr" refer to?

A. Changing file attributes

B. Checking file system integrity

C. Managing user accounts

D. Creating file links

Answer: A

Q 157. In the context of file systems, what is the primary function of the "quota" system?

A. To manage network shares

B. To calculate disk usage

C. To set disk usage limits for users


D. To format file systems

Answer: C

Q 158. What is the primary role of the 'resize2fs' command in Linux?

A. To shrink an ext4 file system

B. To create hard links between files

C. To list available disk partitions

D. To format a disk

Answer: A

Q 159. When using the 'file' command in Linux, what does it determine about a file?

A. The file's size in blocks

B. The file's inode number

C. The file's type and content

D. The file's access time

Answer: C

Q 160. What is the maximum number of extended partitions that can be created on a disk using
the MBR partitioning scheme?

A. 1

B. 2

C. 3

D. None, only primary partitions can be extended

Answer: D

Q 161. In Linux, what does the 'cmp' command do when used to compare files?

A. Compare file sizes

B. Display system logs

C. Compare file content byte by byte

D. Create hard links

Answer: C
Q 162. What does the 'ncdu' command in Linux allow users to do?

A. Navigate directories and list files

B. Monitor network connections

C. Create hard links

D. Calculate disk usage in a more user-friendly manner

Answer: D

Q 163. What is the main role of the 'mkfs' command in Linux?

A. To create a mount point

B. To format a file system on a disk partition

C. To calculate disk usage

D. To create a hard link

Answer: B

Q 164. In the context of disk partitions, what is a "logical partition"?

A. A primary partition

B. A partition used for virtual memory

C. A partition that contains data

D. A partition created within an extended partition

Answer: D

Q 165. When using the 'xfs_growfs' command in Linux, what does it allow you to do?

A. Create symbolic links

B. Expand the size of an XFS file system

C. Manage network shares

D. List available block devices

Answer: B

Q 166. What is the primary function of the 'sync' command in Linux?

A. Synchronize file content with a remote server


B. Display system logs

C. Flush file system buffers to disk

D. Set file permissions

Answer: C

Q 167. In the context of file systems, what does the "ACL" acronym stand for?

A. Access Control List

B. Advanced Configuration Layer

C. Administrative Control Logic

D. Authentication and Certification

Answer: A

Q 168. What does the 'findmnt' command display when used in a Linux terminal?

A. A list of all available devices and their mount points

B. A list of installed packages

C. User account information

D. System logs

Answer: A

Q 169. What is the primary role of the 'badblocks' command in Linux?

A. To identify bad sectors on a hard drive

B. To manage user accounts

C. To calculate disk usage

D. To list available file systems

Answer: A

Q 170. What is the purpose of the 'cdrecord' command in Linux?

A. To create symbolic links

B. To manage user accounts

C. To record data on optical discs

D. To format a file system


Answer: C

Q 171. In the context of file systems, what is a "reserved block count"?

A. The number of blocks set aside for root user access

B. The number of blocks used for network sharing

C. The maximum block size allowed for files

D. The total number of free blocks

Answer: A

Q 172. What is the primary function of the 'dumpe2fs' command in Linux?

A. To create a new file system

B. To display system logs

C. To access remote file systems

D. To extract superblock information

Answer: D

Q 173. When using the 'md5sum' command in Linux, what does it calculate for a file?

A. The number of inodes

B. The MD5 hash value for file content

C. The number of directories

D. The file's size in bytes

Answer: B

Q 174. In the context of file systems, what is the purpose of a "quota file"?

A. To track file access times

B. To store user account data

C. To manage network shares

D. To record disk usage quotas

Answer: D

Q 175. What does the 'journalctl' command in Linux allow users to do?
A. Manage file permissions

B. Display system logs from the systemd journal

C. Create symbolic links

D. Calculate disk usage

Answer: B

Q 176. What is the primary role of the 'mkfifo' command in Linux?

A. Create symbolic links

B. Make a file a First In, First Out (FIFO) pipe

C. Format a disk partition

D. Manage file system permissions

Answer: B

Q 177. In the context of file systems, what does the "fuser" command do when used with the '-m'
option?

A. Display file system metadata

B. List open files within a mount point

C. Manage network connections

D. Create hard links

Answer: B

Q 178. What is the purpose of the 'logrotate' command in Linux?

A. To configure network settings

B. To create symbolic links

C. To manage user accounts

D. To rotate and compress log files

Answer: D

Q 179. In the context of file systems, what does the term "Btrfs" refer to?

A. Backup file system

B. Binary file system


C. B-tree file system

D. Bitwise file system

Answer: C

Q 180. What does the 'attr' command in Linux allow users to do?

A. Display system logs

B. Manage user accounts

C. Change extended file attributes

D. Calculate disk usage

Answer: C

Q 181. When using the 'fsck' command in Linux, what does it do to a file system?

A. Formats the file system

B. Calculates disk usage

C. Repairs inconsistencies and checks for errors

D. Lists available block devices

Answer: C

Q 182. In the context of file systems, what does "VFS" stand for?

A. Virtual File System

B. Very Fast Storage

C. Volume File Sharing

D. Variable File Size

Answer: A

Q 183. What is the primary role of the 'unzip' command in Linux?

A. To configure network settings

B. To format file systems

C. To extract files from a compressed archive

D. To manage user accounts

Answer: C
Q 184. In the context of file systems, what does the term "ext3" refer to?

A. Extended file system 3

B. Extra storage technique 3

C. External transfer protocol 3

D. Execution time 3

Answer: A

Q 185. What does the 'sync' command do when used with the '--file-system' option?

A. Synchronize file content with a remote server

B. Display system logs

C. Flush file system buffers to disk

D. Calculate disk usage

Answer: C

Q 186. What is the primary function of the 'lsof' command in Linux?

A. Manage user accounts

B. List open files and the processes that have them open

C. Configure network settings

D. Create symbolic links

Answer: B

Q 187. In Linux, what file type is typically associated with executable programs or scripts?

A. Regular file

B. Directory

C. Symbolic link

D. Block special file

Answer: A

Q 188. Which command can be used to search for files and directories by name in a Linux system?

A. find
B. locate

C. search

D. list

Answer: A

Q 189. What is the primary purpose of the 'cp' command in Linux?

A. To create symbolic links

B. To copy files and directories

C. To remove files

D. To move files to a different location

Answer: B

Q 190. When using the 'rm' command in Linux, what option is used to remove directories and their
contents recursively?

A. -r

B. -d

C. -f

D. -x

Answer: A

Q 191. What is the main function of the 'mkdir' command in Linux?

A. To display system logs

B. To list available block devices

C. To create new directories

D. To change file permissions

Answer: C

Q 192. What does the 'cat' command do in Linux when used without any options or arguments?

A. Display the last lines of a file

B. Display the first lines of a file

C. Merge and concatenate files


D. Display the contents of a file

Answer: D

Q 193. Which command is commonly used for viewing the contents of a file page by page and
allows navigation with arrow keys or other controls?

A. cat

B. less

C. more

D. head

Answer: B

Q 194. What is the primary purpose of the 'head' command in Linux when used with the '-n'
option (e.g. , head -n 10)?

A. To display the last lines of a file

B. To display the first n lines of a file

C. To display the middle lines of a file

D. To display the first n characters of a file

Answer: B

Q 195. In Linux, what is the primary function of the 'tail' command when used with the '-f' option
(e.g. , tail -f file)?

A. To display the first lines of a file

B. To monitor and display updates to a file in real-time

C. To display the last lines of a file

D. To copy the contents of a file

Answer: B

Q 196. In the context of file permissions, what does the 'chmod' command do in Linux?

A. Changes file ownership

B. Lists available block devices

C. Modifies file and directory permissions

D. Creates symbolic links


Answer: C

Q 197. What is the primary role of the 'chown' command in Linux?

A. To create new directories

B. To change the owner of a file or directory

C. To display system logs

D. To copy files to a different location

Answer: B

Q 198. In the context of file permissions, what does the 'chgrp' command do in Linux?

A. To create new directories

B. To change the group ownership of a file or directory

C. To display system logs

D. To copy files to a different location

Answer: B

Q 199. In Linux, which command is used to change the ownership of a file or directory?

A. chperm

B. chown

C. chmod

D. chgrp

Answer: B

Q 200. What does the 'mkdir' command do in Linux?

A. List files and directories

B. Remove a file

C. Create a new directory

D. Display system logs

Answer: C

Q 201. Which Linux command is used to change file permissions for a file or directory?
A. chmod

B. chown

C. chgrp

D. chperm

Answer: A

Q 202. What does the 'rm' command do in Linux?

A. Rename a file

B. Display the content of a file

C. Remove a file or directory

D. Create a new file

Answer: C

Q 203. In Linux, what is the purpose of the 'find' command?

A. Search for files and directories based on specified criteria

B. Display system logs

C. Create new files

D. Change file permissions

Answer: A

Q 204. What is the primary function of the 'rmdir' command in Linux?

A. Rename a directory

B. Create a new directory

C. Remove a directory

D. Display the content of a directory

Answer: C

Q 205. In Linux, what is the main role of the 'cp' command?

A. Change file ownership

B. Copy files and directories

C. Change file permissions


D. Create a new user account

Answer: B

Q 206. What does the 'locate' command do in Linux?

A. Create symbolic links

B. Search for files and directories using a database

C. Display system logs

D. Change the root password

Answer: B

Q 207. In Linux, what is the primary purpose of the 'passwd' command?

A. Change the root password

B. Display system logs

C. Create new user accounts

D. Change user passwords

Answer: D

Q 209. Which Linux command is used to display the last part of a file or stream in real time?

A. cat

B. less

C. more

D. tail

Answer: D

Q 210. What is the primary function of the 'cat' command in Linux?

A. Display the first few lines of a file

B. Create a new file

C. List files and directories

D. Concatenate and display file content

Answer: D
Q 211. In Linux, which command is used to display the first part of a file?

A. tail

B. more

C. head

D. less

Answer: C

Q 212. What does the 'less' command do in Linux?

A. Display the first part of a file

B. Display system logs

C. Display the last part of a file

D. Display file content interactively with scrolling

Answer: D

Q 213. Which command is used to view the contents of a file in Linux and is especially useful for
large files?

A. cat

B. more

C. head

D. less

Answer: D

Q 214. In Linux, what does the command 'chmod 755 file.txt' do to 'file.txt'?

A. Sets the file as executable by the owner, and readable and executable by others

B. Sets the file as readable and writable by the owner

C. Sets the file as readable and writable by others

D. Sets the file as readable and executable by the owner

Answer: A

Q 215. What is the purpose of the 'chgrp' command in Linux?

A. Change file ownership


B. Create a new group

C. List available groups

D. Change file permissions

Answer: A

Q 216. In Linux, what does a permission of 'r--r-----' mean for a file?

A. Readable and writable by the owner, readable by the group

B. Executable by the owner, writable by the group

C. Readable by the owner, writable by the group

D. Readable by the owner, no access for the group

Answer: A

Q 217. In Linux, what does a permission of 'drwxr-xr-x' mean for a directory?

A. Readable and writable by the owner, readable by others

B. Executable by the owner, writable by the group

C. Readable and writable by the owner, readable by the group

D. Readable and executable by the owner, others can read and execute

Answer: C

Q 218. What does the 'ls -l' command in Linux display for files and directories?

A. A list of file and directory names

B. The number of files and directories in a directory

C. Detailed file and directory permissions and attributes

D. A summary of system logs

Answer: C

Q 220. In Linux, what is the purpose of the 'touch' command?

A. Create a new file

B. Change file permissions

C. List files and directories

D. Display system logs


Answer: A

Q 221. What is the primary function of the 'cp' command when used with the '-r' option?

A. Copy files and directories recursively

B. Change file ownership

C. Remove files

D. Display system logs

Answer: A

Q 222. In Linux, what does the 'mv' command do when moving a file within the same directory?

A. Create a copy of the file

B. Rename the file

C. Delete the file

D. Change file permissions

Answer: B

Q 223. What does the 'find' command in Linux do when used with the '-name' option?

A. Search for files and directories based on their names

B. Display system logs

C. Create new files

D. Change file permissions

Answer: A

Q 224. In Linux, what does the 'rm -r' command do when removing a directory?

A. Remove the directory and its contents recursively

B. Rename the directory

C. Change directory permissions

D. Display the directory's contents

Answer: A

Q 225. What does the 'locate' command do in Linux when used with the '-i' option?
A. Case-insensitive search for files and directories

B. Create symbolic links

C. Display system logs

D. Change file ownership

Answer: A

Q 226. In Linux, what is the main role of the 'passwd' command when used without arguments?

A. Change the password for the current user

B. Display system logs

C. Create a new user account

D. Change user passwords

Answer: A

Q 227. What is the primary purpose of the 'rmdir' command in Linux?

A. List files and directories

B. Create a new directory

C. Change directory permissions

D. Remove an empty directory

Answer: D

Q 228. In Linux, what does the 'cp -i' command do when copying files?

A. Copy files interactively and prompt for confirmation

B. Rename files

C. Create symbolic links

D. Change file ownership

Answer: A

Q 229. What is the primary function of the 'cat' command when used with the '-n' option?

A. Display line numbers with file content

B. Create a new file

C. List files and directories


D. Display system logs

Answer: A

Q 230. What does the 'less' command in Linux allow users to do with file content?

A. Navigate through the file using arrow keys

B. Create a new file

C. Change file permissions

D. Rename files

Answer: A

Q 231. In Linux, what does the 'more' command do when displaying file content?

A. Display the entire file content at once

B. Display file content one page at a time

C. List files and directories

D. Display system logs

Answer: B

Q 232. What does the 'head' command do in Linux when used with the '-n' option?

A. Display the first 'n' lines of a file

B. Display system logs

C. Display the last 'n' lines of a file

D. Create a new file

Answer: A

Q 233. In Linux, what does the 'tail -f' command do when used to view log files?

A. Display the first 'n' lines of a file

B. Display system logs

C. Continuously display new log entries as they are added

D. Create a new file

Answer: C
Q 234. In Linux, what does the 'chmod 644 file.txt' command do to 'file.txt'?

A. Sets the file as readable and writable by the owner, readable by others

B. Sets the file as readable and executable by the owner

C. Sets the file as writable by the owner, readable by others

D. Sets the file as readable by the owner, no access for others

Answer: A

Q 235. In Linux, what is the primary function of the 'chown' command when used with the '-R'
option?

A. Change file ownership recursively for a directory and its contents

B. Create a new user account

C. Change file ownership for a single file

D. Display system logs

Answer: A

Q 236. What does the 'ls' command display when used with the '-a' option in Linux?

A. Hidden files and directories

B. A list of file and directory names

C. Detailed file and directory permissions

D. A summary of system logs

Answer: A

Q 237. In Linux, what does the 'chgrp' command do when changing group ownership for a file or
directory?

A. Change the file's permissions

B. Change the user's password

C. Change the group ownership

D. Create a new group

Answer: C

Q 238. What is the primary purpose of the 'ls -R' command in Linux?

A. List files and directories recursively


B. Rename files

C. Change file permissions

D. Display system logs

Answer: A

Q 239. In Linux, what is the primary purpose of the 'echo' command?

A. Display the content of a file

B. Create a new directory

C. Print messages or text to the terminal

D. Change file permissions

Answer: C

Q 240. What is the default behavior of the 'echo' command in Linux when used without options?

A. It displays messages with line breaks

B. It does not display anything

C. It displays messages without line breaks

D. It displays only file names

Answer: C

Q 241. In Linux, what does the 'cat' command do when used without any arguments?

A. Concatenate and display the content of all files in the current directory

B. Create a new file

C. List files and directories

D. Display system logs

Answer: A

Q 242. What does the 'cat' command do in Linux when used with the '-n' option?

A. Display the last 'n' lines of a file

B. Display line numbers with file content

C. Display system logs

D. Create a new file


Answer: B

Q 243. In Linux, what is the primary role of the 'sudo' command?

A. Create a new user account

B. Display system logs

C. Execute commands with superuser privileges

D. Change file ownership

Answer: C

Q 244. What is the purpose of the 'sudo -l' command in Linux?

A. List available user accounts

B. List available commands a user can run with sudo

C. Create a new directory

D. Change user passwords

Answer: B

Q 245. In Linux, what is the primary use of the 'echo' command with the '-e' option?

A. Display environment variables

B. Create a new directory

C. Interpret escape sequences in the output

D. Change file permissions

Answer: C

Q 246. What does the 'echo' command do when used with the '-n' option in Linux?

A. Display messages with a trailing newline

B. Display line numbers with file content

C. Suppress the trailing newline character in the output

D. Create a new file

Answer: C

Q 247. In Linux, what is the purpose of using double quotes (") with the 'echo' command?
A. To suppress the output

B. To display messages with escape sequences

C. To display line numbers with file content

D. To create a new directory

Answer: B

Q 248. How can you use the 'echo' command to append text to an existing file in Linux?

A. echo "text" >> file.txt

B. echo "text" > file.txt

C. echo "text"

D. file.txt

Answer: A

Q 249. What is the primary purpose of the 'echo' command with the '-E' option in Linux?

A. List available user accounts

B. Display system logs

C. Interpret escape sequences in the output

D. Display messages without escape sequences

Answer: D

Q 250. What does the 'echo' command do when used with the '-E' option and a backslash ('')
followed by a character, such as '\n'?

A. Interpret escape sequences in the output

B. Create a new directory

C. List available commands

D. Display system logs

Answer: A

Q 251. In Linux, how can you use the 'echo' command to display the value of an environment
variable, such as 'HOME'?

A. echo $HOME

B. echo "HOME"
C. echo (HOME)

D. echo &HOME

Answer: A

Q 252. What is the effect of using the 'echo' command with the '-E' option and '\c' as an argument
in Linux?

A. Display system logs

B. Suppress trailing newline and further output

C. Interpret escape sequences in the output

D. Create a new file

Answer: B

Q 253. What does the 'echo' command do when used with the '-s' option in Linux?

A. Create a new directory

B. Display line numbers with file content

C. Suppress error messages in the output

D. List available user accounts

Answer: C

Q 254. How can you use the 'echo' command to display the result of an arithmetic operation in
Linux?

A. echo $(expr 5 + 3)

B. echo 5 + 3

C. echo "5 + 3"

D. echo $[5 + 3]

Answer: A

Q 255. What is the primary purpose of the 'cat' command when used with the '-s' option in Linux?

A. Create a new file

B. Suppress repeated empty lines in the output

C. Display system logs

D. Change file permissions


Answer: B

Q 256. In Linux, what does the 'cat' command do when used with the '-v' option?

A. Display hidden files

B. Display line numbers with file content

C. Display non-printing characters with '^' notation

D. Create a new directory

Answer: C

Q 257. What is the purpose of the 'cat' command when used with the '-T' option in Linux?

A. Display tab characters as '^I'

B. Display system logs

C. List available user accounts

D. Create a new file

Answer: A

Q 258. In Linux, how can you use the 'cat' command to concatenate the content of multiple files
into a new file?

A. cat file1.txt file2.txt > combined.txt

B. cat file1.txt file2.txt

C. combined.txt

D. cat "file1.txt file2.txt" > combined.txt

Answer: A

Q 259. What is the effect of using the 'cat' command with the '-E' option in Linux?

A. Display hidden files

B. Display line numbers with file content

C. Display non-printing characters with '$' notation

D. Create a new file

Answer: C
Q 260. What does the 'cat' command do when used with the '-n' option in Linux?

A. Display line numbers with file content

B. Create a new directory

C. Suppress empty lines in the output

D. Display system logs

Answer: A

Q 261. In Linux, how can you use the 'cat' command to create a new file with specific content?

A. cat > newfile.txt

B. cat -o newfile.txt

C. cat -c newfile.txt

D. cat create newfile.txt

Answer: A

Q 262. What is the primary purpose of the 'cat' command when used with the '-u' option in Linux?

A. Change file permissions

B. Display system logs

C. Suppress the output

D. Unbuffered output to the terminal

Answer: D

Q 263. What does the 'cat' command do when used with the '-A' option in Linux?

A. Display all files in a directory

B. Display system logs

C. Display non-printing characters with '^' notation

D. Create a new file

Answer: C

Q 264. In Linux, how can you use the 'cat' command to display the content of a file with line
numbers?

A. cat -n file.txt
B. cat "file.txt -n"

C. cat (file.txt -n)

D. cat file.txt

Answer: A

Q 265. In Linux, what is the primary purpose of the 'sudo -l' command?

A. List available commands a user can run with sudo

B. Display system logs

C. Create a new user account

D. Change user passwords

Answer: A

Q 266. How does the 'sudo' command in Linux verify a user's identity when running commands
with superuser privileges?

A. By requiring the user to enter their username

B. By using a password provided by the user

C. By checking the user's biometric data

D. By verifying the user's password

Answer: D

Q 267. In Linux, what is the effect of running a command with 'sudo' when a user is not part of the
'sudo' group?

A. The command will run with superuser privileges

B. The command will run with limited privileges

C. The command will not run

D. The user will be prompted to create a new group

Answer: B

Q 268. What is the primary role of the 'sudo -k' command in Linux?

A. List available commands a user can run with sudo

B. Display system logs

C. Revoke the sudo session, requiring reauthentication


D. Create a new user account

Answer: C
MIX

1. In a typical file system, what is the top-level directory?

a. /

b. /home

c. /bin

d. /mnt

Answer: a

2. Which directory in a Linux file system contains system configuration files and device

drivers?

a. /home

b. /etc

c. /usr

d. /opt

Answer: b

3. Which command is used to change the current working directory in a terminal?

a. rd

b. cw

c. cd

d. Chdir

Answer: c

4. To list the contents of the current directory, which command is used?

a. dir

b. ls

c. list

d. Cd

Answer: ls
5. Which command is used to display the current working directory in a terminal?

a. wd

b. pwd

c. currentdir

d. Printdir

Answer: b

6. What is the purpose of the /home partition in Linux?

a. It stores the Linux kernel.

b. It contains system configuration files.

c. It holds user data and profiles.

d. It manages network connections.

Answer: c

7. Which command is used to view the current partition table on a Linux system?

a. fdisk

b. ls

c. top

d. Partedit

Answer: a

8. In Linux, what is the purpose of the /boot partition?

a. It contains the system's bootloader files.

b. It stores user documents and files.

c. It manages network connections.

d. It hosts system binaries and libraries.

Answer: a

9. What is the primary advantage of using Logical Volume Management (LVM) in Linux

partitioning?
a. It simplifies the installation process.

b. It allows for dynamic resizing of partitions.

c. It enhances system security.

d. It improves graphics performance.

Answer: b

10. In Linux, what is the purpose of the root (/) partition?

a. It contains user home directories.

b. It stores system logs.

c. It holds the operating system and system files.

d. It manages system services.

Answer: c

11. Which Linux distribution is known for its use in supercomputing clusters and server

environments?

a. Ubuntu

b. Fedora

c. CentOS

d. Arch Linux

Answer: c

12. What is the purpose of the sudo command in Linux?

a. To shut down the computer

b. To switch between users

c. To execute commands with superuser privileges

d. To list installed packages

Answer: c

13. Which shell is the default command-line interface in most Linux distributions?

a. Bash

b. PowerShell
c. Zsh

d. CMD

Answer:a

14. Which protocol is commonly used for remote shell access in Linux?

a. FTP

b. SSH

c. HTTP

d. Telnet

Answer: b

15. What is the name of the Linux kernel's memory management system?

a. Paging

b. Swapping

c. Segmentation

d. Virtual memory

Answer: a

16. Which command is used to display information about available memory and swap space

in Linux?

a. df

b. du

c. fdisk

d. Top

Answer: a

17. What happens when RAM is full and swap space is also exhausted in a Linux system?

a. The system crashes

b. New memory is allocated from the hard drive

c. The kernel reclaims memory from running processes

d. The operating system prompts the user to close applications


Answer:a

18. What file is commonly used to configure and enable swap space in Linux?

a. /etc/memory.conf

b. /etc/swap.conf

c. /etc/fstab

d. /etc/swapfile

Answer: c

19. To create a swap file in Linux, which command is used?

a. mkfs

b. dd

c. swapon

d. fallocate

Answer:d

20. What is the recommended size for a swap partition or file in Linux?

a. Equal to the RAM size

b. Twice the RAM size

c. 1 GB

d. 10% of the hard drive size

Answer: a

1. Which command is used to append the output of a command to an existing file in Linux?

a. >>

b. <

c. |

d. &

Answer: a

2. In Linux, what command is used to change file permissions?


a. chmod

b. chown

c. chgrp

d. Perm

Answer: a

3. What is the command to change the permission of a file to read, write, and execute for the

owner, read-only for the group, and no access for others?

a. chmod 750

b. chmod 755

c. chmod 644

d. chmod 777

Answer: b

4. In a file permission string like "rwxr-xr--," what does the "r" represent?

a. Read permission

b. Write permission

c. Execute permission

d. User ownership

Answer:a

5. Which octal value corresponds to full read, write, and execute permissions for the owner,

read and execute for the group, and no permissions for others?

a. 755

b. 644

c. 777

d. 664

Answer: a

6. Which permission mode in Linux grants full control over a file or directory to the owner,

group, and others?


a. 600

b. 700

c. 666

d. 777

Answer: d

7. Which command is used to change the owner of a file or directory in Linux?

a. owner

b. changeowner

c. chown

d. Own

Answer: c

8. In Linux, what is the command used to change the group ownership of a file or directory?

a. group

b. changegroup

c. chgrp

d. Grp

Answer: c

9. What is the command to change the owner of a file to "newuser" in Linux?

a. chown newuser filename

b. changeowner -u newuser filename

c. own -u newuser filename

d. userchown newuser filename

Answer: a

10. Which command is used to change the group ownership of a file to "newgroup" in Linux?

a. chgrp newgroup filename

b. groupchown -g newgroup filename

c. changegroup -g newgroup filename


d. chown -g newgroup filename

Answer: a

11. You have a file named "image.jpg." You want to check its type without using the "file"

command. What command can help you determine its type?

a. showtype image.jpg

b. ls -l image.jpg

c. cat image.jpg

d. filetype image.jpg

Answer: d

12. You need to identify the type of a directory named "docs" in your Linux system. Which

command should you use?

a. file docs

b. cat docs

c. ls -l docs

d. showtype docs

Answer: a

13. You want to create a new file called "notes.txt" in your home directory. Which command

should you use?

a. touch notes.txt

b. cp notes.txt

c. mkdir notes.txt

d. mv notes.txt

Answer: a

14. You want to remove a directory and its contents, including subdirectories, in Linux. Which

command should you use?

a. rmdir

b. rm -r
c. mv

d. cp -r

Answer: b

15. You need to grant read and write permissions to the owner and the group for a file

named "document.doc" without affecting others' permissions. Which command should you

use?

a. chmod u+rw,g+rw document.doc

b. chmod o+rwx document.doc

c. chmod a+rw document.doc

d. chmod +rwx document.doc

Answer:a

1. Which of the following command is used to count the total number of lines, words,

and characters contained in a file?

a. wc

b. count

c. countwc

d. None of the above

Answer: a

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

a. Bash

b. Shell

c. Kernal

d. Compiler

Answer: c

3. Identify the OS which is not based on Linux.

a. CentOS

b. BSD
c. Red hat

d. Ubuntu

Answer: b

4. Where is the user password stored?

a. /etc/password

b. /root/password

c. /root/users

d. /etc/user

Answer: a

5. Directory have following device special files?

a. /etc

b. /etc/dev

c. /etc/bin

d. /dev

Answer: d

6. Using swap space significantly ___the performance of system.

a. Increase

b. Decrease

c. Maintains

d. Does not effect

Answer: a

7. Linux__ the use of multiple swap spaces.

a. Allows

b. Doesn’t allow

c. May allow

d. None of the abve

Answer: a
8. The command used for renaming the files is_____

a. rename

b. mv

c. cp

d. move

Answer: b

9. Which option of rmdir command will remove all directories a, b, c if path is a/b/c

a. –b

b. –o

c. –p

d. –t

Answer: c

10. Command used to count number of character in a file is

a) grep

b) wc

c) count

d) cut

Answer: b

11 . Which of the following Linux distributions is known for its use in enterprise

environments?

a. Ubuntu

b. Fedora

c. CentOS

d. Arch Linux

Answer: c

12. Which file system is commonly used in Linux for the root partition?
a. NTFS

b. ext4

c. FAT32

d. HFS+

Answer: b

13. During the Linux installation process, what is the purpose of the bootloader?

a. It manages user accounts.

b. It initializes hardware devices.

c. It loads the operating system.

d. It controls system clock settings.

Answer: c

14. Which partition type is typically used for virtual memory (swap) in Linux installations?

a. Primary partition

b. Extended partition

c. Logical partition

d. Swap partition

Answer: d

15. In a dual-boot installation, what is the process of selecting which operating system to

boot into called?

a. Partitioning

b. Bootloader

c. Grub

d. Boot menu

Answer: d

16. Who is often credited with creating the Linux kernel?

a. Linus Torvalds

b. Richard Stallman
c. Steve Jobs

d. Bill Gates

Answer: a

17. In what year was the Linux kernel first released by Linus Torvalds?

a. 1991

b. 1984

c. 2000

d. 1978

Answer: a

18. Which open-source project served as an inspiration for Linus Torvalds when creating

Linux?

a. GNU Project

b. Microsoft Windows

c. Apple macOS

d. Android OS

Answer: a

19. What programming language was primarily used to develop the Linux kernel?

a. C++

b. Java

c. Python

d. C

Answer: d

20. What was the original name of the Linux kernel?

a. Linux OS

b. GNU Kernel

c. Freax

d. Unix Lite
Answer: c

1. You want to remove all permissions for the group on a file named "file.txt" without affecting

the owner's permissions. Which command should you use?

a. chmod g= file.txt

b. chmod g-rwx file.txt

c. chmod g+x file.txt

d. chmod g+w file.txt

Answer: b

2. You want to change the owner and group ownership of a file named "data.csv" to

"newuser" and "newgroup" respectively. What command should you use?

a. chown newuser:newgroup data.csv

b. chgrp newgroup data.csv

c. changeowner -u newuser -g newgroup data.csv

d. own -u newuser -g newgroup data.csv

Answer: a

3. You want to change the group ownership of a directory named "shared" to "projectteam"

without affecting the owner or others. What command should you use?

a. chgrp projectteam shared

b. chown projectteam shared

c. change group projectteam shared

d. chown -g projectteam shared

Answer: a

4. You want to determine the type of a shell script named "myscript.sh." What command

should you use?

a. file myscript.sh

b. showtype myscript.sh

c. cat myscript.sh
d. filetype myscript.sh

Answer: a

5. You have a file named "data.csv" that you suspect might be a compressed archive. What

command can help you identify its type?

a. file data.csv

b. unzip data.csv

c. tar data.csv

d. showtype data.csv

Answer: a

6. You have a directory named "images" with several subdirectories and files, and you want

to remove it along with its contents. Which command should you use?

a. rmdir images

b. rm -r images

c. mv images

d. cp -r images

Answer: b

7. You need to create an empty file named "todo.txt" in your current directory. What

command should you use?

a. touch todo.txt

b. cp todo.txt

c. mkdir todo.txt

d. echo todo.txt

Answer: a

8. You want to grant execute permission to everyone (owner, group, and others) for a file

named "script.sh." Which command should you use?

a. chmod a+x script.sh

b. chmod +x script.sh
c. chmod o+x script.sh

d. chmod u+x script.sh

Answer: a

9. You need to change the owner of a file named "config.conf" to "adminuser." What

command should you use?

a. chown adminuser config.conf

b. changeowner -u adminuser config.conf

c. own -u adminuser config.conf

d. chowner adminuser config.conf

Answer: a

10. You have a directory named "docs" that should be owned by a user named "documenter"

and a group named "documentation." What command should you use to set both owner and

group ownership?

a. chown documenter:documentation docs

b. chgrp documentation docs

c. changeowner -u documenter -g documentation docs

d. own -u documenter -g documentation docs

Answer: a

11. You need to identify the type of a file in your Linux system. Which command should

you use?

a. ls

b. file

c. cat

d. Mv

Answer: b

12. You want to check the file type of a particular file named "document.pdf." Which

command will help you determine its type?


a. filetype document.pdf

b. file document.pdf

c. ls -l document.pdf

d. showtype document.pdf

Answer: b

13. You want to create a new directory called "photos" in your home directory. Which

command should you use?

a. mkdir photos

b. touch photos

c. cp photos

d. rmdir photos

Answer: a

14. You have a file named "report.txt," and you want to make a copy of it in the same

directory with the name "backup.txt." What command should you use?

a. cp report.txt backup.txt

b. mv report.txt backup.txt

c. touch report.txt backup.txt

d. copy report.txt backup.txt

Answer: a

15. You want to change the permissions of a file so that the owner can read, write, and

execute, the group can read and execute, and others have no permissions. Which

command should you use?

a. chmod 751 filename

b. chmod 755 filename

c. chmod 644 filename

d. chmod 777 filename

Answer: a
1. What is an absolute path in a file system?

a. A path that starts from the root directory (e.g., /home/user/docs)

b. A path relative to the current working directory (e.g., ../file.txt)

c. A path to a network location (e.g., //server/share)

d. A path containing only the file name (e.g., file.txt)

Answer: a

2. In a relative path, what does ".." represent?

a. The root directory

b. The current directory

c. The parent directory

d. The user's home directory

Answer: c

3. Which command is used to create a new, empty file in a Linux terminal?

a. newfile

b. createfile

c. touch

d. Addfile

Answer: c

4. To copy a file from one location to another, which command is used?

a. move

b. mv

c. copy

d. Cp

Answer: d

5. Which command is used to create a new directory in a Linux file system?

a. makedir

b. mkdir
c. createdir

d. Newdir

Answer: b

6. What is a chroot jail in Linux installation?

a. A method to restrict access to root directories.

b. A utility for compressing files during installation.

c. A tool for configuring user accounts.

d. A feature for dual-booting multiple operating systems.

Answer: a

7. Which of the following is not a bootable Linux file system?

a. ext4

b. NTFS

c. Btrfs

d. XFS

Answer: b

8. What is the purpose of the /tmp partition in Linux?

a. It manages system backups.

b. It stores temporary files.

c. It controls network settings.

d. It hosts user profiles.

Answer: b

9. When installing Linux on a UEFI system, which partition is required to store the UEFI

firmware's bootloader?

a. /boot

b. /boot/efi

c. /var

d. /swap
Answer: b

10. What command can you use to install software packages on a Debian-based Linux

distribution, such as Ubuntu?

a. rpm

b. dpkg

c. yum

d. pacman

Answer: b

11. Which tool is used to automate software configuration and deployment in Linux

environments?

a. Puppet

b. Dropbox

c. Google Drive

d. Adobe Photoshop

Answer: a

12. What is the name of the command used to search and install software packages in a

Debian-based Linux distribution?

a. apt-get

b. yum

c. rpm

d. Dnf

Answer: a

13. Which Linux feature allows a user to run a program as though they were another user,

typically the superuser?

a. sudo

b. su

c. chroot
d. Chmod

Answer: b

14. Which file stores user account information, including the hashed passwords, in Linux?

a. /etc/password

b. /etc/passwd

c. /etc/shadow

d. /var/users

Answer: c

15. What is the purpose of the crontab in Linux?

a. To schedule recurring tasks

b. To manage printer settings

c. To monitor system logs

d. To configure network connections

Answer: a

16. To activate a new swap file in Linux, which command should be run?

a. activate

b. addswap

c. swapon

d. swapactivate

Answer: c

17. In a typical Linux boot process, which component is responsible for initializing the

hardware components and detecting bootable devices?

a. Kernel

b. BIOS/UEFI

c. GRUB

d. init

Answer: b
18. What is the purpose of the extended partition in a disk partitioning scheme?

a. It stores user data and files.

b. It contains system configuration files.

c. It acts as a container for logical partitions.

d. It holds the operating system kernel.

Answer: c

19. When the Linux kernel decides to move a portion of data from RAM to swap space, this

operation is called:

a. Paging

b. Swapping

c. Fragmentation

d. Segmentation

Answer: b

20. Which command is used to permanently enable a swap file in Linux by adding an entry

to the /etc/fstab file?

a. swapon

b. fallocate

c. mkfs

d. fstab

Answer: d

1. What is the purpose of the /usr directory in a Linux file system?

a. It contains user home directories.

b. It stores system configuration files.

c. It holds system binaries and libraries.

d. It hosts temporary files.

Answer: c
2. Which directory in a Linux file system is used to store user-specific configuration files and

data?

a. /lib

b. /tmp

c. /var

d. /home

Answer: d

3. In a Linux terminal, what does the "cd .." command do?

a. Changes to the home directory

b. Lists files in the current directory

c. Moves to the parent directory

d. Creates a new directory

Answer: c

4. What does the "ls -l" command display in a Linux terminal?

a. List of files in a detailed format

b. Contents of hidden files

c. The number of subdirectories

d. File sizes in kilobytes

Answer: a

5. Which command is used to navigate to the user's home directory in a Linux terminal?

a. cd /

b. cd ~

c. cd /home

d. cd ../..

Answer: b

6. What is the relative path to the directory "docs" from the directory "images"?
a. ../docs

b. ./docs

c. images/docs

d. ../../docs

Answer:a

7. In an absolute path, what does the forward slash (/) represent?

a. The root directory

b. The current directory

c. The parent directory

d. The home directory

Answer: a

8. Which command is used to create a copy of a directory and its contents in Linux?

a. copydir

b. clonedir

c. cp -r

d. Mv

Answer: c

9. To move a file from one location to another and rename it, which command is used?

a. move

b. rename

c. mv

d. Cp

Answer: c

10. What is the purpose of the "touch" command in Linux?

a. To change directory permissions

b. To create a new directory

c. To update a file's timestamp or create an empty file


d. To copy files to a different location

Answer: c

11. What is the purpose of a disk partition in a Linux file system?

a. To organize files and directories

b. To store user data and files

c. To manage hardware devices

d. To create virtual machines

Answer:a

12. Which file system is commonly used in Linux for the root partition?

a. NTFS

b. ext4

c. FAT32

d. HFS+

Answer: b

13. What is the primary purpose of the "df" command in Linux?

a. Display disk usage and space available on mounted file systems

b. Create new files

c. List directory contents

d. Change directory permissions

Answer: a

14. Linux follows a monolithic kernel architecture. What does this mean?

a. It has a single, unified user interface.

b. The kernel is tightly integrated with device drivers and system services.

c. The kernel is distributed across multiple servers.

d. It uses a microkernel for improved performance.

Answer: b
15. In the Linux kernel architecture, which layer is responsible for managing hardware

devices and providing device drivers?

a. Shell

b. Init

c. Hardware Abstraction Layer (HAL)

d. Kernel Space

Answer: d

1. What is the first program that runs when a computer is turned on?

a. BIOS/UEFI

b. GRUB

c. Kernel

d. init

Answer: a

2. In the boot process, the BIOS/UEFI is responsible for:

a. Loading the operating system kernel

b. Initializing hardware components

c. Running user applications

d. Managing file systems

Answer:b

3. GRUB (Grand Unified Bootloader) is commonly used in Linux for:

a. Managing user accounts

b. Loading the Linux kernel

c. Installing software packages

d. Disk partitioning

Answer:b

4. The Linux kernel is loaded into:

a. RAM
b. ROM

c. Hard drive

d. CPU cache

Answer: a

5. What is the purpose of partitioning a hard drive in Linux?

a. To organize files and folders

b. To create user accounts

c. To install the Linux kernel

d. To manage hardware devices

Answer: a

6. In a dual-boot setup, which term refers to the process of running two different operating

systems on the same computer?

a. Partitioning

b. Virtualization

c. Dual booting

d. Multi-threading

Answer: c

7. The Master Boot Record (MBR) is typically used in:

a. UEFI systems

b. Legacy BIOS systems

c. Virtual machines

d. Embedded systems

Answer: b

8. When setting up a dual boot with Windows and Linux, which operating system should be

installed first?

a. Linux

b. Windows
c. The order doesn't matter

d. It depends on the specific requirements

Answer: b

9. What is the purpose of virtual memory in an operating system?

a. To create virtual machines

b. To run applications in a virtual environment

c. To provide additional memory by using disk space

d. To create secure virtual private networks (VPNs)

Answer: c

10. In Linux, what is the primary function of swap space?

a. It stores user files and documents

b. It accelerates CPU performance

c. It provides additional memory when RAM is full

d. It manages hardware drivers

Answer: c

11. Which installation method allows you to run Linux alongside your existing operating

system without modifying your hard drive?

a. Dual-boot

b. Live CD

c. Wubi

d. Full installation

Answer: b

12. What is the purpose of a Live CD or Live USB when installing Linux?

a. It provides live streaming of Linux conferences.

b. It allows you to use Linux without installation.

c. It contains a lightweight version of Linux.

d. It installs Linux directly to the hard drive.


Answer: b

13. Which of the following Linux distributions is known for its user-friendly installation

process and desktop environment?

a. Debian

b. Gentoo

c. Linux Mint

d. Slackware

Answer: c

14. What is the name of the package manager commonly used to install software in Red

Hat-based Linux distributions?

a. dpkg

b. APT

c. RPM

d. YUM

Answer: c

15. What tool is used for managing and configuring hardware devices in Linux installations?

a. System Preferences

b. Device Manager

c. Control Center

d. Lspci

Answer: d

16. Which of the following best describes Linux's file system?

a. FAT32

b. NTFS

c. Ext4

d. HFS+

Answer: Ext4
17. Linux is known for its multi-user capabilities. What is the name of the concept that allows

multiple users to execute processes simultaneously on the same machine?

a. Multi-core processing

b. Time-sharing

c. Single-user mode

d. Cooperative multitasking

Answer: b

18. Which desktop environment is commonly associated with Linux?

a. GNOME

b. Windows Aero

c. macOS Finder

d. KDE

Answer: a

19. Which package manager is commonly used for software installation and management in

Linux distributions like Ubuntu and Debian?

a. RPM

b. YUM

c. APT

d. Brew

Answer: c

20. What is the primary advantage of using Linux over other operating systems?

a. Proprietary software availability

b. Cost (usually free)

c. User-friendly interface

d. Limited software compatibility

Answer: b
1. What command is used to display the type of a file in Linux?

a. file

b. showtype

c. filetype

d. Fileinfo

Answer: a

2. Which Linux file type represents a directory?

a. F

b. D

c. P

d. E

Answer: d

3. Which command is used to search for files and directories in a Linux system?

a. search

b. find

c. locate

d. Query

Answer: b

4. What command is used to change the password for a user in Linux?

a. passwd

b. password

c. setpassword

d. Changepw

Answer: a

5. Which command is used to copy a file or directory in Linux?

a. mv

b. cp
c. rm

d. Mkdir

Answer: b

6. To remove a file in Linux, which command is used?

a. copy

b. cp

c. rm

d. Move

Answer: c

7. Which command is used to move or rename a file or directory in Linux?

a. cp

b. rm

c. mv

d. Rename

Answer: c

8. What command is used to create a new directory in Linux?

a. mkd

b. dir

c. mkdir

d. Newdir

Answer: c

9. To remove an empty directory in Linux, which command is used?

a. rmdir

b. rmd

c. rm -r

d. Del

Answer: a
10. Which command is used to display the entire content of a file in Linux?

a. cat

b. less

c. more

d. Head

Answer: a

11. What command is used to display the last few lines of a file in Linux?

a. cat

b. less

c. more

d. Tail

Answer: d

12. In Linux, what is the symbol used for output redirection (sending command output to a

file)?

a. >

b. |

c. <

d. &

Answer: a

13. In Linux, what is the command used to change file permissions?

a. chmod

b. chown

c. chgrp

d. Perm

Answer: a

14. Which command is used to change the owner of a file or directory in Linux?
a. owner

b. changeowner

c. chown

d. Own

Answer: c

15. In Linux, what is the command used to change the group ownership of a file or directory?

a. group

b. changegroup

c. chgrp

d. Grp

Answer: c
1.“who” command prints information about user/users who are/were______?
a. currently logged in
b. logged in before system shutdown
c. logged out before system shutdown
d. all the users that exist in the system

Answer: 1
Question 2:
CentOS is a part of which Linux family?
a. Red Hat Family
b. Debian Family
c. Fedora Family
d. None of the above
Answer:A
Question 3:
What is the POST test performed by the bios?
a) Power Off Self Test
b) Power Operated System Test
c) Power On Sync Test
d) Power On Self Test
Answer:Power On Self Test
Question 4:
Is the BIOS dependent on the OS?
A. No
B. Yes
Answer:No
Question 5:
Which test does the BIOS perform?
a) System integrity test
b) System directory test
c) System enhancement test
d) None of the above
Answer: System integrity test
Question 6:
What is the full form of RHEL?
a) Red Hat Environment Linux
b) Red Hat Enterprise Linux
c) Red Hat Enterprise Limited
d) None of the above
Answer:b
Question 7:
Upon modifying a “file” with “chmod 000 /file” command, who all can read and write?
a. User who created the file
b. Group(user) – Users of the same group as the owner of the file
c. Others – All other users which are not the creator or part of the group(user)
d. None of the above
Answer:e
Question 8:
What UID and PID does the SYSTEMD/SYSTEM V/init Process typically hold?
a) UID = 1 and PID = 0
b) UID = 1 and PID = 1
c) UID = 0 and PID = 0
d) UID = 0 and PID = 1
Answer:UID = 0 and PID = 1
Question 9:
Up to how many primary partitions can be supported by a GPT?
a) 128
b) 16
c) 64
d) 4
Answer:128
Question 10:
Up to how many number of primary partitions can be supported by a MBR?
a) 4
b) 128
c) 64
d) 8
Answer: 4
Question 11:
FSF stands for __________
a) File server first
b) /tmp
c) Free software Foundation
d) /mnt
e) None of the above

Answer: 3
Question 12:
Which of the following Linux flavor is from canonical?
a) BSD
b) Manjaro
c) Ubuntu
d) RHE
Answer:Ubuntu
Question 13:
Which of the following statement is FALSE?
a) Linux supports multiple users
b) Linux is an open source operating system and the source code is shared
c) Shell perform process based operations with communication of process
d) Shell provides the feature of I/O Redirection
Answer:
Shell perform process based operations with communication of process
Question 14:
Which of these is not a Linux Flavor?
a) FreeBSD
b) CentOs
c) PopOs
d) Suse
Answer:FreeBSD
Question1 5:
Select the most appropriate option for GRUB in Linux?
a) stands for Linux boot loader
b) is a Multiboot boot loader.
c) GRand Unified Bootloader
d) b and c
e) None of the above
Answer:B and c
Question 16:
Which of the following tool is used to partition your hard drive?
a) mkfs
b) fdisk
c) fsck
d) mount
e) None of the above
Answer:fdisk
Question17:
CentOS developed & supported by
a) Sun Microsystems
b) AT&T
c) Red Hat
d) Sun and AT&T jointly

Answer:Red Hat
Question 18:
What command is used to halt a Linux system?
a) init 01
b) Shutdow –t
c) Shutdown - -y0
d) Ctrl+Alt+Del
e) poweroff

Answer:poweroff
Question 19:
Which of the following file allows the user to change the GUI with networking?
a) graphics.target
b) graphic.target
c) graphical.target
d) multi.target
e) None of the above

Answer:graphical.target
Question 20:
What command can be used to get information about yourself?
a. which
b. pwd
c. i/4
d. who am i
e. None of the above
Answer: 5

You might also like