Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

ЛИНУКС WEEK 5, 6, 9

Total questions: 90

Worksheet time: 45mins

Name
Class
Date
1.

What is the role of the CPU in a computer system?

a)

 It stores data temporarily

b)

It performs calculations and manipulates data

c)

 It manages power supply to the system

d)

It controls input and output devices

2.
  1. What command can you use to display detailed CPU information on a Linux system?

a)

uname -a

b)

lscpu

c)

lsmod

d)

df -h

3.
  1. What does the uname command with the -a option display?

a)
  • Detailed hardware information

b)

System memory usage

c)

Full system information including kernel and architecture

d)

Disk usage statistics

4.
  1. Which component is considered core hardware in a computer system?

a)
  • Printer

b)

 USB hub

c)

 Central Processing Unit (CPU)

d)

Bluetooth adapter

5.
  1. What is the maximum amount of RAM that can be theoretically used with a 64-bit processor?

a)
  • 4 GB

b)
  • 16 EB

c)

 32 GB

d)

1 TB

6.
  1. How can you check the total amount of memory in your Linux system?

a)
  • free

b)
  • lsusb

c)

top

d)

uname -p

7.
  1. What is the function of swap space in Linux?

a)
  •  It is used for storing system logs

b)
  • It is virtual memory used when RAM is full

c)

It stores bootloader information

d)

It is reserved for application data

8.
  1. Which type of storage device connects directly to the system board via a cable in modern systems?

a)
  •  SATA

b)
  • SCSI

c)

 IDE

d)

USB

9.
  1. What does the df -h command do?

a)
  •   Displays system memory usage

b)
  • Shows file system disk space usage in human-readable format

c)

Displays detailed CPU information

d)

Lists active processes

10.
  1. Which of the following is a hotplug device?

a)
  • Hard drive

b)
  • USB drive

c)

IDE drive

d)

Optical drive

11.
  1. How can you view a list of connected PCI devices on your system?

a)
  •  lsusb

b)
  •  lspci

c)

uname -m

d)

 dmesg

12.
  1. What does the lsusb command do?

a)
  •  Lists USB devices connected to the system

b)
  •  Lists PCI devices connected to the system

c)
  •  Shows memory usage

d)
  • Displays detailed process information

13.
  1. Which command shows detailed information about USB devices?

a)
  • usbinfo

b)
  • lsusb -v

c)
  • df -h

d)
  • uname -p

14.
  1. Which file contains information about the system's RAM usage?

a)
  • /proc/ioports

b)
  •  /sys/meminfo

c)
  • /proc/meminfo

d)
  •  /var/log/messages

15.
  1. What does the lspci -v command show?

a)
  • Lists kernel modules

b)
  •  Displays detailed PCI device information

c)
  • Shows CPU details

d)
  • Lists connected USB devices

16.
  1. What type of devices can lsusb show?

a)
  • Network cards

b)
  • USB devices

c)
  • RAM details

d)
  • PCI devices

17.
  1. How can you view kernel messages after connecting a new device?

a)
  • lsmod

b)
  • dmesg

c)
  • lspci

d)

lsusb -v

18.
  1. What is the primary function of udev in Linux?

a)
  • It manages device nodes in the /dev directory

b)
  • It monitors system memory usage

c)
  • It manages CPU resources

d)
  •  It lists running processes

19.
  1. Which command shows a list of currently loaded kernel modules?

a)
  • lsmod

b)
  • uname

c)
  • lspci

d)

top

20.
  1. What command can be used to get more information about a specific kernel module?

a)
  • modprobe -l

b)
  • uname -p

c)
  • modinfo

d)

 lsmod -v

21.
  1. What does the df -h command display?

a)
  •  Detailed CPU information

b)
  •  Mounted filesystem disk space usage

c)
  • Kernel version

d)
  • USB device list

22.
  1. What is the default bootloader used on most Linux systems?

a)
  •  LILO

b)
  • GRUB

c)
  • SILO

d)
  •  PXE

23.
  1. What is the purpose of the BIOS in a system's boot process?

