wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

5. 201.3 Kernel runtime management and troubleshooting

Total questions: 85

Worksheet time: 53mins

Name
Class
Date
1.

Type the command to list the kernel modules loaded:

(a)  

2.

"This command is used to insert and load modules to the kernel. To load modules you should be logged in as a superuser"

(a)  

3.

Which parameter of the "insmod" command writes results to syslog instead of the terminal?

a)

insmod -a

b)

insmod -c

c)

insmod -s

d)

insmod -v

e)

insmod -l

4.

Let's suppose you have the kernel version 5.15.0-52-generic. What should be the full path of the folder containing most of the kernel modules?

(a)  

5.

You have the next kernel module: /lib/modules/6.0.8/kernel/net/wireless/lib80211.ko

Type the full command to load that module to the kernel.

(a)  

6.

Which commands are used to remove a module from the kernel?

a)

insmod

b)

lsmod

c)

rmmod

d)

modprobe -r

e)

delmod

7.

How can you remove the next module:

/lib/modules/6.0.8/kernel/net/wireless/lib80211.ko



(a)  

8.

"It is used to insert modules. However, it has the ability to load single modules, modules, and their prerequisites, or all modules stored in a specific directory. It also is more specific in its error messages than insmod"

a)

insmod

b)

lsmod

c)

loadmod

d)

modprobe

e)

rmmod

9.

"If the module is dependent upon other modules these will be loaded first. The modprobe command determines prerequisite relationships between modules by reading the file ___________".

a)

/lib/modules/kernel-version/modules.dep

b)

/lib/modules/modules.dep/

c)

/lib/modules/kernel-version/modules.dep.bin

d)

/lib/modules/kernel-version/kernel/modules.dep

10.

"Loads all the modules specified on the line".

a)

modprobe -a

b)

modprobe -c

c)

modprobe -l

d)

modprobe -s

e)

modinfo -h

11.

"Displays a complete module configuration, including defaults and directives found in /etc/modules.conf".

a)

modprobe -a

b)

modprobe -c

c)

modprobe -l

d)

modprobe -s

e)

modinfo -h

12.

"List modules. Now, it’s no longer available".

a)

modprobe -a

b)

modprobe -c

c)

modprobe -l

d)

modprobe -s

e)

modinfo -h

13.

"Displays results in syslog instead of on the terminal".

a)

modprobe -a

b)

modprobe -c

c)

modprobe -l

d)

modprobe -s

e)

modinfo -h

14.

"Set verbose mode".

a)

modprobe -a

b)

modprobe -v

c)

modprobe -l

d)

modprobe -s

e)

modinfo -h

15.

"Module configuration is handled in the file (1)___________. If this file does not exist the modprobe utility will try to read the (2)___________ instead. But the last is deprecated".

Which files does the above statement refer to?

a)

(1) /etc/modules.conf

b)

(1) /etc/modules-load.d/modules.conf

c)

(2) /etc/conf.modules

d)

(2) /lib/modules/kernel-version/modules.dep

16.

"It displays information about a module from its module-object-file".

a)

insmod

b)

lsmod

c)

modinfo

d)

infmod

e)

rmmod

17.

"Display the module's author".

a)

modinfo -a

b)

modinfo -d

c)

modinfo -n

d)

modinfo -p

e)

modinfo -h

18.

"Display the module’s description".

a)

modinfo -a

b)

modinfo -d

c)

modinfo -n

d)

modinfo -p

e)

modinfo -h

19.

"Display the module's filename".

a)

modinfo -a

b)

modinfo -d

c)

modinfo -n

d)

modinfo -p

e)

modinfo -h

20.

"Display the type parameters that a module may support".

a)

modinfo -e

b)

modinfo -t

c)

modinfo -n

d)

modinfo -p

e)

modinfo -h

21.

"Display a small usage screen".

a)

modinfo -e

b)

modinfo -t

c)

modinfo -n

d)

modinfo -n

e)

modinfo -h

22.

"Display the version of modinfo".

a)

modinfo -e

b)

modinfo -v

c)

modinfo -n

d)

modinfo -V

e)

modinfo -h

23.

Which file is used to control assignments of the resources a module uses, such as hardware interrupts or Direct Memory Access (DMA) channels?

a)

/proc/sys/kernel/

b)

/etc/conf.modules

c)

/lib/modules/kernel-version/modules.dep

d)

/etc/modules.conf

24.

"The command __________ causes a specified shell command to be executed to start the execution of a module prior to install it".

a)

pre-boot

b)

pre-load

c)

pre-install

d)

load

25.

The module on the path /etc/init.d/pcmcia should be started.

But, first, the pcmcia_core should be installed.

Type the complete command to install and start the module execution.

(a)  

26.

"The command __________ can determine module dependencies and install prerequisite modules automatically.".

a)

insmod

b)

lsmod

c)

rmmod

d)

modprobe

e)

delmod

27.

The command modprobe can determine module dependencies and install prerequisite modules automatically. To do this, modprobe scans the first column of ____________ to find the module it is to install.

a)

/lib/modules/kernel-version/modules.conf

b)

/lib/modules/kernel-version/modules.dep

c)

/lib/modules/modules.dep

d)

/lib/modules/dependencies.conf

28.

Type the full path of the file containing module dependencies on a Linux Kernel 5.15.0-52-generic

(a)  

29.

"This command probes all modules and tries to recreate them".

a)

insmod

b)

loadmod

c)

rmmod

d)

depmod

e)

delmod

30.

Let's suppose you have a Linux Kernel 5.15.0-52-generic.

When you run the depmod command, which file is regenerated?

(a)  

31.

"Both _________ and _________ provide for dynamic loading of kernel-modules."

a)

insmod

b)

loadmod

c)

kmod

d)

depmod

e)

kerneld

32.

To use kmod, which two options should be enabled while compiling a kernel?

a)

CONFIG_MOD

b)

CONFIG_KMOD

c)

CONFIG_MODULES

d)

CONFIG_CONFIG_KMOD

33.

"Installing the kernel means installing the following files into the /boot directory". (Choose four correct answers):

a)

system.map-2.6.x

b)

config-2.6.x

c)

vmlinuz-2.6.x

d)

initrd.img-2.6.x

e)

System.kern-2.6.x

34.

"Besides building and installing a kernel on a local machine, you can also create packages that allow you to distribute your newly built kernel to other machines".

Which are three commands for this reason:

a)

make rpm-pkg

b)

make rpm-ko

c)

make binrpm-pkg

d)

make deb-pkg

e)

make deb-kern.ko

35.

"Builds both source and binary RPM packages".

a)

make rpm-pkg

b)

make rpm-ko

c)

make binrpm-pkg

d)

make deb-pkg

e)

make deb-kern.ko

36.

"Builds (only) binary kernel RPM package".

a)

make rpm-bin

b)

make rpm-ko

c)

make binrpm-pkg

d)

make deb-pkg

e)

make deb-kern.ko

37.

"Builds the kernel package as a deb(ian) package".

a)

make deb-pack

b)

make rpm-ko

c)

make binrpm-pkg

d)

make deb-pkg

e)

make deb-kern.ko

38.

"The folder is a pseudo-filesystem, meaning that its contents are directly presented by the kernel. It contains directories and other files that reflect the state of the running system".

a)

/

b)

/proc

c)

/run

d)

/boot

e)

/var

39.

"It contains the generic systemwide commands".

a)

/

b)

/bin

c)

/run

d)

/boot

e)

/var

40.

"It's the top-level directory for data that will be constantly changing (logs etc.)".

a)

/

b)

/bin

c)

/run

d)

/boot

e)

/var

41.

"It contains data related to services the system provides (e.g. a webserver)".

a)

/srv

b)

/bin

c)

/serv

d)

/boot

e)

/var

42.

"It holds temporary files".

a)

/srv

b)

/temp

c)

/tmp

d)

/boot

e)

/var

43.

"It's where USB disks, tape-units and other devices that contain a filesystem can be mounted temporarily".

a)

/dev

b)

/temp

c)

/mnt

d)

/mount

e)

/var

44.

"They are used to hold modules and other libraries".

a)

/lib

b)

/temp

c)

/lib32

d)

/mount

e)

/lib64

45.

"It holds files used during boot".

a)

/boot

b)

/temp

c)

/lib32

d)

/mount

e)

/lib64

46.

"It's under which we find special commands for the system administrator".

a)

/boot

b)

/sbin

c)

/lib32

d)

/bin

e)

/lib64

47.

"It's for third party packages".

a)

/boot

b)

/sbin

c)

/home

d)

/opt

e)

/lib64

48.

"It contains the configuration files for your system".

a)

/etc

b)

/sbin

c)

/home

d)

/opt

e)

/lib64

49.

"It contains commands which are part of the distribution".

a)

/etc

b)

/bin/

c)

/usr/local/bin

d)

/opt

e)

/lib64

50.

"It contains commands that are non-mandatory or added later by the system administrator".

a)

/etc

b)

/usr/bin/

c)

/usr/local/bin

d)

/opt

e)

/lib64

51.

"It contains commands that are specific to the local system".

a)

/usr/local/bin

b)

/usr/bin/

c)

/etc/local/bin

d)

/opt

e)

/lib64

52.

"This directory contains directories with kernel modules needed for the kernel. These directories are created after building the kernel with make modules_install".

a)

/lib/modules/

b)

/lib/modules/modules.dep

c)

/lib/modules

d)

/etc/modules.conf

e)

/etc/conf.modules

53.

"It's a useful diagnostic, instructional, and debugging tool. It intercepts and records the system calls which are called by a process and the signals which are received by a process."

a)

strace

b)

strings

c)

ltrace

d)

iptrace

e)

pstrace

54.

Type the full command to trace the system call of the command "ls":

(a)  

55.

