DevOps Job Ready Program

Learn • Practice • Get Hired

Linux Installation & Configuration

Introduction

Linux is a powerful, open-source operating system widely used for servers, cloud computing, DevOps, cybersecurity, and enterprise applications. Installing and configuring Linux correctly is the first step toward building a secure, stable, and efficient computing environment. Popular Linux distributions include Ubuntu, CentOS Stream, Rocky Linux, Debian, Fedora, and Red Hat Enterprise Linux (RHEL), each designed for different use cases.

System Requirements & Boot Media

Before installation, it is important to verify the system requirements, such as CPU, RAM, storage, and network connectivity. The Linux installation media is usually downloaded as an ISO image from the official distribution website and written to a USB flash drive using tools such as Rufus, Balena Etcher, or the dd command. The system BIOS/UEFI is then configured to boot from the USB drive. During installation, users choose the installation language, keyboard layout, timezone, and disk partitioning method. Linux supports both automatic and manual partitioning. A typical installation includes the root (/) partition, swap partition, and optionally a separate /home partition to store user data independently from the operating system. Filesystems such as Ext4, XFS, and Btrfs are commonly used depending on the distribution and requirements.

Partitioning & Filesystems

Standard setup includes root (/), swap, and /home partitions. Common filesystems include Ext4, XFS, and Btrfs.

User Management & Sudo Privileges

The installer prompts for the creation of the root password and one or more user accounts. It is recommended to use strong passwords and grant administrative privileges through the sudo group instead of logging in directly as the root user. Once the installation is complete, the system reboots into the newly installed Linux operating system. After installation, initial system configuration is performed to ensure security, stability, and optimal performance. The first step is updating all installed packages using the system's package manager. Debian-based systems use apt, while Red Hat-based systems use dnf or yum. Keeping the system updated protects it from security vulnerabilities and software bugs. Network configuration is another essential task. Linux supports both static and dynamic IP address configuration. Administrators verify connectivity using commands such as ip, ping, and hostnamectl. Proper hostname configuration and DNS settings ensure reliable communication with other systems and services. User and group management is configured to control access to system resources. New users can be created, passwords assigned, and permissions managed using Linux commands. File and directory permissions are configured using ownership and permission settings to provide secure access control.

Post-Installation Configuration

  • Update packages using apt or dnf.
  • Configure hostname and static/dynamic IP settings.
  • Enable SSH for remote access.

Services & Firewall Management

System services are managed using systemd, allowing administrators to start, stop, restart, enable, or disable services during system startup. Time synchronization using NTP, log management, and automated updates further improve system reliability and maintainability. In conclusion, proper Linux installation and configuration provide a secure, reliable, and scalable platform for personal computers, enterprise servers, cloud infrastructure, and DevOps environments. A well-configured Linux system delivers high performance, strong security, and long-term stability, making it one of the most trusted operating systems in modern information technology.

Linux File System Management

Introduction

File System Management is one of the most important responsibilities of a Linux system administrator. A file system is the method used to organize, store, retrieve, and manage data. Linux uses a hierarchical directory structure where every file begins from the root directory (/).

Common file system types include Ext4 (widely used for performance), XFS (scalability for enterprise servers), and Btrfs (advanced features like snapshots and compression).

Linux Directory Structure

Linux organizes data into specific directories, each serving a purpose:

  • /home: Stores user files.
  • /etc: Contains system configuration files.
  • /var: Stores log files and application data.
  • /boot: Contains files required to boot the system.

Partitioning & Mounting

Storage devices are managed using tools like fdisk, gdisk, or parted. After creating a partition, it is formatted using mkfs utilities.

Partitions are accessed by "mounting" them to a directory using the mount command. For persistent storage, configurations are added to the /etc/fstab file.

File System Management is one of the most important responsibilities of a Linux system administrator. A file system is the method used by the operating system to organize, store, retrieve, and manage data on storage devices such as hard disks, SSDs, USB drives, and network storage. Linux uses a hierarchical directory structure where every file and directory begins from the root directory (/). Linux supports several file system types, including Ext4, XFS, Btrfs, ZFS, FAT32, NTFS, and NFS. Among these, Ext4 is the most widely used file system because it provides high performance, reliability, journaling, and support for large storage volumes. XFS is commonly used for enterprise servers due to its excellent scalability, while Btrfs offers advanced features such as snapshots, compression, and built-in data integrity.