a)
  • Manages the operating system after booting

b)
  • Loads the kernel into memory

c)
  • Manages hardware and initializes the bootloader

d)
  • Performs file system checks

24.
  1. What is the main role of the Linux kernel during the boot process?

a)
  • Initializes hardware and mounts the root filesystem

b)
  • Manages system memory

c)
  •  Handles user logins

d)
  • Loads the bootloader into memory

25.
  1. Which command would you use to view real-time kernel messages related to system devices?

a)
  • lspci

b)
  • dmesg

c)
  •  lsusb

d)
  • modprobe -l

26.
  1. What is the function of modprobe in Linux?

a)
  • Loads and unloads kernel modules

b)
  •  Displays memory usage

c)
  • Manages USB devices

d)
  •  Shows CPU information

27.
  1. What is initramfs used for in the boot process?

a)
  •  To manage memory allocation during boot

b)
  • To provide drivers and tools for the real root filesystem to load

c)
  • To initialize hardware

d)
  • To list the PCI devices connected

28.
  1. What does the dmesg command output?

a)
  •  Kernel ring buffer messages

b)
  • CPU details

c)
  • Kernel module information

d)
  • Process tree

29.
  1. How can you unload a kernel module in Linux?

a)
  • lsmod

b)
  • modprobe -r

c)
  • df -h

d)
  • lspci -r

30.
  1. What is the function of the journalctl command?

a)
  • View system logs managed by systemd

b)
  • Display memory usage

c)
  • Monitor kernel modules

d)
  • List attached USB devices

31.
  1. What is the purpose of partitioning a hard drive in Linux?

a)
  •  To speed up the system

b)
  •  To organize files and directories efficiently

c)
  •  To allow multiple operating systems to coexist

d)
  • To increase disk space

32.
  1. What is the first step in creating a partition on a Linux system?

a)
  • Format the partition

b)
  • Divide the hard drive into partitions

c)
  •  Install a bootloader

d)
  • Mount the partition

33.
  1. Which tool is commonly used to create partitions in Linux?

a)
  • ls

b)
  • mount

c)
  • fdisk

d)
  • ps

34.
  1. What does MBR stand for in partitioning?

a)
  • Master Boot Record

b)
  • Main Boot Register

c)
  • Modern Boot Record

d)
  •  Major Boot Registry

35.
  1. How many primary partitions can be created on an MBR-partitioned disk?

a)
  •  4

b)
  •  2

c)
  • 6

d)
  • 8

36.
  1. What is an extended partition used for?

a)
  • To hold a bootloader

b)
  • To allow additional partitions beyond the primary partition limit

c)
  •  To store large files

d)
  • To mount filesystems

37.
  1. Which partitioning type supports disks larger than 2TB?

a)
  •  MBR

b)
  • GPT

c)
  •  BIOS

d)
  • NTFS

38.
  1. What is the maximum number of partitions supported by GPT?

a)
  •  4

b)
  • 128

c)
  • 16

d)
  • 256

39.
  1. Which tool is used to create and manage GPT partitions?

a)
  •  fdisk

b)
  •  gdisk

c)
  •  gparted

d)
  • sfdisk

40.
  1. What is the purpose of a filesystem in Linux?

a)
  •   To store hardware information

b)
  • To organize and store files and directories on a partition

c)
  •  To manage memory usage

d)
  • To install operating systems

41.
  1. Which of the following filesystems is known for being used on optical discs?

a)
  • ext4

b)
  • xfs

c)
  • ISO 9660

d)
  • vfat

42.
  1. What does the term "journaling" in a filesystem refer to?

a)
  • Logging all user activities

b)
  • Recording file changes to ensure recovery after crashes

c)
  • Creating backups of directories

d)
  • Compressing files for storage

43.
  1. Which of the following is a non-journaling filesystem?

a)
  • ext4

b)
  •  ext3

c)
  • ext2

d)
  •  xfs

44.
  1. Which filesystem is known for efficiently handling large files and is the default for RHEL 7?

a)
  • ext2

b)
  • xfs

