Linux Administration: 2 Marks
Linux Administration: 2 Marks
MODULE 1
Levels and Layers of Abstraction in a Linux System, Hardware: Understanding Main Memory, The Kernel,
Process Management, Memory Management, Device Drivers and Management, System Calls and Support,
User Space, Users, The Bourne Shell, Using the Shell, Basic Commands, Navigating Directories, Intermediate
Commands, File Modes and Permissions, Archiving and Compressing Files, Linux Directory Hierarchy
Essentials, Running Commands as the Superuser .
2 MARKS
1

5 marks
1. Explain with examples of running Commands as the Superuser and their importance.
In Linux, the superuser (also known as root) has full control over the system. Some commands and operations,
such as installing software, changing system con gurations, or managing user accounts, can only be executed
with superuser privileges. Regular users are restricted from such tasks for security and stability.
To temporarily elevate privileges, users can use the sudo command. This ensures that only authorized users
can perform critical actions. For instance:
• sudo apt update updates the package list from the repositories (Debian-based systems).
Using sudo logs the command in system logs for auditing, improving traceability. The importance lies in
preventing unauthorized or accidental system modi cations and ensuring secure administrative control.
2. Discuss the le modes and permissions in Linux, including how they are represented.
Linux uses a permission system to manage access to les and directories. Each le has three types of
permission groups: owner (user), group, and others. Each group can have read (r), write (w), and execute
(x) permissions.
• Symbolic: -rwxr-xr--
2

fi
fi
fi
fi
fi
The rst character in a symbolic format represents the le type (- for les, d for directories). The next nine
characters represent permissions for user, group, and others.
You can change permissions using the chmod command. For example:
• chmod 755 file.txt gives full permission to the owner, and read+execute to group and others.
Proper permissions prevent unauthorized access and help maintain system security.
Intermediate Linux commands are those commonly used in daily system navigation and le management,
beyond basic ls and cd. Some useful ones include:
These commands help with log analysis, automation, scripting, and data processing. They are building blocks
of shell scripts and often used with pipes (|) for ef cient command chaining.
Partitioning divides a physical disk into isolated sections, each functioning as a separate storage unit. This
allows for better management, organization, and security. A disk can have primary, extended, and logical
partitions.
3

fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
Partitioning helps isolate system les from user data. During installation, Linux offers manual and automatic
partitioning. Partition schemes vary depending on whether MBR or GPT is used. Tools like fdisk, parted,
and gparted help manage partitions.
The Linux lesystem follows a hierarchical structure, with everything starting from the root directory /.
Subdirectories under / serve speci c purposes:
This structure allows easy navigation and system management. Administrators rely on this organization for
troubleshooting, con guring, and securing the system. The use of mount points allows different partitions or
devices to be attached within this hierarchy seamlessly.
6. Explain the different layers of abstraction in a Linux system and their roles.
1. Hardware Layer: Physical devices like CPU, RAM, disks, and peripherals.
2. Kernel Layer: The core of the OS that interfaces with hardware, manages processes, memory, device
drivers, and system calls.
3. System Call Interface: Allows user programs to request services from the kernel (e.g., read, write,
fork).
4. User Space: Applications and utilities (shell, editors, GUI apps) run here. This layer cannot directly
access hardware.
5. Shell Layer: Interface between users and the system, accepting commands and scripts.
These layers ensure separation of concerns, better security, and ef cient resource handling. For instance,
applications don’t talk to hardware directly; they go through the kernel via system calls.
4

fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
To run a command as a superuser, you pre x it with sudo (SuperUser DO), assuming your account is in the
sudoers list. Alternatively, you can switch to the root user using su.
Examples:
These commands need elevated privileges as they affect the system con guration and services. Using sudo
provides accountability by logging the command execution.
In Linux, a user is an entity (human or process) with speci c permissions to access system resources. Each user
has a unique ID (UID) and can belong to groups.
User space is the portion of memory where user processes run. It is isolated from kernel space to ensure that
user programs cannot directly affect system operations. This separation enhances security and system stability.
When a user interacts with the system through a shell or an application, it runs in user space, making requests to
the kernel via system calls.
9. Explain the difference between MBR (Master Boot Record) and GPT (GUID Partition
Table) in Linux.
• MBR (Master Boot Record): Older format, supports up to 4 primary partitions and disk sizes up to 2
TB. Stores partition table and bootloader in the rst 512 bytes.
• GPT (GUID Partition Table): Modern format supporting up to 128 partitions and disks larger than 2 TB.
It uses globally unique identi ers (GUIDs) and stores multiple copies of the partition table for
redundancy.
MBR is less exible and has no built-in error detection, while GPT includes CRC checks and a protective MBR
for compatibility.
• Supports larger disks: GPT can handle disks larger than 2 TB, which MBR cannot.
• More partitions: GPT allows up to 128 partitions per disk without extended partitions.
• Improved reliability: GPT stores multiple copies of the partition table and includes CRC32 checksums
to detect and correct corruption.
• Better compatibility: GPT is part of the UEFI standard, making it future-ready compared to MBR,
which is BIOS-based.
5

fl
fi
fi
fi
fi
fi
• GUID-based identi cation: Each partition has a unique identi er, improving disk and system
management.
Due to these advantages, GPT is preferred for modern systems and servers.
11. Compare and contrast EXT4, XFS, and Btrfs lesystems in terms of performance and
features.
• XFS:
◦ Not ideal for many small les and doesn't support shrinking volumes.
• Btrfs:
◦ Modern lesystem with advanced features like snapshots, subvolumes, built-in RAID, and
compression.
◦ Still evolving and considered less stable than EXT4 in certain environments.
Each has trade-offs; EXT4 for general use, XFS for large datasets, and Btrfs for advanced storage features.
12. How can you archive, compress, and extract les using tar, gzip, and zip?
In Linux, le archiving and compression help reduce storage space and simplify backups.
6

fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
◦ zip archive.zip file1 file2 → Creates a zip le
You can combine tools, e.g., tar -czf archive.tar.gz dir/ to create a compressed archive.
These tools are essential for backups, packaging software, and transferring les ef ciently.
10 marks
1. Discuss with a neat diagram about the Levels and Layers of Abstraction in a Linux System
The Linux operating system structure can be conceptually divided into several layers, each serving a speci c
purpose and providing a different level of abstraction. The main components of Linux operating system
are: Application, Shell, Kernel, Hardware, Utilities
7

fi
fi
fi
fi
fi
2. Explain the Linux directory hierarchy, highlighting key directories and their purposes.
8

3. Apply the Linux commands with proof for performing the LVM ( Logical volume manager).
LVM (Logical Volume Manager) is a storage management system in Linux that provides flexibility and
scalability for disk storage. It allows users to create, resize, and manage logical volumes dynamically without
being constrained by physical disk partitions.
9

4. What are system calls and how do they facilitate communication between user space and kernel
space?
A system call is a programmatic way for user-space applications to interact with the kernel. Since user
applications cannot directly access kernel functions (for safety and security), they request services like le
handling, process control, memory management, etc., via system calls.
3. Kernel Execution:
The requested service is executed in kernel space with elevated privileges.
5. Explain the complete process of disk management in Linux, from partitioning to filesystem creation
and mounting.
Disk management in Linux involves preparing a storage device (HDD, SSD) for use by the system. This
includes partitioning the disk, creating lesystems, and mounting them for access.
10

fi
fi
fi
fi
1. Introduction to Filesystems
A filesystem is a method for storing and organizing files on a storage device. It determines how data is stored,
retrieved, and managed.
11

6. Differentiate between virtual memory, physical memory, and swap space in Linux. How does swap
space function in Linux ?
7. Explain the Linux process management system in detail with Process Lifecycle, Process Scheduling,
Process Creation, Interprocess Communication (IPC) and Process Termination.
12

