0% found this document useful (0 votes)
3 views25 pages

Linux Administration: 2 Marks

The document covers various aspects of Linux administration, including levels of abstraction, process and memory management, file permissions, and command usage. It discusses the importance of superuser commands, the Linux directory hierarchy, and partitioning schemes like MBR and GPT. Additionally, it highlights filesystem types, archiving methods, and the role of Logical Volume Manager (LVM) in disk management.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views25 pages

Linux Administration: 2 Marks

The document covers various aspects of Linux administration, including levels of abstraction, process and memory management, file permissions, and command usage. It discusses the importance of superuser commands, the Linux directory hierarchy, and partitioning schemes like MBR and GPT. Additionally, it highlights filesystem types, archiving methods, and the role of Logical Volume Manager (LVM) in disk management.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 25

LINUX ADMINISTRATION

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).

• sudo useradd newuser creates a new user account.

• sudo rm -rf /var/log/old_logs deletes a system log directory.

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.

Permissions are represented symbolically and numerically:

• Symbolic: -rwxr-xr--

• Numeric: 754 (where 7 = rwx, 5 = r-x, 4 = r--)

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.

• chmod u+x script.sh adds execute permission to the user.

Proper permissions prevent unauthorized access and help maintain system security.

3. Summarize intermediate commands in Linux with examples.

Intermediate Linux commands are those commonly used in daily system navigation and le management,
beyond basic ls and cd. Some useful ones include:

• grep: Searches for a pattern in les.


Example: grep "error" logfile.txt

• find: Locates les by name, type, or date.


Example: find /home -name "*.pdf"

• cut: Extracts speci c columns from text.


Example: cut -d ',' -f1 names.csv

• awk: Pattern scanning and processing tool.


Example: awk '{print $1}' file.txt prints the rst column.

• sort: Sorts lines in a text le.


Example: sort file.txt

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.

4. Explain the Partitioning scheme of Disk Devices with an example.

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.

For example, in a typical Linux setup:

• /dev/sda1 → Boot partition (/boot)

• /dev/sda2 → Root partition (/)

• /dev/sda3 → Swap space

• /dev/sda4 → Extended partition containing /home as a logical drive

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.

5. Discuss le system and hierarchy in Linux administration.

The Linux lesystem follows a hierarchical structure, with everything starting from the root directory /.
Subdirectories under / serve speci c purposes:

• /bin: Essential binaries (e.g., ls, cp)

• /etc: Con guration les

• /home: User directories

• /var: Variable data (logs, spool les)

• /usr: User-installed applications and libraries

• /root: Home directory of the superuser

• /dev: Device les

• /proc and /sys: Virtual lesystems exposing kernel data

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.

Linux is structured in multiple layers of abstraction for modularity and clarity:

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.

7. How will you run Superuser command? Give two examples.

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:

1. sudo apt install nginx – Installs the Nginx web server.

2. sudo systemctl restart sshd – Restarts the SSH service.

These commands need elevated privileges as they affect the system con guration and services. Using sudo
provides accountability by logging the command execution.

8. What do you understand by user and user space?

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 and GPT are partitioning schemes used on disks:

• 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.

10. What are the advantages of GPT over MBR?

• 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.

• EXT4 (Fourth Extended Filesystem):

◦ Stable and widely used, default in many Linux distros.

◦ Supports journaling, large le sizes, and fast performance.

◦ Lacks advanced features like snapshots or compression.

• XFS:

◦ High-performance journaling lesystem suited for large les.

◦ Excellent scalability and parallel I/O performance.

◦ 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.

◦ Supports checksumming and copy-on-write (COW).

◦ 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.

• tar: Archives multiple les into a single le.

◦ tar -cvf archive.tar file1 file2 → Creates an archive

◦ tar -xvf archive.tar → Extracts les

• gzip: Compresses a single le.

◦ gzip file.txt → Compresses to file.txt.gz

◦ gunzip file.txt.gz → Decompresses

