You are on page 1of 41

What is the primary function of the CPU in a computer?

a. Long-term storage

b. Arithmetic and logical operations

c. Data input

d. Data output

Answer: b. Arithmetic and logical operations

Which type of memory is volatile and used for temporary storage during computer operation?

a. ROM

b. Cache

c. RAM

d. Hard Disk

Answer: c. RAM

What is the main purpose of ROM (Read-Only Memory)?

a. Temporary data storage

b. Long-term data storage

c. Retains data even when power is off

d. Allows users to write and modify data

Answer: c. Retains data even when power is off

Which component connects various hardware components on the motherboard?

a. CPU

b. RAM

c. Motherboard

d. Hard Disk Drive

Answer: c. Motherboard

What is the function of input devices in a computer system?

a. Process data

b. Store data permanently

c. Accept data and instructions from the user


d. Execute programs

Answer: c. Accept data and instructions from the user

Which of the following is a non-volatile storage device for long-term data storage?

a. RAM

b. ROM

c. Hard Disk Drive (HDD)

d. Cache

Answer: c. Hard Disk Drive (HDD)

What is the role of the power supply unit in a computer system?

a. Process data

b. Supply power to the computer components

c. Accept user input

d. Store data permanently

Answer: b. Supply power to the computer components

Which memory type enables quick access to data for the CPU but loses its contents when the power is
turned off?

a. ROM

b. Cache

c. RAM

d. Hard Disk

Answer: c. RAM

What is the primary function of secondary storage devices in a computer system?

a. Temporary data storage

b. Long-term data storage

c. Data processing

d. Input of data

Answer: b. Long-term data storage

Which secondary storage device uses NAND-based flash memory technology?


a. Hard Disk Drive (HDD)

b. Solid State Drive (SSD)

c. Hybrid Drive

d. Optical Disc Drive

Answer: b. Solid State Drive (SSD)

What advantage does an SSD have over an HDD in terms of performance?

a. Slower access times

b. Lower power consumption

c. More moving parts

d. Lower cost per gigabyte

Answer: b. Lower power consumption

Hybrid drives combine features of which two types of storage devices?

a. SSD and HDD

b. RAM and SSD

c. Optical Drive and SSD

d. HDD and Flash Drive

Answer: a. SSD and HDD

Which type of RAM requires constant refreshing to retain data?

a. DDR RAM

b. SRAM

c. DRAM

d. Cache Memory

Answer: c. DRAM

What is SRAM commonly used for in a computer system?

a. System memory (RAM)

b. Cache memory

c. Virtual memory

d. Storage

Answer: b. Cache memory


What is the purpose of Hyper-Threading (HT) in a processor?

a. Increase power consumption

b. Simulate additional processor cores

c. Decrease multitasking performance

d. Reduce clock speed

Answer: b. Simulate additional processor cores

Which component of a CPU allows for parallel processing and improved multitasking?

a. Threads

b. Cores

c. Cache

d. Clock speed

Answer: b. Cores

What is the primary function of the BIOS in a computer system?

a. Manage file storage

b. Initialize hardware during boot

c. Control network connections

d. Execute application software

Answer: b. Initialize hardware during boot

Which BIOS setting allows users to specify the sequence in which the computer checks for a bootable
operating system?

a. Date and Time Settings

b. Boot Order

c. Overclocking

d. Security Settings

Answer: b. Boot Order

What does the term "Overclocking" refer to in the context of BIOS configuration?

a. Adjusting system date and time

b. Optimizing hardware performance

c. Configuring security settings


d. Managing boot priorities

Answer: b. Optimizing hardware performance

What is the purpose of the Security Settings in the BIOS?

a. Adjusting hardware configurations

b. Setting up wireless connections

c. Implementing password protection and other security features

d. Managing system date and time

Answer: c. Implementing password protection and other security features

Which PC connection interface is commonly used for connecting monitors, TVs, and projectors for
high-definition video and audio transmission?

a. USB

b. SATA

c. HDMI

d. NFC

Answer: c. HDMI

What is a key advantage of Bluetooth as a PC connection interface?

a. High data transfer rates

b. Long-range communication

c. Low power consumption

d. Suitable for internal storage devices

Answer: c. Low power consumption

Near Field Communication (NFC) is primarily used for:

a. High-speed data transfer over long distances

b. Wireless audio connectivity

c. Contactless payments and short-range communication

d. Connecting external hard drives

Answer: c. Contactless payments and short-range communication

Which PC connection interface is known for being hot-swappable and versatile for connecting various
peripherals?
a. SATA

b. HDMI

c. USB

d. Bluetooth

Answer: c. USB

What is the primary purpose of RAID 1 (Mirroring)?

a. Improved performance

b. Data redundancy

c. Balanced performance and redundancy

d. Striping with parity

Answer: b. Data redundancy

RAID 0 (Striping) is known for:

a. Data redundancy

b. Improved performance through parallel data access

c. A combination of mirroring and striping

d. Striping with parity

Answer: b. Improved performance through parallel data access

What is the main function of a GPU in a computer system?

a. Execute general-purpose tasks

b. Accelerate graphics rendering and image processing

c. Manage storage operations

d. Enhance network connectivity

Answer: b. Accelerate graphics rendering and image processing

Which programming framework is associated with NVIDIA GPUs for general-purpose computing?

a. DirectX

b. OpenCL

c. CUDA

d. OpenGL
Answer: c. CUDA

What is the role of APIs like DirectX and OpenGL in synchronization between the CPU and GPU?

a. Manage storage operations

b. Enhance network connectivity

c. Facilitate communication between the CPU and GPU

d. Optimize RAM usage

Answer: c. Facilitate communication between the CPU and GPU

In which type of tasks do GPUs typically excel?

a. Sequential processing

b. General-purpose computing

c. Parallel processing

d. Memory management

Answer: c. Parallel processing

Which programming framework allows for general-purpose computing on GPUs for multiple vendors?

a. DirectX

b. OpenCL

c. CUDA

d. OpenGL

Answer: b. OpenCL

What is the primary characteristic of machine language?

a. Human-readable

b. Uses mnemonics

c. Direct binary representation

d. Platform-independent

Answer: c. Direct binary representation

Which of the following is true about machine language instructions?

a. They are symbolic representations.

b. They are specific to a CPU architecture.


c. They are easy for humans to read and write.

d. They use mnemonics.

Answer: b. They are specific to a CPU architecture

What is the main advantage of assembly language over machine language?

a. Portability

b. Human-readability

c. Platform independence

d. Automatic memory management

Answer: b. Human-readability

How are assembly language instructions converted into machine code?

a. Interpreter

b. Compiler

c. Assembler

d. Linker

Answer: c. Assembler

What is a key feature of high-level programming languages?

a. Direct binary representation

b. Low-level abstraction

c. Platform-specific code

d. Abstraction from hardware details

Answer: d. Abstraction from hardware details

Which programming languages are considered high-level languages?

a. Python, Java, C++

b. Assembly, Machine Language, C

c. HTML, CSS, JavaScript

d. Binary, Hexadecimal, Octal

Answer: a. Python, Java, C++

Which language requires a compiler or interpreter to convert code into machine language?

a. Machine language
b. Assembly language

c. High-level language

d. Both b and c

Answer: d. Both b and c

Which language is specific to a particular CPU architecture?

a. Assembly language

b. High-level language

c. Machine language

d. All of the above

Answer: a. Assembly language

What is the purpose of a compiler in programming?

a. Executes the program

b. Translates source code to machine code

c. Interprets code in real-time

d. Optimizes code for better performance

Answer: b. Translates source code to machine code

Which of the following is NOT a high-level programming language?

a. Python

b. Assembly

c. Java

d. C++

Answer: b. Assembly

What is the primary advantage of using an interpreter over a compiler?

a. Faster execution

b. Portability

c. Optimization

d. Ease of debugging

Answer: d. Ease of debugging

Which programming language is often used for web development and server-side scripting?
a. C++

b. Python

c. JavaScript

d. Java

Answer: c. JavaScript

What does the acronym "SQL" stand for in the context of programming?

a. Simple Question Language

b. Structured Query Language

c. Scripted Query Logic

d. Sequential Query Language

Answer: b. Structured Query Language

In the software development life cycle, which phase involves finding and fixing errors in the code?

a. Coding

b. Testing

c. Requirements Analysis

d. Design

Answer: b. Testing

What is the primary purpose of documentation in software development?

a. Enhancing code performance

b. Explaining the purpose of the program

c. Minimizing code size

d. Automating code generation

Answer: b. Explaining the purpose of the program