"It counts the number of system calls made by 'ls' command".

a)

strace ls

b)

strace -c

c)

strace -e

d)

strace -C

56.

Which command will show the specific write call made for the command "ls":

a)

strace -e trace=wr ls

b)

strace -w ls

c)

strace -e trace=write ls

d)

strace -C

57.

What command store the output of the system calls made by the ls command, into the file output.txt

a)

strace -c output.txt ls

b)

strace -w ls output.txt

c)

strace -e trace=write ls

d)

strace -o output.txt ls

58.

"It's used to see the text inside a binary or data file".

a)

strace

b)

strings

c)

ltrace

d)

iptrace

e)

pstrace

59.

Type the full command to see the text inside the binary /usr/bin/mtr

(a)  

60.

"It intercepts and records the dynamic library calls which are called by the executed process and the signals which are received by that process".

a)

strace

b)

strings

c)

ltrace

d)

iptrace

e)

pstrace

61.

Type the full command to intercept and records the dynamic library calls of the program in /usr/bin/mtr

(a)  

62.

"It prints system information such as machine type, network hostname, OS release, OS name, OS version, and processor type of the host".

a)

host

b)

uname

c)

lspci

d)

lsusb

63.

"It prints all information (machine type, network hostname, OS release, OS name, OS version, and processor type of the host"

a)

uname -a

b)

uname -n

c)

uname -s

d)

uname -r

64.

"It prints the kernel name".

a)

uname -a

b)

uname -n

c)

uname -s

d)

uname -r

65.

"It prints the network node hostname".

a)

uname -a

b)

uname -n

c)

uname -s

d)

uname -r

66.

"It prints the kernel build version, date, and time".

a)

uname -p

b)

uname -m

c)

uname -v

d)

uname -i

67.

"It prints the machine hardware architecture name".

a)

uname -p

b)

uname -m

c)

uname -v

d)

uname -i

68.

"It prints the name of the processor type".

a)

uname -p

b)

uname -n

c)

uname -v

d)

uname -i

69.

"It prints the name of the operating system".

a)

uname -p

b)

uname -m

c)

uname -o

d)

uname -i

70.

"It's a directory in the /proc pseudo filesystem. It contains files that allow you to tune and monitor the Linux kernel".

a)

/proc/sys/kernel/

b)

/proc/sys/kernel/osrelease

c)

/proc/sys/

d)

/proc/sys/bus/

71.

"This file contains the version of the running kernel".

a)

/proc/sys/kernel/osrelease

b)

/proc/sys/kernel/osversion

c)

/proc/sys/kernel/linux-release

d)

/proc/sys/kernel/linux-version

72.

Type the command to prompt the kernel to auto-reboot after 20 seconds of facing a kernel panic:

(a)  

73.

"With ________ you can display information about all the PCI buses in the system and all the devices that are connected to them. Access to some parts of the PCI configuration space is restricted to root on many operating systems".

a)

lsusb

b)

lspci

c)

pciinfo

d)

/proc/sys/pci

74.

"It checks the USB buses and devices".

a)

lsusb

b)

lspci

c)

pciinfo

d)

/proc/sys/pci

75.

"It displays information about installed hardware. It gathers information from interrupts, DMA files, and ioports from the /proc directory. It gives a quick overview about which device is using what I/O address and IRQ/DMA channel".

a)

lsusb

b)

lspci

c)

lsdev

d)

/proc/sys/pci

76.

"To use this command, in some distributions you should firstly install the package procinfo as __________, instead, you could use __________ command".

a)

apt install lsdev

b)

apt install procinfo

c)

lsdev

d)

procinfo

77.

"lsdev gathers information from three main files:"

a)

/proc/sys/kernel

b)

/proc/sys/devices

c)

/proc/interrupts

d)

/proc/ioports

e)

/proc/dma

78.

"It's used to modify kernel parameters at runtime. The parameters available are those listed under /proc/sys/".

a)

udev

b)

lsdev

c)

lsusb

d)

sysctl

79.

Type the full path of the sysctl configuration file:

(a)  

80.

"It was designed to make Linux device handling more flexible and safe by taking device handling out of system space into userspace".

a)

/dev/

b)

udev

c)

kernel

d)

lsdev

81.

"Consists of a userspace daemon which receives "uevents" from the kernel. Communication between the userspace daemon and the kernel is done through the sysfs pseudo filesystem".

a)

/dev/

b)

udev

c)

kernel

d)

lsdev

82.

Type the full path of the directory that contains the configuration and the rule files for the udev utility:

(a)  

83.

Type the full path of the directory containing the default udev rules:

(a)  

84.

"Custom rules to override the default rules in /lib/udev/rules.d/ are specified in the (a)   directory".

85.

"This command will print udev and kernel uevents to standard output. You can use it to analyze event timing by comparing the timestamps of the kernel uevent and the udev event"

a)

lsudev

b)

lsevent

c)

udevmonitor

d)

lsudevadm

e)

udevadm monitor