• zip: Archives and compresses les together.

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

◦ unzip archive.zip → Extracts les

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.

How System Calls Work (User-Kernel Communication):

1. User Space → Kernel Space Transition:


A user program requests a service (e.g., open a le) using a system call. This triggers a software
interrupt (often int 0x80 or syscall) to switch from user mode to kernel mode.

2. System Call Interface (SCI):


The system call is matched with a corresponding kernel function by the System Call Interface, which
acts as a gatekeeper.

3. Kernel Execution:
The requested service is executed in kernel space with elevated privileges.

4. Return to User Space:


After execution, the result (like a le descriptor or error code) is returned to the user program, and the
mode switches back to user space.

✅ Importance of System Calls:

•Provide security by isolating kernel operations.

•Ensure controlled access to hardware and resources.

•Enable multitasking, I/O operations, and memory management.

A python program calling open():


import os
fd = os.open("file.txt", os.O_RDONLY)

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.

Disk partitioning is the process of dividing a storage


device (HDD or SSD) into separate sections called
partitions. Each partition acts like an independent disk
and can be formatted and mounted separately.

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.

2. Which of the following is not a common lesystem used in Linux?


A) ext4
B) NTFS
C) XFS
D) Btrfs
Solution:
B) NTFS
NTFS is a lesystem typically used by Windows. Common Linux lesystems include ext4, XFS, and Btrfs.

3. What is the function of swap space in a Linux system?


A) To store application data temporarily when RAM is full
B) To manage the le system permissions
C) To create partitions on the disk
D) To store user les that are not frequently accessed
Solution:
A) To store application data temporarily when RAM is full
Swap space is used when the system's physical memory (RAM) is full. It temporarily holds data that doesn't t in RAM,
allowing the system to continue operating.

4. What is the role of the Logical Volume Manager (LVM) in Linux?


A) To improve disk performance by caching data
B) To manage disk partitions dynamically and exibly
C) To automatically format disks with a lesystem
D) To control access to devices and peripherals
Solution:
B) To manage disk partitions dynamically and exibly
LVM allows administrators to create, resize, and delete logical volumes dynamically without worrying about physical
disk partitions, offering better exibility in managing disk space.

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.

7. What is the "mount point" in a Linux lesystem?


A) The directory where a le is stored
B) The directory where a device or partition is attached to the lesystem
C) The root directory of a lesystem
D) The location where the bootloader is stored
Solution:
B) The directory where a device or partition is attached to the lesystem
A mount point is a directory in the lesystem where a disk partition or device is attached, making its contents accessible
to the system.

8. What is the bene t of using the "ext4" lesystem in Linux?


A) It provides better compatibility with non-Linux operating systems.
B) It supports journaling for data integrity and fast recovery.
C) It can only be used with SSDs.
D) It does not support le permissions or security features.
Solution:
B) It supports journaling for data integrity and fast recovery.
Ext4 is a journaling lesystem, meaning it keeps a log of changes before they are made, which helps prevent data
corruption and allows for quicker recovery in case of a failure.

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.

14. In a traditional lesystem, what is the role of the inode?


A) It stores the le's actual data.
B) It keeps track of the le’s metadata (e.g., owner, permissions, size).
C) It is used for swapping data between RAM and disk.
D) It manages directory structures and lenames.
Solution:
B) It keeps track of the le’s metadata (e.g., owner, permissions, size).
An inode stores metadata about a le, such as its size, permissions, owner, and location of the data blocks, but it does not
store the actual le data.

15. What does the "mount" command do in Linux?

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.

3. What is the primary role of a boot loader in the Linux system?


A) To manage le system permissions
B) To load and transfer control to the kernel during system startup
C) To manage system calls and interactions with the kernel
D) To initialize user space programs
Solution:
B) To load and transfer control to the kernel during system startup
The boot loader's role is to load the kernel into memory and transfer control to it to begin the operating system startup
process.

4. What is a common issue that occurs with UEFI Secure Boot?


