Post

Week 4 Learning Journal

I followed the LPI Linux Essentials Certification from acloud.guru and gained knowledge about these chapters.

CHAPTER 1 - Getting Started
CHAPTER 3 - Major Open-Source Applications
CHAPTER 4 - Open-Source Software and Licensing
CHAPTER 5 - ICT Skills and Working in Linux
CHAPTER 6 - Command Line Basics
CHAPTER 7 - Using the Command Line to Get Help
CHAPTER 8 - Using Directories and Listing Files
CHAPTER 9 - Creating, Moving, and Deleting Files
CHAPTER 10 - Archiving Files on the Command Line
CHAPTER 11 - Searching and Extracting Data from Files
CHAPTER 12 - Turning Commands into a Script
CHAPTER 13 - Choosing an Operating System
CHAPTER 14 - Understanding Computer Hardware
CHAPTER 15 - Where Data Is Stored
CHAPTER 16 - Your Computer on the Network
CHAPTER 17 - Basic Security and Identifying User Types
CHAPTER 18 - Creating Users and Groups
CHAPTER 19 - Managing File Permissions and Ownership
CHAPTER 20 - Special Directories and Files
CHAPTER 21 - Linux Essentials Practice Exam 010
CHAPTER 22 - Final Steps

Keywords Learned during the Completion of 22 Chapters

Command Line Tools

  • htop: Interactive process viewer for system monitoring.
  • pwd: Command to print the current working directory.
  • cat /etc/issue: Command to display the system identification file.
  • sudo dpkg -i (package_name): Command to install a .deb package.
  • sudo dpkg --remove (package_name): Command to remove a .deb package.

Documentation Pages

  • Man pages basics and how to use - flags with it.
  • Info pages are much more detailed.

Files and Directories

Common Directories

  • /bin: Contains commands runnable by all users.
  • /boot: Contains important files for booting the system.
  • /dev: Contains device files like block devices.
  • /etc: Contains configuration files.
  • /home: Contains user home directories.
  • /lib: Contains shared libraries.
  • /mnt: Temporarily mounted filesystems.
  • /opt: Contains optional packages.
  • /proc: Contains kernel process and files.
  • /root: Home directory for the root user.
  • /run: Contains application state files.
  • /sbin: Contains system administration binaries.
  • /srv: Contains service data.
  • /tmp: Contains temporary data, non-persistent.
  • /usr: Contains user binaries.
  • /var: Contains variable data files.

File Navigation

  • pwd: Command to print the current working directory.
  • cd: Command to change directories.
    • Press tab to complete commands.
    • .: Represents the current directory.
    • ..: Represents the parent directory.
    • ../..: Moves two levels up.
    • -: Returns to the previous directory.
  • ls -a: Command to list all files, including hidden ones.
  • Hidden files are not secret files; permissions are used instead.
  • ls -A vs ls -a: Difference in listing hidden files.

Environment

  • env: Command to display environment variables.

File Operations

Basic Commands

  • mkdir: Command to create directories.
  • cp -r <source> <destination>: Command to copy recursively.
  • mv <source> <destination>: Command to move or rename files/directories.
  • rm -r <destination>: Command to remove directories.

File Creation

  • touch <name>: Command to create an empty file.
  • cp <source> <destination>: Command to copy files.
  • mv <source> <destination>: Command to move or rename files.
  • rm <file>: Command to remove files.
  • file: Command to determine file type.

Other Operations

  • Moving a file over another (mv file2 file1) will erase file1.

File Attributes

  • -p tag for creating a directory and subdirectories.
  • -s: Symbolic link.
  • -v: Command to get detailed information.

Miscellaneous

  • Linux is case-sensitive.
  • Globbing:
    • ?: Matches any single character.
    • *: Matches zero or more characters.
    • []: Matches any one of the enclosed characters.
    • ^, $, {}, |: Special characters for pattern matching.

Lab Performances

  • Understood concepts of moving, copying, and removing files and folders using globbing.

Chapter 3.1: Archiving Files on Command Lines

  • Learned about archiving using tar command with options like c, x, r, t, f, and deleting files in the archive without extracting it.
  • Explored compression techniques using gzip, bzip2, and zip with options -z, -j, and zip.
  • Lab tasks performed:
    • Created an archive using tar with various options.
    • Compressed archives using gzip and tar.
    • Extracted files from an archive using tar.

Chapter 3.2: Searching and Extracting Data from Files

  • Studied usage of grep and | command along with their common applications.
  • Learned about I/O redirection using >, >>, and <.
  • Explored regular expressions (regex).
  • Lab tasks performed:
    • Answered questions about file contents using grep and regular expressions.
    • Redirected output to a file named value.txt.

Additional Resources and Labs

  • Conducted additional labs focusing on parsing data from large files using grep, piping, and regular expressions.
  • Tasks included determining the number of files and folders, unpacked entries, and total entries in log files.
  • Explored various regex patterns to extract specific data from files.
  • Output of tasks directed to ~/value.txt.

Learning Objectives

  • Completed 3 out of 3 learning objectives for Chapter 3.
  • Completed 4 out of 4 learning objectives for Additional Resources and Labs.

Turning Commands into a Script

3.3 Turning Commands into a Script

  • Explored the autonomy of shell scripts.
  • Created a basic shell script using #!/bin/bash and commented lines.
  • Made the script executable using chmod +x.
  • Learned basics of text editors like vim and nano, and utilized vimtutor.

About This Lab

In this hands-on lab, wrote a shell script for connecting to Linux Academy Linux servers from another Linux (or Mac) host, without having to first accept the RSA fingerprint.

Learning Objectives

  • Determined options to be used with the ssh command.
  • Built a script from the required commands.
  • Executed and verified the script.
  • Added the new bin directory to the PATH variable.

Choosing an Operating System

4.1 Choosing an Operating System

  • Explored different operating systems and their uses, including distribution lifecycles.

Understanding Computer Hardware

4.2 Understanding Computer Hardware

  • Utilized commands like cat /cpu/proc, free, df -h, ifconfig to gather hardware information.

About This Lab

Practiced locating hardware information to ensure appropriate usage and facilitate the installation of additional drivers.

Learning Objectives

  • Determined available storage using df -h.
  • Determined the number of CPUs/cores using cat /proc/cpuinfo.
  • Determined CPU speed using cat /proc/cpuinfo.
  • Determined installed RAM using sudo dmidecode and sudo cat /proc/meminfo.
  • Determined swap usage using free -m.
  • Determined the BIOS version using sudo lshw and sudo dmidecode.

Where Data Is Stored

4.3 Where Data Is Stored

Configuration Files in /etc

  • Explored the purpose of /etc directory and its subfolders.
  • Learned about configuration files like fstab and others.

Processes

  • Utilized commands like ps to view running processes.
    • ps aux
    • top

System Messaging

  • Explored system messaging using dmesg.

About This Lab

In this hands-on lab, practiced finding and viewing processes running on a Linux system, which is fundamental for systems administration.

Learning Objectives

  • Determined the number of processes currently running.
  • Determined the current system load.
  • Determined how many processes are running as cloud_user.
  • Determined the PID of the xfce4-session process.
  • Determined how many threads the xfce4-session process is using.
  • Wrote a small shell script to return the number of threads in a process.

System Logs Lab

  • Practiced working with system logs, a common task for Linux service administrators.

Your Computer on the Network

4.4 Your Computer on the Network

Internet, Network, and Routers

  • Explored querying DNS client configuration.
  • Explored querying network configurations.

About This Lab

In this hands-on lab, determined the network configuration for the eth0 interface of the lab host.

Learning Objectives

  • Determined the IP address using sudo ip addr show.
  • Determined the MAC address using sudo ip addr show.
  • Determined the gateway using sudo ip route show.
  • Determined the DNS server using cat /etc/resolv.conf | grep nameserver.

DNS Configuration Lab

  • Verified network DNS configuration settings and performed several DNS queries.

Learning Objectives

  • Determined the configured DNS host using cat /etc/resolv.conf.
  • Performed a DNS lookup on www.acloudguru.com using the configured DNS host.
  • Performed a DNS lookup of www.acloudguru.com using another DNS host.
  • Tested connectivity to www.acloudguru.com using ping.

Basic Security and Identifying User Types

5.1 Basic Security and Identifying User Types

User Types

  • Differentiated between root and standard users.
  • Explored system users.

About This Lab

In this hands-on lab, practiced working with users and groups in Linux, which is fundamental to managing Linux systems.

