Question 1
Question
1.- Which kernel parameter controls the console verbosity at boot (quiet vs verbose)?
Answer
-
loglevel= or quiet
-
verbose=
-
console= only
-
debug=
Question 2
Question
2.- To view the system’s last reboot reason via systemd, which command helps?
Question 3
Question
3.- Which tool on Debian/Ubuntu lists kernel packages installed so you can match /lib/modules folders?
Answer
-
dpkg -l 'linux-image*'
-
rpm -qa kernel
-
pacman -Q linux
-
apt-cache search linux
Question 4
Question
4.- Which systemd directive makes a unit start automatically at boot?
Answer
-
systemctl enable <unit>
-
systemctl start <unit>
-
systemctl reserve <unit>
-
systemctl boot <unit>
Question 5
Question
5.- When troubleshooting a failed boot, which of these is the most useful first step?
Answer
-
Examine bootloader config (/boot/grub/grub.cfg) and kernel params
-
Reinstall the OS immediately
-
Delete /boot contents and retry
-
Modify /etc/passwd
Question 6
Question
6.- Which command will list active targets and their dependencies?
Question 7
Question
7.- How do you instruct GRUB to boot a kernel with a different root device only for this boot?
Answer
-
Edit kernel root= parameter from GRUB menu before boot
-
Change /etc/fstab permanently
-
Use grub-set-root after boot
-
Reinstall GRUB
Question 8
Question
8.- Which file may be used to blacklist an initramfs hook or module in dracut?
Answer
-
/etc/dracut.conf or /etc/dracut.conf.d/*.conf
-
/etc/modprobe.d/blacklist.conf only
-
/boot/dracut.blacklist
-
/etc/initramfs-tools/conf.d/ (dracut uses dracut.conf)
Question 9
Question
9.- What command returns the current and previous runlevels on a SysV system?
Answer
-
runlevel
-
who -r
-
Both A and B
-
systemctl runlevel
Question 10
Question
10.- Which is the safe sequence to shutdown the machine and power off using SysV utilities?
Question 11
Question
11.- Which command is used to list all partitions on all disks?
Answer
-
fdisk -l
-
lsblk -f
-
blkid
-
df -h
Question 12
Question
12.- Which tool is used to create or modify GPT partition tables?
Question 13
Question
13.- Which command displays information about block devices in a tree structure?
Question 14
Question
14.- What is the maximum number of primary partitions allowed in an MBR disk?
Question 15
Question
15.- Which partition type is used to contain logical partitions in MBR?
Answer
-
Swap partition
-
Extended partition
-
Primary partition
-
Boot partition
Question 16
Question
16.- Which utility displays filesystem UUIDs and types?
Question 17
Question
17.- What is the purpose of the mkswap command?
Question 18
Question
18.- Which command activates all swap areas listed in /etc/fstab?
Answer
-
swapon -a
-
swapoff -a
-
systemctl enable swap
-
mount -a
Question 19
Question
19.- Which tool can resize partitions interactively on a running system?
Question 20
Question
20.- What command displays the total swap usage?
Answer
-
df -h
-
swapon -s
-
top
-
lsblk
Question 21
Question
21.- Which LVM command creates a physical volume?
Answer
-
vgcreate
-
pvcreate
-
lvcreate
-
lvextend
Question 22
Question
22.- Which file contains partition information for traditional systems?
Answer
-
/etc/partitions
-
/proc/partitions
-
/etc/fstab
-
/boot/grub/grub.cfg
Question 23
Question
23.- Which command initializes a volume group in LVM?
Answer
-
lvcreate
-
vgcreate
-
pvcreate
-
vgextend
Question 24
Question
24.- Which tool is used to create logical volumes?
Answer
-
lvcreate
-
vgcreate
-
pvcreate
-
mkfs
Question 25
Question
25.- Which command extends an existing logical volume?
Answer
-
lvextend
-
pvextend
-
vgextend
-
resize2fs
Question 26
Question
26.- Which file defines partitions mounted automatically at boot?
Answer
-
/etc/partitions
-
/etc/fstab
-
/etc/mounts
-
/proc/mounts
Question 27
Question
27.- What is the function of vgextend?
Question 28
Question
28.- Which command displays all existing volume groups?
Answer
-
lvdisplay
-
vgdisplay
-
pvdisplay
-
lvs
Question 29
Question
29.- What command is used to create a GPT partition table?
Question 30
Question
30.- Which tool is used to create a new filesystem on a partition?
Question 31
Question
31.- Which command can display filesystem usage and available space?
Question 32
Question
32.- What is the name of the metadata area in an LVM physical volume?
Answer
-
PE (Physical Extent)
-
VG descriptor
-
PV header
-
LV header
Question 33
Question
33.- What is the smallest unit of allocation in LVM?
Answer
-
Physical volume
-
Volume group
-
Physical extent
-
Logical volume
Question 34
Question
34.- Which tool displays UUIDs for swap and partitions?
Answer
-
lsblk -f
-
blkid
-
cat /etc/fstab
-
df -T
Question 35
Question
35.- Which command creates a swap file of 1 GB size?
Question 36
Question
36.- Which command displays detailed information about logical volumes?
Answer
-
lvdisplay
-
vgdisplay
-
pvdisplay
-
lvscan
Question 37
Question
37.- Which command creates a snapshot of a logical volume?
Answer
-
lvcreate -s
-
vgcreate -s
-
pvcreate -s
-
lvextend -s
Question 38
Question
38.- What is the main purpose of an LVM snapshot?
Question 39
Question
39.- Which command removes a logical volume?
Answer
-
lvdelete
-
lvremove
-
vgremove
-
pvremove
Question 40
Question
40.- To resize a filesystem after extending an LVM volume, which command is used for ext4 filesystems?
Answer
-
resize2fs
-
xfs_growfs
-
fsck
-
mkfs.ext4
Question 41
Question
41.- What must be done before reducing a logical volume’s size?
Answer
-
Run vgextend
-
Unmount the filesystem and shrink it first
-
Add more physical extents
-
Activate the volume group
Question 42
Question
42.- Which LVM command deactivates a volume group?
Answer
-
vgdeactivate
-
vgchange -a n
-
vgstop
-
vgremove
Question 43
Question
43.- What is the default size unit for LVM extents?
Question 44
Question
44.- Which command creates a new swap area on an existing partition?
Answer
-
mkfs.swap /dev/sdb2
-
mkswap /dev/sdb2
-
swapon /dev/sdb2
-
swapcreate /dev/sdb2
Question 45
Question
45.- How can you permanently enable a swap file?
Question 46
Question
46.- Which command shows all currently active swap areas?
Answer
-
cat /proc/meminfo
-
swapon --show
-
free -m
-
lsblk
Question 47
Question
47.- Which filesystem type is used for Linux swap space?
Question 48
Question
48.- What happens when physical memory is exhausted and no swap is available?
Question 49
Question
49.- Which command converts an MBR disk to GPT safely (non-destructive)?
Answer
-
gdisk
-
fdisk
-
parted mklabel
-
mkfs.gpt
Question 50
Question
50.- Which partition flag marks a partition as bootable in MBR?
Answer
-
boot
-
active
-
bios_grub
-
uefi_boot
Question 51
Question
51.- How can you view partition table type (MBR or GPT)?
Answer
-
cat /etc/fstab
-
parted /dev/sda print
-
lsblk -a
-
blkid
Question 52
Question
52.- Which tool is preferred for managing GPT disks interactively?
Question 53
Question
53.- What is the purpose of the /etc/lvm/backup/ directory?
Question 54
Question
54.- Which command shows the mapping between logical and physical extents?
Answer
-
lvdisplay -m
-
vgdisplay -v
-
pvscan
-
lvscan
Question 55
Question
55.- Which LVM command removes a volume group?
Answer
-
vgdelete
-
vgremove
-
lvremove
-
pvremove
Question 56
Question
56.- Which command initializes a disk as an LVM physical volume?
Answer
-
lvcreate /dev/sdb
-
vgcreate /dev/sdb
-
pvcreate /dev/sdb
-
lvm /dev/sdb
Question 57
Question
47.- Which command lists all volume groups on the system?
Question 58
Question
58.- How can you identify all physical volumes currently present?
Answer
-
vgdisplay
-
pvdisplay
-
lvdisplay
-
pvlist
Question 59
Question
49.- Which command enables you to label a partition manually?
Answer
-
e2label
-
lsblk -L
-
fdisk -L
-
blkid -L
Question 60
Question
60.- Which command verifies the integrity of an ext4 filesystem?
Answer
-
fsck.ext4
-
mkfs.ext4
-
resize2fs
-
tune2fs