Monitoring & Maintenance

Monitoring disk usage is critical to maintaining system performance. Commands such as df -h display available disk space, while du -sh shows the size of directories and files. Administrators regularly monitor storage utilization to prevent disks from becoming full, which can affect application performance and system stability. File system maintenance includes checking and repairing corrupted file systems using utilities such as fsck. Before running a repair, the affected file system should be unmounted to prevent data corruption. Regular backups should also be performed before making significant changes to storage configurations.

Administrators must monitor disk usage to maintain stability:

  • df -h: Check available disk space.
  • du -sh: Check the size of specific directories.
  • fsck: Used to check and repair corrupted file systems.

Advanced Features: LVM & RAID

Logical Volume Management (LVM) allows administrators to resize storage volumes dynamically without reinstalling the OS. RAID implementations are used to improve storage performance and provide fault tolerance. In conclusion, Linux File System Management is essential for maintaining data integrity, system performance, and storage reliability. By properly managing partitions, file systems, disk space, permissions, mounting, and maintenance tasks, administrators can ensure that Linux systems remain secure, efficient, and capable of supporting enterprise workloads and cloud-based applications.

User & Group Administration Overview

Introduction

Linux is a multi-user operating system. Each user has a unique UID, a home directory, and a default shell. The root user holds administrative power, but it is best practice to use the sudo command for daily tasks to maintain system integrity.

Groups allow you to bundle users together to assign permissions in bulk, rather than configuring each user individually. User and Group Administration is a fundamental aspect of Linux system management that ensures secure access to system resources and efficient management of multiple users. Linux is a multi-user operating system, allowing several users to work on the same system simultaneously while maintaining separate accounts, permissions, and personal environments. A user account represents an individual who can log in to the system and access resources based on assigned permissions. Every user has a unique User ID (UID), a username, a home directory (typically located in /home), and a default login shell such as Bash. The root user is the system administrator with unrestricted access to all files, directories, and system settings. For security reasons, routine administrative tasks are typically performed using the sudo command rather than logging in directly as the root user.

Management Commands

Key tools for managing users and groups:

  • Users: useradd (create), usermod (modify), userdel (delete), passwd (set password).
  • Groups: groupadd, groupmod, groupdel.
  • Assignment: Use usermod -aG [group] [user] to add a user to a supplementary group.

System Configuration Files

Linux stores authentication and account data in these core files:

  • /etc/passwd: Contains user account details.
  • /etc/shadow: Stores encrypted passwords securely.
  • /etc/group: Maintains group information.
  • /etc/gshadow: Stores secure group password data.

Security & Policies

Maintaining security involves enforcing strong password policies, locking inactive accounts, and following the Principle of Least Privilege. Administrators can also set disk quotas to prevent users from consuming excessive system resources. In conclusion, Linux User and Group Administration is essential for maintaining a secure, organized, and manageable operating system. Proper management of user accounts, groups, authentication, permissions, and security policies ensures that users have appropriate access while protecting system resources from unauthorized use. Effective user administration is a key responsibility of Linux system administrators in enterprise, cloud, and DevOps environments.

Package Management

Introduction

Package management is a core function that allows administrators to install, update, and remove software efficiently. A package manager automates software installation by downloading packages from trusted repositories and resolving dependencies automatically. Package management is a core function of Linux system administration that enables users and administrators to install, update, upgrade, configure, and remove software efficiently. A package manager automates software installation by downloading packages from trusted repositories, resolving dependencies, verifying package integrity, and keeping applications up to date. Using package managers ensures that software is installed securely and consistently across Linux systems. Linux distributions use different package formats and package management tools. APT (Advanced Package Tool) is the package manager used by Debian-based distributions such as Ubuntu and Debian. YUM (Yellowdog Updater Modified) is the traditional package manager for Red Hat Enterprise Linux (RHEL) and CentOS. DNF (Dandified YUM) is the modern replacement for YUM and is used by current versions of Fedora, RHEL, AlmaLinux, Rocky Linux, and CentOS Stream. All three tools simplify software management while automatically handling package dependencies.

APT (Debian-based Systems)

APT is used by Ubuntu, Debian, and Kali Linux. It uses .deb packages. APT works with DEB packages stored in online repositories. Before installing software, administrators typically update the package index using apt update to retrieve the latest package information. New software can then be installed using apt install, upgraded using apt upgrade, removed using apt remove, and unnecessary packages cleaned up using apt autoremove. APT is known for its speed, reliability, and extensive software repositories.

  • apt update: Refresh package index.
  • apt install [package]: Install new software.
  • apt upgrade: Upgrade installed packages.
  • apt remove [package]: Remove software.

YUM & DNF (Red Hat-based Systems)

YUM manages RPM (Red Hat Package Manager) packages and has been widely used in Red Hat-based distributions. It allows administrators to install packages using yum install, update software with yum update, search repositories using yum search, and remove software using yum remove. YUM automatically resolves package dependencies and can also manage package groups, making it suitable for enterprise server environments. DNF is the next-generation package manager that replaces YUM while maintaining similar command syntax. It offers faster dependency resolution, improved performance, reduced memory usage, and enhanced security. Common commands include dnf install, dnf update, dnf remove, dnf search, and dnf info. Since DNF is largely compatible with YUM, administrators familiar with YUM can easily transition to DNF.

Used by RHEL, CentOS, Fedora, and Rocky Linux. These systems use .rpm packages.

  • YUM: The traditional tool for dependency resolution and package grouping.
  • DNF: The modern replacement for YUM. It is faster, uses less memory, and is backward compatible with YUM syntax.
  • Common Commands: dnf install, dnf update, dnf search, and dnf remove.

Automation & Security

Regularly updating software is critical for patching security vulnerabilities. In enterprise environments, administrators use automation tools like Ansible, Puppet, or Chef to manage package installations across hundreds of servers simultaneously, ensuring consistent software versions and reducing configuration drift. Package managers also support software updates and security patches. Regularly updating installed packages protects systems from known vulnerabilities, improves performance, and introduces new features. Automated update mechanisms can be configured for servers that require consistent security maintenance while minimizing manual administration. In enterprise environments, package management plays a vital role in maintaining system consistency across multiple servers. Administrators often use configuration management tools such as Ansible, Puppet, or Chef to automate package installation and updates on hundreds of systems simultaneously. This approach ensures standardized software versions, reduces configuration drift, and simplifies system maintenance.

In conclusion, Linux package management using APT, YUM, and DNF provides an efficient and secure method for managing software throughout its lifecycle. By automating installation, updates, dependency resolution, and package removal, these tools simplify system administration, improve security, and ensure that Linux systems remain stable, reliable, and ready to support modern applications and enterprise workloads.

Secure Shell (SSH)

Introduction

SSH is a cryptographic protocol used to securely manage remote systems over unsecured networks. It encrypts all communications, including commands and file transfers, protecting against interception. By default, it operates on TCP port 22. Secure Shell (SSH) is a cryptographic network protocol used to securely access and manage remote Linux and Unix systems over an unsecured network. SSH encrypts all communication between the client and the server, protecting sensitive information such as usernames, passwords, commands, and transferred files from interception. It is one of the most widely used tools by system administrators, DevOps engineers, and cloud professionals for remote server administration. SSH operates on TCP port 22 by default and follows a client-server architecture. The SSH server runs on the remote machine, while the SSH client is used to initiate a secure connection. After authentication, users can execute commands, manage files, configure applications, and perform administrative tasks as if they were physically present at the server.

Authentication Methods

SSH supports two primary ways to verify identity:

  • Password Authentication: Simple, but vulnerable to brute-force attacks and password theft.
  • Public Key Authentication: The preferred, secure method. It uses cryptographic keys, eliminating the need to transmit passwords over the network.

How Key Authentication Works

This process uses a key pair (private and public keys):

  • Private Key: Stored securely on the client machine; must never be shared.
  • Public Key: Copied to the remote server and stored in ~/.ssh/authorized_keys.
  • Authentication: The server verifies that the client has the matching private key without actually seeing the key itself.

Keys are typically generated using ssh-keygen, with modern secure algorithms like Ed25519.

Server Configuration & Security