A) It prevents Linux from booting unless it is signed with an approved certi cate.
B) It speeds up the boot process signi cantly.
C) It causes compatibility issues with legacy BIOS-based systems.
D) It automatically detects and xes le system errors during boot.
Solution:
A) It prevents Linux from booting unless it is signed with an approved certi cate.
UEFI Secure Boot is a security feature that requires all bootloaders and kernels to be signed with a trusted certi cate. This
can cause issues with Linux distributions that do not have signed bootloaders.

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.

13. What does the GRUB_CMDLINE_LINUX parameter in the /etc/default/grub le specify?


A) The commands for starting a graphical user interface.
B) The kernel parameters passed to the Linux kernel.
C) The disk partitions used for booting.
D) The name of the default boot image.
Solution:
B) The kernel parameters passed to the Linux kernel.
The GRUB_CMDLINE_LINUX variable in the grub con guration le is used to specify kernel parameters that will be
passed to the kernel during boot.

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.

15. Which of the following is true about UEFI Secure Boot?


A) It can only be used with Windows operating systems.
B) It prevents unauthorized bootloaders and operating systems from booting.
C) It is a legacy feature and no longer used in modern systems.
D) It allows unsigned kernels and bootloaders to be executed.
Solution:
B) It prevents unauthorized bootloaders and operating systems from booting.
UEFI Secure Boot ensures that only trusted and signed bootloaders can load, preventing unauthorized or malicious code
from running at boot time.

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.

2. Where is the system log data typically stored in a Linux system?


A) /var/log
B) /etc/log
C) /home/log
D) /root/log
Solution:
A) /var/log
Log les are generally stored in the /var/log directory, including logs for system events, applications, and security.

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.

4. What is the role of the getty process in Linux?


A) It handles user login requests on terminal devices.
B) It schedules recurring tasks for users.

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.

6. What is the primary purpose of cron in Linux?


A) To schedule recurring tasks at speci ed intervals.
B) To monitor system performance and log errors.
C) To check and x disk errors.
D) To execute tasks only once at boot time.
Solution:
A) To schedule recurring tasks at speci ed intervals.
The cron daemon allows users to schedule tasks that run periodically, such as daily backups or system maintenance
scripts.

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.

8. What is a key difference between cron and at in Linux scheduling?


A) cron is used for one-time tasks, while at is used for recurring tasks.
B) cron is used for recurring tasks, while at is used for one-time tasks.
C) Both cron and at are used for one-time tasks.
D) Both cron and at are used for recurring tasks.
Solution:
B) cron is used for recurring tasks, while at is used for one-time tasks.
cron schedules tasks to run at regular intervals (e.g., every day, week), while at schedules tasks to run once at a speci c
time.

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.

11. What is the function of Timer Units in systemd?


A) To set up scheduled tasks similar to cron.
B) To provide a graphical user interface for scheduling tasks.
C) To monitor and report system errors.
D) To manage disk partitions and le systems.
Solution:
A) To set up scheduled tasks similar to cron.
systemd Timer Units are used for scheduling tasks in Linux systems, providing functionality similar to cron but with
more integration into the systemd service manager.

12. Where are user-speci c cron jobs typically stored?


A) /etc/crontab
B) /var/spool/cron/crontabs
C) /home/username/.cron
D) /etc/cron.d
Solution:
B) /var/spool/cron/crontabs
User-speci c cron jobs are stored in the /var/spool/cron/crontabs directory, with each user having their own le.

13. What is the function of Pluggable Authentication Modules (PAM) in Linux?


A) To provide a framework for integrating different authentication methods into system services.
B) To manage disk partitions and lesystems.
C) To schedule recurring tasks in Linux.
D) To manage system logging and auditing.
Solution:
A) To provide a framework for integrating different authentication methods into system services.
PAM allows system administrators to con gure authentication methods for various services, such as login, sudo, and ssh,
providing exibility and security.

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

2. Which layer of the OSI model is responsible for routing packets?