Learning Objectives

  • Determined what groups sysuser belongs to using:
    • id sysuser
    • groups sysuser
    • cat /etc/group | grep sysuser
  • Determined sysuser’s home directory using:
    • getent passwd sysuser
    • cat /etc/passwd | grep sysuser
  • Determined sysuser’s login shell using:
    • getent passwd sysuser
    • cat /etc/passwd | grep sysuser

Creating Users and Groups

5.2 Creating Users and Groups

User and Group Commands

  • Utilized user and group commands to manage users and groups.
  • Learned about user IDs.

Boilerplate

  • Discussed the purpose of the /etc/skel directory.

About This Lab

In this hands-on lab, practiced adding users and groups from the command line, a fundamental skill in Linux system administration.

Learning Objectives

  • Created required users and groups using appropriate commands.
  • Added members to the appropriate groups.
  • Verified group membership configuration for all users.

Managing User and Group IDs

UID Scheme

  • Determined the UID scheme by examining /etc/passwd.
  • Determined the UID ranges for system users and standard users.
  • Identified the absolute highest UID value for the current users.
  • Chose a higher value for where UIDs on a remote host should begin.

GID Scheme

  • Determined the GID scheme by examining /etc/group.
  • Determined the highest GID value.
  • Chose a higher value for where GIDs on a remote host should begin.

Managing File Permissions and Ownership

5.3 Managing File Permissions and Ownership

Understanding Permissions

  • Differentiated between user, group, and everyone permissions.
  • Explored the usage of chown and chmod commands.

About This Lab

In this hands-on lab, practiced managing Linux file and directory ownership and permissions, which is fundamental to Linux systems administration.

Learning Objectives

  • Locked Bill’s, Susan’s, and Juan’s accounts.
  • Created accounts for Nancy, Greg, and Jeremy.
  • Removed Bill, Susan, and Juan as users and transferred ownership of their home directories.
  • Changed permissions of directories to grant read and execute permissions to the group.

Special Directories and Files

5.4 Special Directories and Files

Using Temporary Files and Directories

  • Retrieved and unpacked an archive.
  • Created a temporary file from a directory listing.
  • Moved files to a more persistent temporary directory.
  • Created symbolic links for rpm_verify, rpm_dump, and rpm_load.
  • Added ~/bin directory to the $PATH environment variable.
  • Tested the symbolic links to verify functionality.

Summary of My Journey through Chapters 1 to 20

In my journey through Chapters 1 to 20, I delved deep into the world of Linux systems administration, covering a wide range of topics essential for managing and maintaining Linux-based systems. Here’s a comprehensive summary of what I learned:

Chapters 1 to 5: Introduction to Linux Basics

I started with the basics, understanding the Linux filesystem hierarchy, navigating directories, and manipulating files. I learned about basic commands like ls, cd, pwd, and cat, and explored concepts such as permissions, ownership, and file manipulation.

Chapters 6 to 10: Working with Processes, Services, and Package Management

Moving forward, I gained insights into managing processes, services, and software packages. I explored commands like ps, top, systemctl, and apt-get, understanding how to start, stop, and manage services efficiently. Additionally, I learned about package management tools and techniques for installing, updating, and removing software packages.

Chapters 11 to 15: Networking and System Logs

My journey continued with networking fundamentals, including DNS resolution, IP addressing, and network configuration. I explored commands like ifconfig, ip, and nslookup, gaining the skills to troubleshoot network connectivity issues effectively. Furthermore, I learned how to analyze system logs, interpret log entries, and extract relevant information for troubleshooting purposes.

Chapters 16 to 20: Security, Users, Permissions, and Special Files

In the final stretch, I focused on security-related aspects, user management, and file permissions. I learned about user types, group management, and configuring permissions using commands like chown and chmod. Additionally, I explored concepts such as special directories, symbolic links, and temporary files, enhancing my understanding of file system organization and management.

Conclusion

Through diligent study and hands-on practice, I have acquired a solid foundation in Linux systems administration. From basic filesystem operations to advanced networking and security concepts, I have developed the skills and knowledge necessary to manage Linux-based systems effectively. As I continue my journey, I will remember to apply these principles in real-world scenarios, continuously refine my skills, and stay updated with the latest developments in the Linux ecosystem. With determination and persistence, I am well-equipped to tackle the challenges of Linux systems administration with confidence.

This post is licensed under CC BY 4.0 by the author.