Proper SSH security practices include protecting private keys with strong passphrases, using an SSH agent to manage keys securely, regularly rotating keys, monitoring authentication logs, and restricting access using firewalls or IP-based access controls. Multi-factor authentication (MFA) can also be implemented for enhanced protection in enterprise environments.

  • Disabling root login.
  • Disabling password authentication once keys are configured.
  • Changing the default SSH port.
  • Protecting private keys with strong passphrases.
  • Using tools like SCP or SFTP for secure file transfers.

In conclusion, SSH and key-based authentication provide a secure, reliable, and efficient method for remote system administration. By replacing password-based logins with cryptographic key pairs and following security best practices, organizations can significantly reduce unauthorized access risks while enabling safe and convenient management of Linux servers, cloud infrastructure, and enterprise environments. The SSH daemon is configured via the /etc/ssh/sshd_config file. Key security best practices include:

Process Management

Introduction

A process is an instance of a running program. Every process has a unique PID (Process ID). The system starts with PID 1 (systemd), which manages all other processes. Every process has a parent (PPID), creating a parent-child hierarchy.

Process Types:

  • Foreground: Interactive, runs in the current terminal.
  • Background: Runs without blocking the terminal.
  • Daemons: System services (e.g., web servers) that run in the background.

Monitoring Processes

Use these tools to keep an eye on system resources:

  • ps aux: Detailed list of current processes.
  • top: Real-time view of system processes and resource usage.
  • htop: An interactive, user-friendly version of top.
  • free, uptime, vmstat: Tools to monitor memory, load, and CPU/system activity.

Process Control & Signals

Administrators use signals to interact with processes, typically via the kill command:

  • SIGTERM: Requests the process to shut down gracefully.
  • SIGKILL: Forces immediate termination of unresponsive processes.
  • pkill / killall: Terminate processes by name instead of PID.

Services are managed via systemctl (start, stop, restart).

Priority & Scheduling

Linux allows you to manage CPU scheduling priority:

  • Nice value: Defines process priority. A lower "nice" value means higher priority.
  • nice: Set priority when starting a process.
  • renice: Change priority of an already running process.
  • Task Scheduling: Use cron for recurring tasks (e.g., backups) and at for one-time jobs.

Linux Systemd Services

Introduction

Systemd is the modern framework for initializing and managing Linux systems. Running as PID 1, it replaces the legacy SysV init system by providing faster startup through parallel service management. It initializes the environment, mounts file systems, and manages system states.

Units & Types

Systemd organizes resources into "units." A unit file defines how a component is managed. Key unit types include:

  • .service: Manages background applications (e.g., Apache, MySQL).
  • .target: Defines system states (groups of units).
  • .socket: Handles inter-process communication.
  • .timer: Schedules tasks (similar to cron).

Service Control

The systemctl command is your primary tool for managing services:

  • start/stop [service]: Immediate control.
  • restart/reload [service]: Update or refresh service state.
  • enable/disable [service]: Configure automatic boot behavior.
  • status [service]: Check health, PID, and recent errors.

Logging with Journald

Systemd provides centralized, binary-format logging via journald. You interact with it using journalctl:

  • journalctl -u [service]: View logs for a specific service.
  • journalctl -xe: View detailed logs for troubleshooting system errors.

Custom services are created in /etc/systemd/system/, allowing you to manage non-standard applications as system services with auto-restart and dependency management capabilities.

Bash Scripting

Introduction