A. Application Layer
B. Transport Layer
C. Internet Layer
D. Physical Layer
✅ Answer: C. Internet Layer

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

5. Which of the following is a valid IPv6 address?


A. 192.168.1.1
B. FE80::1
C. 127.0.0.1
D. 255.255.255.0
✅ Answer: B. FE80::1

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

7. Which command is used to test basic ICMP connectivity?


A. dig
B. nslookup
C. ping
D. ftp
✅ Answer: C. ping

8. What does localhost usually resolve to in IPv4?


A. 0.0.0.0
B. 255.255.255.0
C. 127.0.0.1
D. 192.168.1.1
✅ Answer: C. 127.0.0.1

9. True or False: TCP is a connectionless protocol.


✅ Answer: False (TCP is connection-oriented)

10. Which transport layer protocol is best suited for streaming video?
A. TCP
B. UDP
C. ICMP
D. FTP
✅ Answer: B. UDP

11. What is the role of a kernel network interface?


✅ Answer: It acts as a software representation of a physical or virtual network device and allows communication
between the OS and network hardware.

12. Which tool is used for querying DNS information?


A. traceroute
B. netstat
C. dig
D. ping
✅ Answer: C. dig

13. What does Ethernet primarily define?


A. IP addressing rules
B. Cabling standards and data link layer frame formats
C. Web protocols
23

D. Transport protocols
✅ Answer: B. Cabling standards and data link layer frame formats

14. What is the function of the ARP protocol?


✅ Answer: ARP (Address Resolution Protocol) maps IP addresses to MAC addresses.

15. What does a boot-activated network configuration typically involve?


✅ Answer: Automatically bringing up a network interface with prede ned settings when the system boots.

16. Which of these is a Network Configuration Manager?


A. DHCP
B. NetworkManager
C. Wireshark
D. iperf
✅ Answer: B. NetworkManager

17. True or False: Manual configuration of network interfaces is prone to human error.
✅ Answer: True

18. Which kernel command displays all available network interfaces?


A. ifconfig -a
B. ip a
C. nmcli dev status
D. All of the above
✅ Answer: D. All of the above

19. What port does DNS use for queries?


A. 53
B. 80
C. 21
D. 443
✅ Answer: A. 53

20. What is a key problem with manual network configuration?


✅ Answer: It lacks automation, may not persist across reboots, and is error-prone.

Page 20 of 20

Module -2 [12 hours]


DISKS AND FILESYSTEMS
Partitioning Disk Devices, Filesystems, Swap Space, The Logical Volume Manager, LookingForward: Disks
and User Space, Inside a Traditional Filesystem.
Module -3 [12 hours]
HOW THE LINUX KERNEL BOOTS?
24

fi
Startup Messages, Kernel Initialization and Boot Options, Kernel Parameters, Boot Loaders,
GRUB Introduction, UEFI Secure Boot Problems, Chainloading Other Operating Systems,
Boot Loader Details.
Module -4 [12 hours]
SYSTEM CONFIGURATION:
LOGGING, SYSTEM TIME, BATCH JOBS, AND USERS
System Logging, The Structure of /etc, getty and login, Setting the Time, Scheduling
Recurring Tasks with cron and Timer Units, Scheduling One-Time Tasks with at, Timer
Units Running as Regular Users, User Access Topics, Pluggable Authentication Modules.
Module 5: [12 hours]
UNDERSTANDING YOUR NETWORK AND ITS CONFIGURATION
Network Basics, Packets, Network Layers, The Internet Layer, Routes and the Kernel
Routing Table, The Default Gateway, IPv6 Addresses and Networks, Basic ICMP and DNS
Tools, The Physical Layer and Ethernet, Understanding Kernel Network Interfaces,
Introduction to Network Interface Configuration, Boot-Activated Network Configuration,
Problems with Manual and Boot-Activated Network Configuration, Network Configuration
Managers, Resolving Hostnames, Localhost, The Transport Layer: TCP, UDP, and Services.

25

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy