Thursday, 3 October 2024

 Managing Simple Partitions and Filesystems lab

 Understanding Partitions and Filesystems

  • Partition: A logical division of a physical disk.
  • Filesystem: A structure used to organize and store data on a partition.

Common Filesystems:

  • EXT4: The default filesystem for most modern Linux distributions.
  • NTFS: Commonly used on Windows systems.
  • FAT32: Older filesystem, often used for USB drives.

Tools:

  • GParted: A graphical disk partitioning tool.
  • fdisk: A command-line disk partitioning tool.
  • mkfs: A command-line tool to create filesystems.

Lab Exercises:

1. Creating a New Partition

  • Open GParted: Launch GParted from your applications menu.
  • Select the disk: Choose the disk you want to partition.
  • Create a new partition: Right-click on unallocated space and select "New".
  • Set parameters: Choose the size, file system, and mount point for the partition.
  • Apply changes: Click "Apply" to save the changes.
  • Image of GParted interface showing partition creation

2. Formatting a Partition

  • Use the mkfs command:

    Bash
    sudo mkfs.ext4 /dev/sda1
    

    Replace /dev/sda1 with the device path of your partition.

    [Image of the mkfs command output]

3. Mounting a Filesystem

  • Create a mount point:
    Bash
    sudo mkdir /mnt/newpartition
    
  • Mount the filesystem:
    Bash
    sudo mount /dev/sda1 /mnt/newpartition
    

4. Checking Filesystem Information

  • Use the df command:
    Bash
    df -h
    

5. Unmounting a Filesystem

  • Unmount the filesystem:
    Bash
    sudo umount /mnt/newpartition
    

6. Resizing a Partition

  • Use GParted:

    • Select the partition you want to resize.
    • Drag the resize handle to adjust the size.
    • Apply changes.
  • Use the resize2fs command:

    Bash
    sudo resize2fs /dev/sda1

AWS Backup LAB

1. Create a Backup Vault

  • Navigate to the AWS Backup console: In the AWS Management Console, search for "Backup" and select the Backup service.
  • Create a Backup Vault: Click on "Create backup vault".
  • Name your backup vault: Give your backup vault a unique name.
  • Choose a region: Select the region where you want to store your backups.
  • Create the vault: Click on "Create backup vault".
  • Image of creating a backup vault in AWS Backup console

2. Create a Backup Plan

  • Click on "Create backup plan": This will open a wizard to guide you through the creation process.
  • Name your backup plan: Give your backup plan a descriptive name.
  • Add a backup rule: Click on "Add backup rule".
  • Choose a backup frequency: Specify how often you want to create backups.
  • Select a backup window: Define the time window during which backups can occur.
  • Set a retention policy: Determine how long you want to retain backups.
  • Add a backup vault: Choose the backup vault you created earlier.
  • Create the backup plan: Click on "Create backup plan".
  • Image of creating a backup plan in AWS Backup console

3. Back Up an EC2 Instance

  • Select the EC2 instance: In the EC2 console, select the instance you want to back up.
  • Create a backup: Click on "Actions" -> "Create backup".
  • Choose a backup plan: Select the backup plan you created earlier.
  • Create the backup: Click on "Create backup".
  • Image of backing up an EC2 instance in AWS Backup console

The Boot Process lab

 Key Stages of the Boot Process:

  1. Power-On Self Test (POST):
    • The BIOS (Basic Input/Output System) performs a hardware check to ensure that all components are functioning correctly.
      Image of POST screen
  2. BIOS Configuration:
    • The BIOS loads its configuration settings and determines the boot order.
      Image of BIOS configuration screen
    • Boot Device Selection:
    • The BIOS searches for the boot device (usually a hard drive or USB drive) specified in the boot order.
      Image of boot device selection screen
  3. Bootloader Loading:
    • The BIOS loads the bootloader (e.g., GRUB, LILO) from the boot device.
      Image of bootloader screen
  4. Kernel Loading:
    • The bootloader loads the kernel, the core of the operating system, into memory.
      Image of kernel loading screen
  5. Init Process:
    • The kernel starts the init process, which is responsible for initializing other system processes.
      Image of init process
  6. Filesystem Mounting:
    • The init process mounts the root filesystem, making the operating system's files accessible.
      Image of filesystem mounting process
  7. Startup Services:
    • The init process starts various system services, such as networking, sound, and graphical interface.
      Image of startup services
  8. Login Prompt:
    • The login prompt appears, allowing the user to enter their username and password.
      Image of login prompt
  9. Desktop Environment:
  • Once the user logs in, the desktop environment is loaded, providing a graphical interface for interacting with the system.
    Image of desktop environment

 Introduction to vim, nano, gedit, gvim LAB

 

1. Vim: The Modal Editor

  • Open Vim: In a terminal, type vim.
  • Navigate: Use the arrow keys to move around the text.
  • Edit: Press i to enter insert mode, then type your text. Press esc to return to normal mode.
  • Save and quit:
    Type :wq and press Enter.
  • Image of Vim editor in normal mode

2. Nano: The Simple Editor

  • Open Nano: In a terminal, type nano.
  • Edit: Type your text directly.
  • Save and quit: Press Ctrl+X, then Y to confirm, and Enter.
  • Image of Nano editor

3. Gedit: The Graphical Editor

  • Open Gedit: Click on the Gedit icon in your applications menu.
  • Edit: Use the mouse and keyboard to edit your text.
  • Save and quit: Click "File" -> "Save" and then "File" -> "Quit".
  • Image of Gedit editor

4. GVim: The Graphical Vim

  • Open GVim: In a terminal, type gvim.
  • Navigate and edit: Use the same commands as Vim, but with a graphical interface.
  • Save and quit: Type :wq and press Enter.
  • Image of GVim editor

Lab Exercises:

  1. Create a new file: Use each editor to create a new file named example.txt.
  2. Write some text: Type a few lines of text into each file.
  3. Save and quit: Save the files and exit each editor.
  4. View the files: Use the cat command in the terminal to view the contents of the files.
  5. Edit the files again: Open each file again and make some changes.
  6. Save and quit: Save the changes and exit the editors.

Linux Text mode installation LAB

 

1. Download the ISO Image

  • Choose a distribution: Popular options include Ubuntu, Fedora, Debian, and Linux Mint.
  • Download the ISO: Visit the official website and download the latest stable version.
  • Image of Linux distribution website with a download button

2. Create a Bootable USB Drive

  • Download a USB writing tool: Rufus (Windows) or Etcher (macOS/Linux) are popular choices.
  • Plug in your USB drive: Make sure it's empty.
  • Open the tool: Follow the on-screen instructions to select the ISO image and the USB drive.
  • Start the process: Click "Write" or "Flash" to create the bootable USB.
  • Image of Rufus or Etcher interface showing the ISO image and USB drive selection

3. Boot from the USB Drive

  • Restart your computer: When prompted, select the option to boot from the USB drive (usually F12, Esc, or a specific function key).
  • Choose the text mode installation: Look for an option like "Install GNU/Linux (text mode)" or "Install in text mode."
  • Image of boot menu showing the option to boot from USB

4. Select Your Language and Keyboard Layout

  • Choose your language: Select your preferred language.
  • Choose your keyboard layout: Select the layout that matches your keyboard.
  • Image of text mode installation screen showing language and keyboard options

5. Partition Your Disk

  • Select your partitioning scheme: Choose between automatic partitioning or manual partitioning.
  • Create partitions: If you're manually partitioning, specify the size and type of partitions (e.g., root, swap, home).
  • Image of text mode installation screen showing partitioning options

6. Configure Your System

  • Set your time zone: Select your location to set the correct time zone.
  • Create a user account: Enter your desired username and password.
  • Choose your installation source: If you have a network connection, you can choose to install updates during the process.
  • Image of text mode installation screen showing time zone and user account configuration

7. Begin the Installation

  • Click "Install Now" or press Enter: The installation process will begin.
  • Monitor progress: The installation may take some time, depending on your hardware and the chosen installation options.
  • Image of text mode installation screen showing the installation progress

8. Reboot and Enjoy Linux

  • Once the installation is complete: Your computer will reboot.
  • Log in: Use the username and password you created during the installation.
  • Explore your new Linux system: Start discovering the world of open-source software!

 Basic System configuration and Administration LAB

 

1. Update System Packages

  • Open a terminal: Use the terminal application (usually found in the "Applications" menu).
  • Update package lists: Run the following command:
    Bash
    sudo apt update
    
    (Replace apt with dnf or yum if you're using Fedora or CentOS, respectively.)
  • Upgrade packages: Run the following command:
    Bash
    sudo apt upgrade
    

[Image of a terminal window showing the sudo apt update and sudo apt upgrade commands]

2. Set Your Time Zone

  • Open the Time & Date settings: This can usually be found in the system settings or control panel.
  • Select your time zone: Choose the correct time zone for your location.
  • Image of time zone settings window

3. Configure Network Settings

  • Open the network settings: This can usually be found in the system settings or control panel.
  • Connect to a network: If you're using a wired connection, plug in the Ethernet cable. For Wi-Fi, select your network and enter the password.
  • Image of network settings window showing WiFi connection options

4. Create Users and Groups

  • Open the users and groups settings: This can usually be found in the system settings or control panel.
  • Create a new user: Enter the desired username and password.
  • Assign groups: If necessary, assign the user to specific groups (e.g., sudo for administrative privileges).
  • Image of users and groups settings window showing the option to create a new user

5. Configure Software Repositories

  • Open a terminal: If you're using a distribution with multiple software repositories (e.g., Universe, Backports), you may need to enable them.
  • Edit the sources.list file: Use a text editor like nano or gedit to edit the /etc/apt/sources.list file (or its equivalent for other distributions).
  • Add or remove repositories: Uncomment or comment out the lines corresponding to the repositories you want to enable or disable.

[Image of the /etc/apt/sources.list file]

6. Install Software

  • Open a terminal: Use the package manager to install desired software.
  • Search for packages: Use the search command (e.g., sudo apt search firefox).
  • Install packages: Use the install command (e.g., sudo apt install firefox).

[Image of the terminal window showing the sudo apt install firefox command]

7. Configure Firewall

  • Check your firewall status: Use the appropriate command for your distribution (e.g., ufw status for UFW).
  • Enable or disable the firewall: If necessary, use the appropriate command (e.g., ufw enable or ufw disable).
  • Configure rules: If you need to allow or block specific ports or traffic, use the appropriate command (e.g., ufw allow ssh).

[Image of the terminal window showing the ufw status command]

8. Set a Strong Password

  • Open the user settings: Find the option to change your password.
  • Create a strong password: Use a combination of uppercase and lowercase letters, numbers, and symbols.
  • Image of user settings window showing the option to change password

By following these steps, you can perform basic system configuration and administration tasks on your Linux system. Remember to refer to the specific documentation for your distribution for more detailed instructions and advanced configuration options.

GNU/LINUX OS Installation lab

 

1. Download a Linux ISO Image

  • Choose a distribution: Popular options include Ubuntu, Fedora, Debian, and Linux Mint.
  • Download the ISO: Visit the official website and download the latest stable version.
  • Image of Linux distribution website with a download button

2. Create a Bootable USB Drive

  • Download a USB writing tool: Rufus (Windows) or Etcher (macOS/Linux) are popular choices.
  • Plug in your USB drive: Make sure it's empty.
  • Open the tool: Follow the on-screen instructions to select the ISO image and the USB drive.
  • Start the process: Click "Write" or "Flash" to create the bootable USB.
  • Image of Rufus or Etcher interface showing the ISO image and USB drive selection

3. Boot from the USB Drive

  • Restart your computer: When prompted, select the option to boot from the USB drive (usually F12, Esc, or a specific function key).
  • Choose the installation option: Select "Install GNU/Linux" or a similar option.
  • Image of boot menu showing the option to boot from USB

4. Configure Installation Settings

  • Select your language: Choose your preferred language.
  • Choose your keyboard layout: Select the layout that matches your keyboard.
  • Choose your installation type: Decide whether you want to install alongside Windows or replace it entirely.
  • Select your partition: If you're installing alongside Windows, choose a partition to allocate for Linux.
  • Image of installation screen showing language, keyboard, and installation type options

5. Configure Your System

  • Set your time zone: Select your location to set the correct time zone.
  • Create a user account: Enter your desired username and password.
  • Choose your installation source: If you have a network connection, you can choose to install updates during the process.
  • Image of installation screen showing time zone and user account configuration

6. Begin the Installation

  • Click "Install Now": The installation process will begin.
  • Monitor progress: The installation may take some time, depending on your hardware and the chosen installation options.
  • Image of installation progress bar

7. Reboot and Enjoy Linux

  • Once the installation is complete: Your computer will reboot.
  • Log in: Use the username and password you created during the installation.
  • Explore your new Linux system: Start discovering the world of open-source software!