c)
  •  vfat

d)
  • ntfs

45.
  1. What command is used to list currently mounted filesystems?

a)
  •  ls

b)
  • df

c)
  • mount

d)
  •  lsmod

46.
  1. Which command displays a summary of disk space usage in human-readable format?

a)
  •  mount

b)
  • lsblk

c)
  • df -h

d)
  •  du -h

47.
  1. How do you mount a filesystem manually in Linux?

a)
  •  Use the mount command

b)
  •  Use the fdisk command

c)
  • Use the lsblk command

d)
  • Use the df command

48.
  1. Which directory is used as the default location to mount filesystems temporarily?

a)
  • /home

b)
  • /tmp

c)
  • /mnt

d)
  • /var

49.
  1. What does the /dev directory contain in Linux?

a)
  • User files

b)
  • System logs

c)
  • Device files

d)
  • Configuration files

50.
  1. What command is used to display the partition table of a disk?

a)
  • lsblk

b)
  • mount

c)
  • fdisk -l

d)
  • dmesg

51.
  1. What does the command mkfs do?

a)
  • Mounts a filesystem

b)
  • Creates a new filesystem

c)
  • Deletes a filesystem

d)
  • Lists filesystem types

52.
  1. How can you resize a partition non-destructively in Linux?

a)
  •  fdisk

b)
  •  parted

c)
  • sfdisk

d)
  • fsck

53.
  1. What is the function of the swap partition in Linux?

a)
  • Stores user files

b)
  • Extends physical memory by using disk space as virtual memory

c)
  •  Holds system logs

d)
  • Contains bootloader files

54.
  1. Which partition is critical for booting a UEFI system?

a)
  • /boot/efi

b)
  •  /var

c)
  • /usr

d)
  • /home

55.
  1. What does the sfdisk command allow you to do?

a)
  • Create bootloaders

b)
  • Modify partition tables using scripts

c)
  • Monitor system memory

d)
  • Display CPU information

56.
  1. How can you make changes to partitions on a running system without rebooting?

a)
  • Use the dmesg command

b)
  •  Use the partprobe command

c)
  • Use the fsck command

d)
  • Use the lsmod command

57.
  1. What is the purpose of the /etc/fstab file?

a)
  • To monitor system processes

b)
  • To list devices to mount automatically at boot

c)
  • To configure kernel modules

d)
  • To store user profiles

58.
  1. What does the umount command do in Linux?

a)
  • Formats a partition

b)
  • Unmounts a filesystem

c)
  • Creates a new filesystem

d)
  • Lists mounted devices

59.
  1. What command displays all available block devices on the system?

a)
  • df -h

b)
  • lsblk

c)
  •  mount -a

d)
  • fdisk -l

60.
  1. How can you back up the partition table in Linux?

a)
  • mkfs -l

b)
  • sfdisk -d

c)
  • lsblk --backup

d)
  • parted -s

61.
  1. What is the primary reason Linux administrators prefer the command line interface over the GUI?

a)
  • It is easier to use

b)
  • It consumes fewer system resources

c)
  •  It is more visually appealing

d)
  • It supports better graphics

62.
  1. Which file is used to permanently customize the environment for all users in a system?

a)
  • ~/.bashrc

b)
  • ~/.profile

c)
  •  /etc/profile

d)
  • ~/.bash_logout

63.
  1. How do you assign a value to a variable in the shell?

a)
  • variable = value

b)
  • variable == value

c)
  •  variable = "value"

d)
  • variable="value"

64.
  1. Which command displays all environment variables?

a)
  • env

b)
  • declare -x

c)
  • export -p

d)
  •  All of the above

65.
  1. What is the purpose of the PATH variable?

a)
  • To store the user's login history

b)
  •  To define the directories searched for commands

c)
  •  To list all files in the system

d)
  • To set user permissions

66.
  1. What command can be used to unset a variable in the shell?

a)
  • delete

b)
  •  remove

c)
  • unset

d)
  • clear

67.
  1. Which file stores the history of commands executed in Bash by default?