What is the time complexity of an algorithm that has a linear running time with respect to input size?

a. O(1)

b. O(log n)

c. O(n)

d. O(n^2)

Answer: c. O(n)
Which data structure follows the Last In, First Out (LIFO) principle?

a. Queue

b. Stack

c. Linked List

d. Tree

Answer: b. Stack

What does the acronym "IDE" stand for in programming?

a. Integrated Development Environment

b. Interactive Design Environment

c. Intermediate Documentation Editor

d. Intelligent Debugging Engine

Answer: a. Integrated Development Environment

What is the primary purpose of version control systems like Git?

a. Code optimization

b. Team collaboration and code tracking

c. Real-time code interpretation

d. Syntax checking

Answer: b. Team collaboration and code tracking

Which component of the operating system is responsible for managing processes and their execution?

a. Device Drivers

b. Kernel

c. File System

d. Shell

Answer: b. Kernel

What is the primary function of the File System component in an operating system?

a. Manage processes

b. Control I/O operations

c. Manage files and storage

d. Provide user interface


Answer: c. Manage files and storage

Which component is responsible for interfacing with hardware devices in the operating system?

a. File System

b. Device Drivers

c. Shell

d. Kernel

Answer: b. Device Drivers

What does the Memory Management component of an operating system primarily handle?

a. Process scheduling

b. File organization

c. Allocation and deallocation of memory

d. Network communication

Answer: c. Allocation and deallocation of memory

Which function is performed by the Input/Output (I/O) Management component of an operating


system?

a. Scheduling processes

b. Managing memory allocation

c. Controlling communication between the computer and external devices

d. Handling file operations

Answer: c. Controlling communication between the computer and external devices

Which type of operating system supports multiple users accessing the system simultaneously?

a. Single-User, Single-Tasking

b. Single-User, Multi-Tasking

c. Multi-User

d. Real-Time Operating System

Answer: c. Multi-User

What is the main characteristic of a Real-Time Operating System (RTOS)?

a. Supports multiple users


b. Designed for systems with strict timing and responsiveness requirements

c. Manages files and storage

d. Focuses on user interfaces

Answer: b. Designed for systems with strict timing and responsiveness requirements

What is the purpose of system calls in an operating system?

a. Interfacing with hardware devices

b. Managing files and storage

c. Requesting services from the operating system

d. Allocating memory

Answer: c. Requesting services from the operating system

Which component provides a means for users to interact with the operating system?

a. Device Drivers

b. Kernel

c. User Interface

d. System Calls

Answer: c. User Interface

Which Windows version introduced the Start menu and taskbar?

a. Windows 98

b. Windows XP

c. Windows Vista

d. Windows 95

Answer: d. Windows 95

Windows ME (Millennium Edition) was primarily focused on:

a. Business environments

b. Multimedia and home networking

c. Touch-based devices

d. Improved security

Answer: b. Multimedia and home networking

Which feature of Windows provides access to programs, settings, and files?


a. Taskbar

b. Cortana

c. Start Menu

d. File Explorer

Answer: c. Start Menu

Windows Defender is a built-in:

a. Web browser

b. Antivirus and security software

c. Virtual assistant

d. File manager

Answer: b. Antivirus and security software

During the installation process, where do you configure language, time format, and keyboard input?

a. Product Key Entry

b. Select Edition and Installation Type

c. Language and Region Setup

d. Boot from Media

Answer: c. Language and Region Setup

What is the purpose of entering a product key during the Windows installation process?

a. Configure network settings

b. Activate Windows

c. Create a user account

d. Install device drivers

Answer: b. Activate Windows

Which Windows version introduced the concept of "Windows as a Service (WaaS)" with regular
feature updates?

a. Windows XP

b. Windows 7

c. Windows 8
d. Windows 10

Answer: d. Windows 10

The taskbar in Windows displays:

a. Running applications and system notifications

b. Files and folders

c. Installed programs

d. Hardware devices

Answer: a. Running applications and system notifications

In a single-level directory hierarchy, where are all files stored?

a. C:\ProgramFiles

b. C:\Users\Documents

c. C:

d. C:\System

Answer: c. C:

What is the purpose of a multiple-level directory hierarchy?

a. To store all files in a single directory

b. To create a tree-like structure with subdirectories

c. To organize files alphabetically

d. To separate system files from user files

Answer: b. To create a tree-like structure with subdirectories