Module 2
1. What is the purpose of partitioning a disk in a Linux system?
A) To create separate logical drives for managing data
B) To format the disk with a lesystem
C) To install multiple operating systems
D) To speed up disk access
Solution:
A) To create separate logical drives for managing data
Partitioning a disk divides it into multiple sections, making it easier to organize data, manage different lesystems, and
install multiple operating systems if necessary.
13

fi
fi
fi
fi
fl
fi
fl
fl
fi
fi
fi
fi
5. What is a major bene t of using Logical Volume Manager (LVM) over traditional disk
partitions?
A) Better compatibility with Windows systems
B) Flexible resizing of volumes without data loss
C) Improved disk security
D) Faster disk performance
Solution:
B) Flexible resizing of volumes without data loss
LVM allows volumes to be resized dynamically without data loss, unlike traditional partitions, which are xed in size
once created.
6. What happens when a disk is partitioned into multiple logical volumes using LVM?
A) The disk is divided into partitions that cannot be resized.
B) The disk is partitioned but cannot be accessed by the system.
C) Logical volumes can span across multiple physical disks and can be resized.
D) Logical volumes become inaccessible to the user.
Solution:
C) Logical volumes can span across multiple physical disks and can be resized.
With LVM, logical volumes can span across multiple physical disks, and they can be resized dynamically as needed.
9. Which of the following commands can be used to create a swap partition in Linux?
A) dd
B) mkswap
C) mount
D) fsck
Solution:
B) mkswap
The mkswap command is used to set up a swap partition, which can then be activated using the swapon command.
14

fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
10. What is the main advantage of using a swap le instead of a dedicated swap partition
in Linux?
A) Swap les are faster to use than swap partitions.
B) Swap les can be easily resized without needing to repartition the disk.
C) Swap les are less prone to system failure.
D) Swap les can be used on any lesystem.
Solution:
B) Swap les can be easily resized without needing to repartition the disk.
Unlike dedicated swap partitions, swap les can be resized more easily and do not require changes to disk partitions,
making them more exible.
11. In a traditional lesystem, how are les and directories organized on the disk?
A) Files are stored in a at structure with no hierarchy.
B) Files are stored in a hierarchical directory structure.
C) Files are scattered randomly across the disk.
D) Files are only stored in the root directory.
Solution:
B) Files are stored in a hierarchical directory structure.
Traditional lesystems use a hierarchical directory structure where les are organized in directories and subdirectories.
12. When you use LVM, what does the "Physical Volume" (PV) refer to?
A) A single partition on a physical disk used by LVM.
B) A logical volume that stores actual data.
C) The system partition that contains the bootloader.
D) A backup of the logical volume.
Solution:
A) A single partition on a physical disk used by LVM.
In LVM, a Physical Volume (PV) is a partition or entire disk used as a basis for creating logical volumes.
13. What command would you use to display the disk partitions in a Linux system?
A) df
B) fdisk -l
C) lsblk
D) mount
Solution:
B) fdisk -l
The fdisk -l command lists all the partitions on the system.
15

fi
fi
fi
fi
fi
fi
fi
fi
fl
fl
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
A) It displays a list of mounted lesystems.
B) It installs software packages.
C) It attaches a disk or partition to the lesystem at a speci ed mount point.
D) It compresses les into a tarball.
Solution:
C) It attaches a disk or partition to the lesystem at a speci ed mount point.
The mount command is used to attach (mount) a disk partition or device to a directory (mount point), allowing its
contents to be accessed by the system.
Module 3
1. Which of the following is the rst step in the Linux boot process?
A) Kernel initialization
B) Boot loader loads the kernel
C) BIOS/UEFI runs the POST (Power-On Self-Test)
D) Mounting the root lesystem
Solution:
C) BIOS/UEFI runs the POST (Power-On Self-Test)
The boot process starts when the BIOS (Basic Input/Output System) or UEFI (Uni ed Extensible Firmware Interface)
runs the POST to check hardware components before the system can proceed to load the boot loader.
2. What does GRUB stand for in the context of Linux boot loaders?
A) General Resource for Unifying Boot
B) Grand Uni ed Bootloader
C) Graphical User Resource for Booting
D) General User Bootloader
Solution:
B) Grand Uni ed Bootloader
GRUB is the most common boot loader used in Linux systems, providing a menu to select different operating systems or
kernel versions during boot.
16

fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
5. What is "chainloading" in the context of boot loaders?
A) Loading multiple operating systems sequentially
B) Loading the boot loader on a separate disk
C) Booting from a network-based operating system
D) Loading the operating system kernel from an external device
Solution:
A) Loading multiple operating systems sequentially
Chainloading refers to a boot process where one boot loader loads another, often used to boot into a different operating
system from the same boot menu.
6. Which of the following is typically stored in the /boot directory of a Linux system?
A) Kernel, initial RAM disk (initrd), and bootloader con guration les
B) User applications and binaries
C) Log les and system messages
D) Device drivers and rmware les
Solution:
A) Kernel, initial RAM disk (initrd), and bootloader con guration les
The /boot directory contains essential les needed for booting, including the kernel, initrd (initial RAM disk), and
bootloader con guration les like GRUB's grub.cfg.
7. In Linux, which le typically contains kernel parameters passed by the boot loader
during startup?
A) /etc/fstab
B) /boot/grub/grub.cfg
C) /etc/hostname
D) /proc/cmdline
Solution:
B) /boot/grub/grub.cfg
The grub.cfg le in the /boot/grub/ directory contains the con guration for GRUB and includes kernel parameters
passed to the kernel during boot.
8. Which of the following is a typical parameter that can be passed to the Linux kernel
during boot?
A) init=/bin/bash
B) root=/dev/sda1
C) quiet
D) All of the above
Solution:
D) All of the above
Common kernel parameters include init=/bin/bash to boot directly into a shell, root=/dev/sda1 to specify the root
lesystem, and quiet to suppress unnecessary boot messages.
9. What is the signi cance of the init process during the Linux boot process?
A) It initializes hardware devices.
B) It loads the kernel from the bootloader.
C) It is the rst user-space program to run after the kernel is loaded.
D) It manages system calls between user space and kernel space.
Solution:
C) It is the rst user-space program to run after the kernel is loaded.
17
fi

fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
The init process is the rst process to be executed by the kernel after startup. It is responsible for initializing the user
space environment and starting other services.
10. Which of the following boot loaders is most commonly used in Linux systems?
A) LILO
B) GRUB
C) PXE
D) UEFI
Solution:
B) GRUB
GRUB (Grand Uni ed Bootloader) is the most commonly used bootloader in modern Linux systems. It supports multiple
operating systems and kernel con gurations.
11. What is the role of the kernel in the boot process after it is loaded by the boot loader?
A) It initializes the hardware and mounts the root lesystem.
B) It displays the boot loader menu.
C) It handles user authentication.
D) It performs the Power-On Self-Test (POST).
Solution:
A) It initializes the hardware and mounts the root lesystem.
After the kernel is loaded by the bootloader, it takes control of hardware initialization, sets up memory, and mounts the
root lesystem.
12. What is one of the advantages of using GRUB as a boot loader in Linux?
A) It automatically detects and repairs disk errors during boot.
B) It provides a graphical user interface for selecting the operating system.
C) It supports booting from encrypted volumes.
D) It is only compatible with Linux operating systems.
Solution:
B) It provides a graphical user interface for selecting the operating system.
GRUB offers a user-friendly interface that allows you to select between different operating systems or kernel versions,
making it easy to con gure multi-boot systems.
14. How does GRUB handle multi-boot systems with different operating systems?
A) It only boots the default operating system.
B) It allows users to select the operating system to boot from a menu.
C) It automatically installs all operating systems on the same partition.
D) It hides the selection menu and boots the rst installed OS.
18

fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
Solution:
B) It allows users to select the operating system to boot from a menu.
GRUB provides a boot menu where users can choose between different operating systems or kernel versions.
Module 4
1. What is the purpose of system logging in Linux?
A) To track user activities and system performance
B) To monitor network activity
C) To provide le access control
D) To optimize disk performance
Solution:
A) To track user activities and system performance
System logging allows administrators to monitor system activities, track errors, and identify security events by storing log
data.
3. Which of the following les in the /etc directory contains con guration settings for
system authentication?
A) /etc/passwd
B) /etc/fstab
C) /etc/login.defs
D) /etc/sysctl.conf
Solution:
C) /etc/login.defs
The /etc/login.defs le contains con guration settings for user authentication, password policies, and other login-
related settings.
19

fi
fi
fi
fi
fi
fi
C) It manages system logging.
D) It sets the system time and time zone.
Solution:
A) It handles user login requests on terminal devices.
The getty process is responsible for managing terminal login prompts, enabling users to authenticate and access the
system via text-based interfaces.
5. Which command would you use to set the system time in Linux?
A) date
B) time
C) clock
D) settime
Solution:
A) date
The date command is used to set or display the current system time and date in Linux.
7. Which command would you use to schedule a one-time task to run at a speci c time in
the future?
A) cron
B) at
C) timer
D) schedule
Solution:
B) at
The at command allows users to schedule tasks to run only once at a speci c time in the future.
9. Can regular users create and manage their own cron jobs in Linux?
A) No, only root can use cron.
B) Yes, but only for system-level tasks.
20

fi
fi
fi
fi
fi
fi
C) Yes, regular users can create and manage their own cron jobs.
D) No, cron is disabled for regular users by default.
Solution:
C) Yes, regular users can create and manage their own cron jobs.
Regular users can create their own cron jobs for scheduling personal tasks, but they cannot modify system-wide cron
jobs.
10. In Linux, which directory contains the system-wide cron jobs for all users?
A) /etc/cron.d
B) /etc/cron.daily
C) /etc/cron.d/cronjobs
D) /usr/cron
Solution:
A) /etc/cron.d
The /etc/cron.d directory is where system-wide cron jobs are stored, allowing administrators to set tasks that affect
the entire system.
14. Which le controls the system-wide con guration of the cron daemon?
A) /etc/crontab
B) /etc/cron.d/crontab
21

fl
fi
fi
fi
fi
fi
fi
fi
fi
C) /etc/cron.conf
D) /etc/cron.allow
Solution:
A) /etc/crontab
The /etc/crontab le contains system-wide cron job con gurations, and it allows the speci cation of environment
variables as well as scheduled tasks.
15. Which of the following is a correct command to view the current cron jobs for the
current user?
A) crontab -v
B) crontab -l
C) crontab -a
D) crontab -c
Solution:
B) crontab -l
The crontab -l command lists the current user's cron jobs, showing all tasks that are scheduled to run.
Module 5
1. What is a network packet?
A. A type of rewall
B. A piece of data sent over a network
C. A physical cable connection
D. A network protocol
✅ Answer: B. A piece of data sent over a network
3. True or False: The default gateway is used when the destination IP is outside the local network.
✅ Answer: True
4. What command can be used to display the kernel routing table in Linux?
A. netstat -r
B. route
C. ip route
D. All of the above
✅ Answer: D. All of the above
22

fi
fi
fi
fi
6. Which protocol is used for resolving domain names to IP addresses?
A. ICMP
B. ARP
C. DNS
D. HTTP
✅ Answer: C. DNS
10. Which transport layer protocol is best suited for streaming video?
A. TCP
B. UDP
C. ICMP
D. FTP
✅ Answer: B. UDP
17. True or False: Manual configuration of network interfaces is prone to human error.
✅ Answer: True
Page 20 of 20
25