Question 1
Question
1.- Which configuration file defines GRUB 2 menu entries?
Answer
-
/boot/grub/menu.lst
-
/etc/grub.d/40_custom
-
/boot/grub2/grub.cfg
-
/etc/default/grub.cfg
Question 2
Question
2.- Which command regenerates the GRUB 2 configuration file?
Answer
-
update-grub
-
grub2-mkconfig
-
grub-install
-
grub-rebuild
Question 3
Question
3.- What is the function of /etc/default/grub?
Question 4
Question
4.- Which command installs the GRUB 2 boot loader to a device?
Answer
-
grub2-install /dev/sda
-
update-grub /dev/sda
-
install-grub2 /dev/sda
-
bootctl install /dev/sda
Question 5
Question
5.- What is the role of the initrd or initramfs image?
Question 6
Question
6.- Where is the MBR located on a disk?
Question 7
Question
7.- What does the BIOS do before loading GRUB?
Question 8
Question
8.- How do you add a custom GRUB 2 menu entry?
Question 9
Question
9.- What command updates the bootloader configuration on Debian systems?
Answer
-
update-grub
-
grub2-install
-
dpkg-reconfigure grub
-
bootctl update
Question 10
Question
10.- Which GRUB 2 command line option lets you edit boot parameters temporarily?
Answer
-
Press e
-
Press c
-
Press d
-
Press Esc
Question 11
Question
11.- In GRUB 2, what does the set root=(hd0,1) command do?
Question 12
Question
12.- Which file lists all kernels installed on a Debian system?
Answer
-
/etc/kernel.conf
-
/boot/ directory
-
/etc/default/kernel
-
/usr/lib/modules
Question 13
Question
13.- What does the GRUB command linux /vmlinuz do?
Question 14
Question
14.- How can you restore GRUB 2 if it becomes corrupted?
Question 15
Question
15.- Which GRUB 2 command boots the system after manual setup?
Question 16
Question
16.- What is the default timeout variable in /etc/default/grub?
Answer
-
GRUB_WAIT
-
GRUB_TIMEOUT
-
GRUB_DELAY
-
BOOT_TIMEOUT
Question 17
Question
17.- Which command in GRUB’s shell lists available partitions?
Answer
-
ls
-
show devices
-
devices
-
partlist
Question 18
Question
18.- What GRUB 2 feature allows password protection of menu entries?
Answer
-
set secure
-
password_pbkdf2
-
encrypt_menu
-
auth on
Question 19
Question
19.- Which directory contains GRUB 2 module files (*.mod)?
Answer
-
/usr/lib/grub/
-
/boot/grub2/i386-pc/
-
/etc/grub.d/
-
/sbin/grub/
Question 20
Question
20.- What command shows the current runlevel?
Answer
-
runlevel
-
systemctl status
-
who -r
-
initctl list
Question 21
Question
21.- In systemd, which command lists available targets?
Question 22
Question
22.- Which GRUB 2 directive sets the default boot entry?
Answer
-
GRUB_DEFAULT
-
GRUB_BOOT
-
DEFAULT_ENTRY
-
GRUB_ENTRY
Question 23
Question
23.- In GRUB, what does initrd /initrd.img specify?
Question 24
Question
24.- What command lists the libraries required by a binary?
Answer
-
ldconfig
-
ldd
-
lslib
-
objdump
Question 25
Question
25.- Where are 64-bit libraries typically stored?
Answer
-
/usr/lib64
-
/usr/lib32
-
/lib
-
/usr/local/lib
Question 26
Question
26.- What does the /etc/ld.so.conf file specify?
Question 27
Question
27,. Which command updates the library cache after installing a new library?
Answer
-
ldconfig
-
update-lib
-
libcache
-
reload-libs
Question 28
Question
28.- What is the default library cache file used by the dynamic linker?
Answer
-
/etc/ld.so.cache
-
/usr/lib/cache
-
/etc/lib.conf
-
/var/lib/ld.cache
Question 29
Question
29.- Which environment variable defines additional library search paths?
Answer
-
LD_PATH
-
LD_LIBRARY_PATH
-
LIB_PATH
-
SHLIB_PATH
Question 30
Question
30.- Which file lists all directories known to ldconfig?
Answer
-
/etc/ld.so.conf.d/
-
/usr/lib/ldconfig.d/
-
/var/lib/lib.conf
-
/etc/lib.paths
Question 31
Question
31.- What does the linker use to find shared libraries?
Answer
-
Symbol tables
-
SONAME
-
Library manifest
-
Header files
Question 32
Question
32.- How do you display the SONAME of a shared library?
Answer
-
objdump -p libname.so
-
ldconfig -p
-
nm libname.so
-
strings libname.so
Question 33
Question
33.- What is the purpose of symbolic links like libc.so.6 → libc-2.31.so?
Question 34
Question
34.- What command finds out which libraries are currently loaded by a running process?
Answer
-
cat /proc/<pid>/maps
-
ps aux
-
ldd
-
ls /proc/<pid>/fd
Question 35
Question
35.- Which file controls global dynamic linker options?
Answer
-
/etc/ld.so.conf
-
/etc/ld.so.preload
-
/etc/ld.so.cache
-
/usr/lib/ld.so.conf
Question 36
Question
36.- What does the program loader /lib64/ld-linux-x86-64.so.2 do?
Question 37
Question
37.- Which tool can you use to inspect dependencies of a shared library?
Answer
-
ldd
-
readelf -d
-
lsmod
-
objcopy
Question 38
Question
38.- What file extension identifies shared libraries on Linux?
Question 39
Question
39.- What is the role of static libraries?
Question 40
Question
40.- Which option links a program statically using gcc?
Answer
-
gcc -static
-
gcc --link
-
gcc --no-shared
-
gcc -nostdlib
Question 41
Question
41.- What command lists all shared libraries currently cached?
Answer
-
ldconfig -p
-
ldd
-
ls /usr/lib
-
ldconfig --list
Question 42
Question
42.- How can you temporarily preload a library when running a program?
Question 43
Question
43.- What is the effect of removing /etc/ld.so.cache?
Question 44
Question
44.- What is contained in /lib directory?
Question 45
Question
45.- Which command displays the dynamic section of an ELF executable?
Answer
-
readelf -d
-
ldd
-
nm
-
objdump -x
Question 46
Question
46.- The .a library files are used for:
Answer
-
Dynamic linking
-
Static linking
-
Module loading
-
Shared memory
Question 47
Question
47.- What is a key advantage of dynamic linking?
Answer
-
Smaller binaries and easier updates
-
Faster startup time
-
Complete independence from libraries
-
Requires no runtime loader
Question 48
Question
48.- What command finds which executable would be run by default?
Answer
-
which
-
whereis
-
find
-
locate
Question 49
Question
49.- How can you determine whether a binary is statically or dynamically linked?
Answer
-
ldd binary
-
file binary
-
nm binary
-
strings binary
Question 50
Question
50.- What environment variable overrides the default dynamic linker?
Answer
-
LD_LIBRARY_PATH
-
LD_PRELOAD
-
LD_SO
-
LD_ASSUME_KERNEL
Question 51
Question
51.- Which command installs a .deb package directly?
Answer
-
dpkg -i
-
apt install
-
aptitude add
-
installpkg
Question 52
Question
52.- Which command lists all installed packages on a Debian system?
Answer
-
dpkg -l
-
apt list --repos
-
apt-get show
-
dpkg-query -a
Question 53
Question
53.- Which command removes a package but leaves configuration files?
Answer
-
dpkg -P
-
dpkg -r
-
apt purge
-
apt remove --purge
Question 54
Question
54.- What is the function of dpkg -P?
Question 55
Question
55.- Which command shows the files installed by a package?
Answer
-
dpkg -L package
-
dpkg -c package.deb
-
dpkg -S package
-
dpkg -p package
Question 56
Question
56.- Which file lists local APT repositories?
Answer
-
/etc/apt/sources.list
-
/etc/apt/repos.conf
-
/etc/apt/packages.conf
-
/var/lib/apt/cache
Question 57
Question
57.- What command updates the local APT package list?
Answer
-
apt update
-
apt upgrade
-
apt-cache
-
dpkg --refresh
Question 58
Question
58.- Which command upgrades all installed packages?
Answer
-
apt full-upgrade
-
apt-get install -u
-
apt upgrade
-
dpkg -U
Question 59
Question
59.- Which command installs a package and dependencies?
Answer
-
dpkg -i
-
apt install
-
apt-cache add
-
rpm -i
Question 60
Question
60.- What does the apt autoremove command do?