My DevOps Journey: Week 2

My DevOps Journey: Week 2

This week was packed with exciting DevOps concepts, from mastering text manipulation in Linux to diving deep into Git and user management. Here's a breakdown of what I explored and learned, and I hope my experience can help others starting their DevOps journey!


Day 1 to Day 3 → Advanced Text Manipulation

1. Regular Expressions (RegEx)
I started by diving deep into Regular Expressions, a powerful tool for searching and manipulating text. RegEx can be tricky at first, but understanding patterns made it much easier to automate searches and extract specific text in files.

2. Hands-on with Vim and EMACS
Next, I worked with two of the most powerful text editors in Linux: Vim and EMACS.

  • Vim is lightweight, perfect for quick file edits, and operates in different modes (insert, normal, and visual).

    • Some useful Vim commands:

      • i: Enter insert mode

      • :wq: Save and quit

      • /pattern: Search for a pattern in the text

  • EMACS is highly customizable and great for more complex tasks like writing code or managing multiple files at once.

    • Some useful EMACS commands:

      • Ctrl + x, Ctrl + s: Save the file

      • Ctrl + x, Ctrl + c: Exit EMACS

      • Ctrl + s: Search for text

Use Cases:

  • Vim is ideal for quick edits on remote servers.

  • EMACS is a powerful IDE for larger projects.


User Management in Linux

Managing users is a crucial part of system administration. Here’s what I covered:

  • Users and Groups:
    Linux classifies users into different types (root, regular, system users). Understanding how users and groups work allows for better management of permissions and access.

  • Files That Manage User Data:

    • /etc/passwd: Contains basic user account details.

    • /etc/shadow: Stores encrypted passwords.

    • /etc/group: Manages group information.

  • Commands:

    • Adding a user: sudo adduser <username>

    • Deleting a user: sudo deluser <username>

    • Changing password: sudo passwd <username>

For a more detailed explanation on this topic, check out the blog I wrote here.


User Permissions

Understanding file permissions is essential in Linux for security and access control. I learned how to express permissions in both numeric (e.g., 755) and symbolic format (e.g., rwx).

  • Modifying Permissions:

    • Use chmod to change permissions, e.g., chmod 755 file.txt.

    • Change ownership with chown and groups with chgrp.

  • Exploring SUID:

    • What is SUID? A special permission that allows users to run a program with the permissions of the file owner.

    • Why required? Useful for programs that need elevated privileges temporarily.

    • Negative: It can be a security risk, but Linux handles different user IDs (Real, Effective, and Saved) to mitigate this.

SUID was one of the more intriguing aspects of user permissions I explored.


Day 4: Learning Git & GitHub

I expanded my knowledge of Git and GitHub this week.

  • Branching and Merging:
    Creating and managing branches to keep work organized.

  • Stashing:
    Stashing changes when switching between branches without committing.

  • Rebasing & Reverting:

    • Rebase allows for cleaner commit history.

    • Revert is used to undo changes in a safe way.

  • Git Hooks:
    This was the most exciting part of my Git learning this week. Git hooks are scripts that run before or after events like commits or pushes, allowing for automation and custom workflows.

I wrote a more detailed blog about Git here.


Day 5: Process Control in Linux

On the last day of the week, I explored process management in Linux, which helps control system resources.

  • Understanding TTY:
    TTY (teletype) controls how terminals interact with processes, and while it was a bit tough at first, I found some helpful tutorials on YouTube that clarified things.

For more information, check out my detailed blog post on this topic here.


Challenges Faced This Week 😎

I found understanding EMACS and TTY particularly difficult, but a helpful YouTube channel, DistroTube, made these topics easier to grasp. I highly recommend checking it out if you’re also learning.


Next Week’s Goal 🎯

  • Dive deeper into advanced Git topics like Git hooks, large file handling, and submodules, subTrees.

  • Learn more about package management in Linux, device interaction, and filesystem structure.

Stay tuned for more updates as I continue my DevOps journey! 😇

𝕏: HarshButani6

LinkedIn: HarshButani