Where is the Windows Boot Manager typically stored?

a. Program Files directory

b. System32 directory

c. System partition

d. Windows directory

Answer: c. System partition

What does the Boot Configuration Data (BCD) store?

a. System files

b. User documents
c. Boot-related parameters and options

d. Graphics drivers

Answer: c. Boot-related parameters and options

What is the role of the Windows Boot Manager during the boot process?

a. Loads device drivers

b. Initiates the boot process

c. Executes user applications

d. Manages system memory

Answer: b. Initiates the boot process

What is the purpose of the graphical boot menu provided by the Windows Boot Manager?

a. Launching applications

b. Choosing between operating systems or boot options

c. Managing system resources

d. Performing system diagnostics

Answer: b. Choosing between operating systems or boot options

What is the primary characteristic of Linux's licensing model?

a. Proprietary

b. Freeware

c. Open Source

d. Shareware

Answer: c. Open Source

Which Linux feature allows multiple users to execute multiple tasks simultaneously?

a. Multi-Tasking

b. Multi-User

c. Multi-Threaded

d. Multi-Processor

Answer: b. Multi-User

Which Linux distribution is known for its stability and is the base for many other distributions?

a. Ubuntu
b. Fedora

c. Debian

d. Arch Linux

Answer: c. Debian

Which Linux distribution is often recommended for beginners due to its user-friendly interface?

a. Fedora

b. Debian

c. Arch Linux

d. Ubuntu

Answer: d. Ubuntu

CentOS is based on the sources of which enterprise Linux distribution?

a. Debian

b. Ubuntu

c. Red Hat Enterprise Linux (RHEL)

d. Fedora

Answer: c. Red Hat Enterprise Linux (RHEL)

What is the common bootloader used in Linux installations?

a. LILO

b. GRUB

c. NTLDR

d. BOOTMGR

Answer: b. GRUB

During Linux installation, where is the bootloader typically installed?

a. System partition

b. Root directory

c. EFI partition

d. Boot partition

Answer: a. System partition


In a Linux single-level directory hierarchy, where are system binaries typically stored?

a. /home

b. /usr

c. /etc

d. /bin

Answer: d. /bin

What is the purpose of the /etc directory in Linux?

a. User home directories

b. System binaries

c. Configuration files

d. Temporary files

Answer: c. Configuration files

In a Linux multiple-level directory hierarchy, where are user home directories typically located?

a. /usr

b. /home

c. /var

d. /bin

Answer: b. /home

Which command is used to display the contents of a directory in Linux?

a. ls

b. cd

c. cat

d. mkdir

Answer: a. ls

What does the command "chmod +x file.sh" do in Linux?

a. Makes the file executable

b. Changes file ownership

c. Removes file permissions

d. Renames the file


Answer: a. Makes the file executable

In Linux, what is the purpose of the /var directory?

a. Log files

b. Temporary files

c. System binaries

d. Configuration files

Answer: a. Log files

Which command is used to create a new directory in Linux?

a. mkdir

b. touch

c. cp

d. rm

Answer: a. mkdir

What does the command "pwd" stand for in Linux?

a. Print Working Directory

b. Present Working Directory

c. Print Whole Directory

d. Path of Working Directory

Answer: a. Print Working Directory

Which command is used to copy files in Linux?

a. mv

b. cp

c. rm

d. mkdir

Answer: b. cp

What does the command "grep" do in Linux?

a. Copy files

b. Search for patterns in files


c. Remove files

d. Move files

Answer: b. Search for patterns in files

In Linux, what is the purpose of the "sudo" command?

a. Switch user

b. Superuser privileges

c. List directory contents

d. Create a new user

Answer: b. Superuser privileges

Which file contains user account information in Linux?

a. /etc/passwd

b. /etc/shadow

c. /etc/groups

d. /etc/users

Answer: a. /etc/passwd

Which command is used to check the network connectivity in Linux?

a. ping

b. traceroute

c. netstat

d. ifconfig

Answer: a. ping

What does the command "ifconfig" display in Linux?

a. System configuration

b. Network interfaces

c. Running processes

d. Disk usage

Answer: b. Network interfaces

Which command is used to view the currently running processes in Linux?

a. ps
b. top

c. kill

d. grep

Answer: a. ps

What does the "kill" command do in Linux?

a. Start a process

b. Stop a process

c. Pause a process

d. Display process information

Answer: b. Stop a process

Which shell is the default shell for many Linux distributions?

a. Bash

b. Zsh

c. Fish

d. Sh

Answer: a. Bash

What is the purpose of the "echo" command in Linux?

a. Display system information

b. Print the contents of a file

c. Print text to the terminal

d. Create a new file

Answer: c. Print text to the terminal

In Linux file permissions, what does "rwx" indicate?

a. Read, Write, Execute

b. Read, Write

c. Read, Execute

d. Write, Execute

Answer: a. Read, Write, Execute

Which command is used to change file permissions in Linux?


a. chmod

b. chown

c. chgrp

d. perm

Answer: a. chmod

What is the purpose of the "cron" service in Linux?

a. Network configuration

b. Task scheduling

c. User authentication

d. System logging

Answer: b. Task scheduling

Which command is used to update the package database in Debian-based Linux distributions?

a. apt-get update

b. yum update

c. pacman -Sy

d. zypper refresh

Answer: a. apt-get update

Which configuration file stores network-related settings in Linux?

a. /etc/hosts

b. /etc/network

c. /etc/resolv.conf

d. /etc/services

Answer: c. /etc/resolv.conf

What is the primary purpose of disk partitions?

a. Increase disk speed

b. Organize and manage data

c. Enhance graphics performance

d. Boost system memory

Answer: b. Organize and manage data


Which system tool can be used in Windows to view and manage partitions?

a. Disk Cleanup

b. Disk Defragmenter

c. Disk Management

d. System Configuration

Answer: c. Disk Management

Which command can be used in Linux to list all partitions on a system?

a. listpartitions

b. showdisk

c. fdisk -l

d. partitioninfo

Answer: c. fdisk -l

Which file system is commonly used in Windows?

a. FAT32

b. ext4

c. NTFS

d. HFS+

Answer: c. NTFS

In Linux, what is the default file system used for partitions?

a. NTFS

b. FAT32

c. ext4

d. HFS+

Answer: c. ext4

What is a key characteristic of Linux's licensing model?

a. Proprietary

b. Freeware

c. Open Source

d. Shareware
Answer: c. Open Source

Which operating system provides PowerShell as a powerful command-line interface?

a. Windows

b. Linux

c. Both

d. Neither

Answer: a. Windows

Which operating system is known for its centralized software repositories and package managers?

a. Windows

b. Linux

c. Both

d. Neither

Answer: b. Linux

What is a virtual machine (VM)?

a. A physical computer

b. Software-based emulation of a physical computer

c. A network protocol

d. A hardware component

Answer: b. Software-based emulation of a physical computer

Which component of a virtual machine runs directly on the physical hardware?

a. Guest OS

b. Hypervisor

c. Host OS

d. Virtual Disk

Answer: c. Host OS

What is a hypervisor in the context of virtual machines?

a. A virtual machine

b. A hardware component

c. Software or hardware that creates and runs virtual machines


d. A network protocol

Answer: c. Software or hardware that creates and runs virtual machines

Which use case involves running multiple servers on a single physical machine using virtualization?

a. Desktop Virtualization

b. Server Virtualization

c. Cloud Computing

d. Testing and Development

Answer: b. Server Virtualization

What is the purpose of taking snapshots in virtual machines?

a. Enhance graphics performance

b. Backup for rapid deployment

c. Increase disk speed

d. Boost system memory

Answer: b. Backup for rapid deployment

Which tool is commonly used for graphical partition management in Linux?

a. fdisk

b. gparted

c. ls

d. cp

Answer: b. gparted

In Linux, which directory typically stores log files?

a. /etc

b. /var

c. /home

d. /bin

Answer: b. /var

Which command is used to change file permissions in Linux?

a. chown

b. chmod
c. chgrp

d. perm

Answer: b. chmod

Which file contains user account information in Linux?

a. /etc/passwd

b. /etc/shadow

c. /etc/groups

d. /etc/users

Answer: a. /etc/passwd

Which command is used to check network connectivity in Linux?

a. ping

b. traceroute

c. netstat

d. ifconfig

Answer: a. ping

What does the command "ifconfig" display in Linux?

a. System configuration

b. Network interfaces

c. Running processes

d. Disk usage

Answer: b. Network interfaces

What is the purpose of the "sudo" command in Linux?

a. Switch user

b. Superuser privileges

c. List directory contents

d. Create a new user

Answer: b. Superuser privileges

What is the primary purpose of a file system?

a. Managing hardware resources


b. Organizing and storing data on a storage device

c. Running applications

d. Controlling network access

Answer: b. Organizing and storing data on a storage device

What is metadata in the context of file systems?

a. File contents

b. File permissions and attributes

c. File names

d. File directories

Answer: b. File permissions and attributes

What is the function of directories in a file system?

a. Store metadata

b. Organize and store files and subdirectories

c. Track file allocations

d. Control file access

Answer: b. Organize and store files and subdirectories

Which file system was commonly used in early Windows versions?

a. NTFS

b. HFS

c. FAT

d. UDF

Answer: c. FAT (File Allocation Table)

Which file system is used in macOS and older versions of Apple operating systems?

a. NTFS

b. HFS

c. UDF

d. NDFS

Answer: b. HFS (Hierarchical File System)

What is the primary advantage of NTFS over FAT?


a. Compatibility with macOS

b. Improved security features

c. Simplicity and speed

d. Compatibility with Linux

Answer: b. Improved security features

Which file system is a standard for optical media like CDs and DVDs?

a. UDF

b. NTFS

c. HFS

d. ext4

Answer: a. UDF (Universal Disk Format)

Which file system is commonly used in Novell NetWare for networked environments?

a. NTFS

b. HFS

c. NDFS

d. FAT

Answer: c. NDFS (NetWare File System)

What is the purpose of journaling in file systems like ext3?

a. Speed up file access

b. Improve data consistency and recovery

c. Enhance file compression

d. Enable cross-platform compatibility

Answer: b. Improve data consistency and recovery

Which extended file system version introduced journaling for improved reliability?

a. ext2

b. ext3

c. ext4

d. FAT32

Answer: b. ext3
What is the primary enhancement in ext4 compared to ext3?

a. Larger volumes support

b. Improved security features

c. Faster file access

d. Better compatibility with Windows

Answer: a. Larger volumes support

Which operating system uses the ext2 file system?

a. Windows

b. macOS

c. Linux

d. Android

Answer: c. Linux

What is the primary reason for using UDF on optical media?

a. Cross-platform compatibility

b. Enhanced security

c. Faster file access

d. Improved compression

Answer: a. Cross-platform compatibility

In the context of file systems, what does "UDF" stand for?

a. Universal Disk Format

b. Unified Data Filesystem

c. User Directory File

d. Ultra Disk Formatting

Answer: a. Universal Disk Format

What is the significance of NetWare File System (NDFS) in Novell NetWare?

a. Improved graphics performance

b. Efficient file access over a network

c. Enhanced security for user files

d. Compatibility with Linux


Answer: b. Efficient file access over a network

Which file system is designed for use in a Linux environment?

a. NTFS

b. HFS

c. UDF

d. ext4

Answer: d. ext4

Which file system is commonly associated with CDs and DVDs?

a. FAT

b. NTFS

c. UDF

d. ext3

Answer: c. UDF

Which operating system commonly uses the HFS+ file system?

a. Windows

b. macOS

c. Linux

d. Android

Answer: b. macOS

What is the primary advantage of the extended file system (ext2, ext3, ext4) for Linux users?

a. Compatibility with Windows

b. Enhanced security features

c. Efficient journaling for reliability

d. Simplified file organization

Answer: c. Efficient journaling for reliability

In which type of environment is NetWare File System (NDFS) optimized for use?

a. Standalone desktops

b. Networked environments

c. Cloud computing
d. Mobile devices

Answer: b. Networked environments

What does the pipe symbol (|) do in the command ls | grep .txt?

a) Redirects the output of ls to a file named .txt.

b) Connects the standard output of ls to the standard input of grep.

c) Filters the output of ls by date.

d) Saves the results of grep to a file.

Answer: b) Connects the standard output of ls to the standard input of grep.

Which redirection operator will overwrite an existing file if used with find?

a) >

b) >>

c) <

d) |

Answer: a) >

What regular expression would match lines containing "important" or "urgent" in a file?

a) important|urgent

b) (important|urgent)

c) important + urgent

d) important urgent

Answer: b) (important|urgent)

How can you find all files containing the word "error" in the current directory and its subdirectories?

a) find . -name "error"

b) grep -r error .

c) find . -type f | grep error

d) grep error *.txt

Answer: c) find . -type f | grep error

Which command would search for lines beginning with a number and ending with a punctuation mark
in a file called "data.txt"?

a) grep "^[0-9]*.*[.,;:]<span class="math-inline">"\ data.txt


b) `find data.txt -regex "^[0-9]+""

c)grep -i "[0-9]+" data.txt

d)find . -name "data.txt" | grep "[0-9]+"`

Answer: a) grep "^[0-9]*.*[.,;:]$" data.txt

Write a command using pipes and redirection to copy all files containing the string "secret" in their
filename from the current directory to a new folder named "hidden_files".

Answer: find . -name "*secret*" | xargs -I{} cp {} hidden_files/

What is the purpose of the pipe (|) operator in a command-line environment?

a. Redirects output to a file

b. Connects the output of one command to the input of another

c. Filters files based on criteria

d. Creates a new directory

Answer: b. Connects the output of one command to the input of another

Which of the following commands uses a pipe to filter the output?

a. ls -a

b. cat file.txt

c. ps aux | grep "process"

d. mkdir new_folder

Answer: c. ps aux | grep "process"

What does the > operator do in the context of command-line redirection?

a. Appends output to a file

b. Redirects input from a file

c. Redirects output to a file, overwriting if it exists

d. Creates a new directory

Answer: c. Redirects output to a file, overwriting if it exists

Which operator is used for appending output to a file without overwriting existing content?

a. |

b. >

c. >>
d. <

Answer: c. >>

What is the purpose of the < operator in command-line redirection?

a. Redirects output to a file

b. Appends output to a file

c. Redirects input from a file

d. Creates a new directory

Answer: c. Redirects input from a file

What is the primary purpose of the find command in a Unix-like operating system?

a. Searches for patterns within files

b. Locates files and directories based on criteria

c. Redirects input from a file

d. Creates a new directory

Answer: b. Locates files and directories based on criteria

Which option is commonly used with the find command to search for files by name?

a. -size

b. -type

c. -name

d. -exec

Answer: c. -name

What is the primary purpose of the grep command?

a. Searches for files in a directory

b. Searches for patterns within files

c. Lists all files in a directory

d. Modifies file permissions

Answer: b. Searches for patterns within files

Which option is used to perform a case-insensitive search with the grep command?

a. -c

b. -i
c. -v

d. -l

Answer: b. -i

What does the . (dot) character represent in a regular expression?

a. Matches any single character

b. Anchors the expression to the beginning of a line

c. Represents zero or more occurrences of the preceding character

d. Escapes a special character

Answer: a. Matches any single character

How is the * (asterisk) character used in a regular expression?

a. Anchors the expression to the beginning of a line

b. Represents zero or more occurrences of the preceding character

c. Matches any single character

d. Escapes a special character

Answer: b. Represents zero or more occurrences of the preceding character

What does the ^ (caret) symbol indicate in a regular expression?

a. Matches any single character

b. Anchors the expression to the beginning of a line

c. Represents zero or more occurrences of the preceding character

d. Escapes a special character

Answer: b. Anchors the expression to the beginning of a line

Which signal is often generated by pressing Ctrl+C in the terminal?

a. SIGTERM

b. SIGKILL

c. SIGINT

d. SIGHUP

Answer: c. SIGINT

What is the purpose of the SIGKILL signal?

a. Gracefully terminate a process


b. Interrupt and terminate a process

c. Suspend a process

d. Continue a stopped process

Answer: b. Interrupt and terminate a process

When is the SIGHUP signal typically sent to a process?

a. When the process is terminated

b. When the controlling terminal is closed or the session leader exits

c. When the process is paused

d. When the process is resumed

Answer: b. When the controlling terminal is closed or the session leader exits

How can you pause a running process in the terminal?

a. Ctrl+X

b. Ctrl+Z

c. Ctrl+S

d. Ctrl+P

Answer: b. Ctrl+Z

Which command is used to resume a process in the background?

a. fg

b. bg

c. resume

d. continue

Answer: b. bg

What does the kill command with the -SIGSTOP option do?

a. Terminates a process gracefully

b. Interrupts and terminates a process

c. Suspends a process

d. Resumes a stopped proces

Answer: c. Suspends a process

Which signal is used to resume a stopped process using the kill command?
a. SIGRESUME

b. SIGCONT

c. SIGSTART

d. SIGRUN

Answer: b. SIGCONT

What does the ps command do in a Linux terminal?

a. Display the system version

b. Provide information about currently running processes

c. Print the current working directory

d. Create a new process

Answer: b. Provide information about currently running processes

Which option is commonly used with ps to display detailed information, including user and CPU
usage?

a. ps -a

b. ps -l

c. ps -u

d. ps -x

Answer: c. ps -u

Which command is used to send a termination signal to a process gracefully?

a. terminate

b. kill -TERM

c. kill -STOP

d. endprocess

Answer: b. kill -TERM

What does the kill command with the -SIGKILL option do?

a. Pauses a process

b. Continues a stopped process

c. Terminates a process forcefully

d. Resumes a paused process


Answer: c. Terminates a process forcefully

How do you add a new directory to the PATH variable in a Unix-like environment?

a. export PATH=/new/directory

b. addpath /new/directory

c. PATH=/new/directory:$PATH

d. set PATH=/new/directory

Answer: c. PATH=/new/directory:$PATH

Which command is used to remove a specific directory from the PATH variable?

a. removepath

b. unset PATH=/old/directory

c. export PATH=$(echo $PATH | sed 's#/old/directory##')

d. rmpath /old/directory

Answer: c. export PATH=$(echo $PATH | sed 's#/old/directory##')

What does the ls command do in a Unix-like terminal?

a. List system processes

b. Print the current working directory

c. Display detailed information about a file

d. List files and directories

Answer: d. List files and directories

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

a. cat

b. display

c. showfile

d. filecontent

Answer: a. cat

What is the purpose of the man command in a Unix-like environment?

a. Manage user accounts

b. Display manual pages for commands

c. Manipulate system resources


d. Create a new file

Answer: b. Display manual pages for commands

Which command is used to change the current working directory?

a. chdir

b. cd

c. changedir

d. cwd

Answer: b. cd

What does the touch command do in a Unix-like terminal?

a. Rename a file

b. Create an empty file

c. Update the timestamp of a file

d. Display file permissions

Answer: c. Update the timestamp of a file

Which command is used to copy files or directories?

a. cp

b. copy

c. mv

d. move

Answer: a. cp

What is the purpose of the mv command in a Unix-like terminal?

a. Move a file to a new directory

b. Copy files or directories

c. Rename a file

d. Create a new file

Answer: a. Move a file to a new directory

Which command is used to remove an empty directory?

a. rmdir

b. removedir
c. deletedir

d. rm -d

Answer: a. rmdir

What does the mkdir command do in a Unix-like terminal?

a. Remove a directory

b. Make a new directory

c. Rename a directory

d. Display directory contents

Answer: b. Make a new directory

Which command is used to remove files or directories?

a. rm

b. remove

c. delete

d. del

Answer: a. rm

What is the purpose of the chmod command in a Unix-like environment?

a. Change file owner

b. Change file permissions

c. Create a new file

d. Display file contents

Answer: b. Change file permissions

Which command is used to print the current working directory?

a. printdir

b. displaydir

c. pwd

d. currentdir

Answer: c. pwd
What does the ps command display in a Unix-like terminal?

a. Print system information

b. List system processes

c. Display detailed file information

d. Show user accounts

Answer: b. List system processes

Which command is used to terminate a process in a Unix-like environment?

a. terminate

b. stop

c. kill

d. endprocess

Answer: c. kill

What does the etc stand for in commands like chmod, pwd, etc.?

a. Electronic Transaction Code

b. Execute Command

c. Etcetera

d. Extended Terminal Control

Answer: c. Etcetera

What is the kernel in an operating system?

a. Core component managing system resources

b. A user interface

c. File management system

d. Graphics subsystem

Answer: a. Core component managing system resources

Which type of kernel is a single, large kernel handling all system functionalities?

a. Monolithic Kernel

b. Microkernel

c. Hybrid Kernel

d. Nanokernel
Answer: a. Monolithic Kernel

What distinguishes a microkernel from other types of kernels?

a. Large size

b. Delegates functionalities to separate modules or servers

c. Hybrid architecture

d. No file management capabilities

Answer: b. Delegates functionalities to separate modules or servers

Which type of kernel combines elements of both monolithic and microkernel architectures?

a. Monolithic Kernel

b. Microkernel

c. Hybrid Kernel

d. Nanokernel

Answer: c. Hybrid Kernel

You might also like