A Bash script is a text file containing sequential Linux commands. Every script should begin with the shebang line (#!/bin/bash), which tells the system to use the Bash interpreter.

Workflow:

  • Write in a text editor.
  • Assign permission: chmod +x script.sh
  • Execute: ./script.sh

Logic & Control Flow

Bash uses variables to store data (without needing explicit types) and conditional statements for decision-making.

  • Conditionals: if, elif, and else allow the script to perform actions only if specific criteria are met (e.g., checking if a file exists or a service is active).
  • Input: Scripts can accept user input via the read command or command-line arguments ($1, $2).

Loops & Automation

Loops are essential for handling repetitive tasks, such as managing batches of files or checking multiple servers.

  • for, while, until: These constructs allow you to repeat operations automatically, saving significant manual effort.
  • Functions: You can organize reusable blocks of code into functions to make your scripts cleaner, modular, and easier to debug.

Error Handling & Best Practices

Reliable scripts must handle failures gracefully:

  • Exit Status: Use the $? variable to check the success or failure of the last executed command.
  • Security: Always validate user input, avoid hardcoding sensitive passwords in plain text, and use strict file permissions.

Cron Jobs & Automation

Introduction

The crontab syntax is the heart of Linux automation. Mastering the five fields is essential for precise timing:

* * * * * command_to_execute
- - - - -
| | | | |
| | | | ----- Day of Week (0 - 7) (Sunday is 0 or 7)
| | | ------- Month (1 - 12)
| | --------- Day of Month (1 - 31)
| ----------- Hour (0 - 23)
------------- Minute (0 - 59)
        

Advanced Time Operators:

  • */15 * * * *: Runs every 15 minutes.
  • 0 9-17 * * 1-5: Runs hourly during business hours (9 AM to 5 PM) on weekdays.
  • 0 0 1 * *: Runs at midnight on the first day of every month.

System-Wide Automation Directories

Besides user-level crontabs, Linux provides dedicated directories for system maintenance tasks that run automatically:

  • /etc/cron.hourly/: Scripts here execute every 60 minutes.
  • /etc/cron.daily/: Scripts here execute once every 24 hours.
  • /etc/cron.weekly/: Scripts here execute once every 7 days.
  • /etc/cron.monthly/: Scripts here execute once every month.
  • /etc/crontab: The main system-wide configuration file where you can define tasks with specific user privileges.

Troubleshooting & Best Practices

To ensure your automation is reliable, follow these professional standards:

  • Environment Paths: Cron doesn't load your user shell profile. Always use absolute paths for commands (e.g., use /usr/bin/python3 instead of just python3).
  • Redirecting Output: By default, cron emails output to the local user. Redirect it to log files to debug: 0 2 * * * /backup.sh >> /var/log/backup.log 2>&1.
  • Permissions: Ensure the script is executable (chmod +x) and owned by the correct user.
  • Security: Restrict who can create cron jobs using /etc/cron.allow and /etc/cron.deny files.

Modern Alternatives: Systemd Timers

While Cron is the industry standard, Systemd Timers are increasingly preferred for modern environments because:

  • Logging: They integrate directly with journald for better debugging.
  • Dependencies: You can configure a timer to wait for another service to start first.
  • Precision: They support monotonic timers (e.g., "run 5 minutes after boot").

Linux Security Hardening

Introduction

Security hardening is not a one-time task but a continuous Defense-in-Depth strategy. Its goal is to minimize the "attack surface"—the sum of all points where an unauthorized user can try to enter data or extract data from an environment.

Core Principles:

  • Principle of Least Privilege (PoLP): Every module, user, and process must be able to access only the information and resources necessary for its legitimate purpose.
  • Attack Surface Reduction: If a service isn't needed, disable it. If a package isn't used, remove it.
  • Automated Patching: Use automated tools to ensure no security patch is missed, as unpatched systems are the primary targets for ransomware.

Advanced Access Control & Identity Management

Access management goes beyond just passwords; it's about verifying identity and restricting behavior:

  • Root Account Lockdown: Disable PermitRootLogin no in /etc/ssh/sshd_config.
  • Sudoers Configuration: Use /etc/sudoers to limit which commands a user can run with elevated privileges.
  • SSH Hardening: Enforce SSH Protocol 2, disable empty passwords, and limit login attempts using Fail2Ban to automatically block IPs that show malicious brute-force behavior.
  • Mandatory Access Control (MAC): Implement SELinux (Security-Enhanced Linux) or AppArmor. These act as an extra layer of kernel-level security that restricts what processes can do, even if they are running as root.

Network & Service Hardening

A hardened system is only as secure as its open ports. The network layer needs strict enforcement:

  • Firewall Best Practices: Move from default allow to a "Default Deny" policy. Explicitly open only the specific ports required for your applications (e.g., port 80/443 for web, 22 for SSH).
  • Kernel Hardening: Modify /etc/sysctl.conf to prevent IP spoofing, ignore ICMP broadcasts, and protect against SYN flood attacks.
  • Disable Unused Services: Regularly run systemctl list-unit-files --state=enabled to identify and disable unnecessary background services.

Continuous Monitoring & Auditing

Visibility is the key to incident response:

  • System Auditing: Use the auditd framework to track system calls, file access, and user activity. This creates a forensic trail if a breach occurs.
  • Log Management: Centralize your logs using rsyslog or send them to a dedicated log server (SIEM) to prevent an attacker from deleting local logs after compromising the system.
  • Vulnerability Scanning: Regularly perform scans using tools like Lynis to audit your system against security compliance benchmarks and receive actionable hardening recommendations.
  • Integrity Monitoring: Use AIDE (Advanced Intrusion Detection Environment) to check for unauthorized changes to system binary files.

Linux Log Management

Introduction

Linux logs provide the historical record needed for troubleshooting and security auditing. The directory /var/log is the central repository:

  • /var/log/syslog (Debian) / /var/log/messages (RHEL): General system activity.
  • /var/log/auth.log (Debian) / /var/log/secure (RHEL): Authentication and security events.
  • /var/log/kern.log: Kernel-level messages.
  • /var/log/cron: Execution history of scheduled tasks.
  • /var/log/apache2/ or /var/log/httpd/: Web server activity logs.

Advanced Log Analysis with Journalctl

Modern Linux distributions use systemd-journald for centralized, structured logging. The journalctl command allows for powerful filtering:

  • journalctl -u [service-name]: Isolates logs for a specific service.
  • journalctl -p err: Filters and displays only error-level messages.
  • journalctl --since "1 hour ago": Filters logs by a specific time range.

Log Rotation & Storage Optimization

Logs can grow rapidly, risking disk exhaustion. The logrotate utility automates the lifecycle of log files by:

  • Automatically compressing and archiving old files.
  • Enforcing retention policies based on time or file size.
  • Removing outdated logs to maintain efficient storage usage.

Enterprise Centralization & Security

In large infrastructures, administrators implement centralized logging to consolidate data from multiple servers.

  • Centralized Tools: Platforms like the ELK Stack (Elasticsearch, Logstash, Kibana), Graylog, or Splunk are used to analyze data, create dashboards, and trigger alerts.
  • Remote Logging: Sending logs to a remote server protects against local log tampering and simplifies cross-server troubleshooting.
  • Security Monitoring: Administrators use grep, tail, and awk to identify brute-force attempts and unauthorized activity within authentication logs.

Question ANswer

Linux Fundamentals

Q1. What is Linux?

An open-source OS based on Unix architecture, used for servers, cloud, and security.

Q2. Who created Linux?

Linus Torvalds in 1991.

Q3. What is the Linux Kernel?

The core component managing hardware resources, memory, and processes.

Q4. What are Linux distributions?

OS built using the Linux kernel, tools, and packages (e.g., Ubuntu, Debian, RHEL).

Q5. Difference between Linux and Windows?

Linux is open-source/customizable (server-oriented), Windows is proprietary (desktop-oriented).

Q6. Main advantages of Linux?

Security, stability, flexibility, performance, and community support.

Q7. What is a Linux shell?

A command-line interface to interact with the OS.

Q8. What is Bash?

The default command-line shell in most distributions.

Q9. What is CLI?

Command Line Interface used for executing system commands.

Q10. What is GUI?

Graphical User Interface providing windows, icons, and menus.

Installation & Configuration

Q11. Steps to install Linux?

Download ISO, bootable media, configure BIOS, partition disks, install, and create users.

Q12. What is an ISO image?

A file containing a complete copy of an installation disk.

Q13. What is partitioning?

Dividing a storage device into separate logical sections.

Q14. What is the root partition?

The (/) directory containing main OS files.

Q15. What is swap space?

Disk space used as virtual memory when RAM is high.

Q16. What is GRUB?

Grand Unified Bootloader responsible for loading the kernel.

Q17. What is BIOS/UEFI?

Firmware interfaces that initialize hardware.

Q18. What is hostname?

A unique name assigned to a machine on a network.

Q19. Check Linux version?

cat /etc/os-release or uname -a.

Q20. Check system info?

hostnamectl or uname -r.

Linux File System

Q21. What is Linux file system?

Hierarchical structure organizing files starting from root (/).

Q22. What is the root directory?

(/) is the top-level directory.

Q23. What is /home?

Stores user personal files.

Q24. What is /etc?

Contains system configuration files.

Q25. What is /var?

Stores variable data like logs and databases.

Q26. What is /tmp?

Stores temporary files.

Q27. What is /boot?

Contains bootloader and kernel images.

Q28. How to list files?

ls command.

Q29. Create a directory?

mkdir dir_name.

Q30. Remove a directory?

rmdir dir_name.

User & Group Administration

Q31. What is a user?

An account allowed to access resources.

Q32. What is root?

Admin account with full system access.

Q33. Create user?

useradd username.

Q34. Delete user?

userdel username.

Q35. Change password?

passwd username.

Q36. What is UID?

Unique numeric identifier for a user.

Q37. What is GID?

Unique identifier for groups.

Q38. Create group?

groupadd groupname.

Q39. Check user info?

id username.

Q40. Accounts storage?

Stored in /etc/passwd.

File Permissions

Q41. File permissions?

Controls access to read, write, or execute files.

Q42. Three permissions?

Read (r), Write (w), Execute (x).

Q43. Change permissions?

chmod command.

Q44. Change ownership?

chown command.

Q45. Explain chmod 755?

Owner (rwx), Group/Others (rx).

Q46. What is umask?

Defines default permissions for new files.

Q47. View permissions?

ls -l command.

Q48. What is ACL?

Advanced permission management.

Package Management

Q49. What is package management?

Used to install, update, and remove software packages.

Q50. Package manager in Ubuntu?

APT (Advanced Package Tool).

Q51. Package manager in RHEL?

DNF or YUM.

Q52. Install with APT?

apt install package-name

Q53. Install with DNF?

dnf install package-name

Q54. Update Ubuntu?

apt update && apt upgrade

Networking

Q55. Check IP address?

ip addr

Q56. What is DNS?

Converts domain names to IP addresses.

Q57. Test connectivity?

ping command.

Q58. What is SSH?

Secure remote access to Linux systems.

Q59. Default SSH port?

Port 22.

Q60. Check listening ports?

ss -tulnp

Process Management

Q61. What is a process?

A running instance of a program.

Q62. What is PID?

A unique process identification number.

Q63. View processes?

ps aux

Q64. Monitor processes live?

top command.

Q65. Terminate a process?

kill PID

Q66. What is systemd?

Manages system services and startup processes.

Services & System Administration

Q67. Start a service?

systemctl start service

Q68. Stop a service?

systemctl stop service

Q69. Enable at boot?

systemctl enable service

Q70. Check status?

systemctl status service

Bash Scripting

Q71. What is Bash scripting?

Automating tasks using shell commands.

Q72. Create a script?

Create a file with .sh extension.

Q73. What is shebang?

#!/bin/bash

Q74. Execute a script?

./script.sh

Q75. Variable in Bash?

Stores data values used in the script.

Cron & Automation

Q76. What is cron?

Schedules automated tasks.

Q77. Edit cron jobs?

crontab -e

Q78. List cron jobs?

crontab -l

Q79. Use of cron?

Backups, monitoring, and maintenance.

Linux Security

Q80. What is hardening?

Improving security through configurations.

Q81. Secure SSH?

Use keys, disable root login, restrict users.

Q82. What is firewall?

Controls network traffic flow.

Q83. Firewall tools?

UFW, Firewalld, iptables.

Q84. What is SELinux?

Mandatory access control system.

Logs & Monitoring

Q85. Logs storage?

/var/log directory.

Q86. View logs?

journalctl

Q87. Log rotation?

Managing old logs to save disk space.

Q88. Disk usage?

df -h

Q89. Memory usage?

free -m

Advanced Administration

Q90. What is LVM?

Logical Volume Manager for flexible disk management.

Q91. What is RAID?

Combines disks for reliability/performance.

Q92. What is NFS?

Network File System for file sharing.

Q93-94. Apache vs Nginx?

Apache (web server), Nginx (high-performance web server/proxy).

Q95. What is Docker?

Platform for containerized apps.

Q96. What is Kubernetes?

Manages container orchestration.

Q97. What is Ansible?

Configuration management/automation tool.

Q98-100. Why learn Linux?

Essential for Cloud, DevOps, Security, and Server careers.