a)
  • ~/.history

b)
  •  ~/.bashrc

c)
  • ~/.bash_history

d)
  •  ~/.profile

68.
  1. What does the command alias ll='ls -alF' do?

a)
  • Creates a new user named ll

b)
  •  Runs the command ls -alF

c)
  • Creates an alias ll for ls -alF

d)
  • Sets a variable named ll

69.
  1. Which of the following operators is used for sequential execution of commands?

a)
  • &&

b)
  • ||

c)
  •  ;

d)
  •  &

70.
  1. What is the function of the export command?

a)
  • Display all environment variables

b)
  • Make a local variable available to subshells

c)
  • Unset a variable

d)
  • Rename a variable

71.
  1. Which command temporarily modifies the PATH variable for a single command?

a)
  • set PATH

b)
  • modify PATH

c)
  • env PATH=value command

d)
  • export PATH=value

72.

What does the echo $PATH command display?

a)
  • Current user's environment variables

b)
  •  Current shell options

c)
  • Directories listed in the PATH variable

d)
  • Active background processes

73.

What does the type command do?

a)
  •  Displays the type of shell being used

b)
  • Identifies if a command is a built-in, alias, or executable

c)
  • Prints the contents of a file

d)
  • Executes a given shell script

74.

Which file contains aliases and variables specific to an individual user?

a)
  • /etc/bashrc

b)
  • /etc/profile

c)
  • ~/.bashrc

d)
  • ~/.bash_profile

75.

What command can make an alias permanent?

a)
  •  export alias

b)
  • Save the alias in ~/.bashrc

c)
  • Use alias --permanent

d)
  • Use unalias

76.

What is the correct syntax for creating a function in Bash?

a)
  • function_name { commands }

b)
  • function_name [ commands ]

c)
  •  function function_name { commands }

d)
  • function_name = { commands }

77.

How do you display the value of a specific variable in the shell?

a)
  • print variable

b)
  •  display variable

c)
  • echo $variable

d)
  • show variable

78.

Which special character is used to append data to a file in a script?

a)
  • >

b)

>>

c)
  •  |

d)
  •  ||

79.

What is the purpose of the chmod u+x command?

a)
  • Change file permissions to executable for the user

b)

Copy a file to the user's home directory

c)
  •  Remove a file from the system

d)
  • Set the default file permissions

80.

Which file is used to execute commands upon a user's logout?

a)
  • ~/.bashrc

b)

~/.bash_logout

c)
  •  ~/.profile

d)
  • /etc/profile

81.

How can you execute a script named myscript.sh in the current directory?

d)
  • All of the above

82.

Which of the following operators is used for conditional execution based on success?

a)
  • ;

b)

 ||

c)
  •  &&

d)
  •  &

83.

Which command reads user input during script execution?

a)
  • input

b)

echo

c)
  • read

d)
  • scanf

84.

What does the -z option test in a conditional statement?

a)
  •  If a file exists

b)

If a string is empty

c)
  • If a variable is numeric

d)
  • If a string is non-empty

85.

What is the purpose of the shebang (#!/bin/bash) at the start of a script?

a)
  • To define the path to the script

b)

To specify the shell for script execution

c)
  • To create a comment in the script

d)
  • To execute the script immediately

86.

Which command would you use to find out if a directory exists in a script?

a)
  •  test -d directory

b)

 check directory

c)
  •  ls directory

d)
  •  dir directory

87.

What is the default command history size in Bash?

a)
  •  100

b)

500

c)
  • 1000

d)
  • 50

88.

What does the command unalias alias_name do?

a)
  • Creates an alias

b)

 Removes an alias

c)
  • Lists all aliases

d)
  • Makes an alias permanent

89.

How do you make an environment variable permanent for a user?

a)
  • Set it in ~/.bashrc or ~/.profile

b)

Use the export command

c)
  • Set it in the /etc/profile file

d)
  • Restart the shell

90.

What does the pwd command display?

a)
  •  Parent directory of the user

b)

Current working directory

c)
  • Previous directory

d)
  • Home directory