DEV Community

Cover image for # ๐Ÿš€ From Commands to Confidence: My Week with Linux Scripting
Sandesh
Sandesh

Posted on

# ๐Ÿš€ From Commands to Confidence: My Week with Linux Scripting

Hello Peeps!

Itโ€™s been a great week of learning โ€” and more importantly, using what Iโ€™ve learned. Like I said earlier, Iโ€™ve been feeding my brain a ton lately, and it finally feels like Iโ€™m flexing those muscles the right way. These mini projects have been a game-changer in making things concrete in my head.

So, I started working on putting my so-called Linux mastery to useโ€ฆ

Let me correct myself โ€” I thought I had mastery. ๐Ÿ˜…

But the moment I started building something real, I realized:

โ€œOof, Iโ€™ve got work to do.โ€

And honestly, I needed that reality check. These projects are what give me the right to say,

โ€œYeah, I know a few things about Linux.โ€

Iโ€™m not a master yet โ€” keyword: yet โ€” but Iโ€™ll get there. Slowly. Surely.

I made myself a promise, and Iโ€™m keeping it.

(Sorry for the motivational rant โ€” just hyping myself up here ๐Ÿ˜„)


๐Ÿ› ๏ธ Project 1: Auto-Provision Me (Shell Scripting)

I started working on a shell scripting project I call Auto-Provision Me, where I built a Bash script to set up a DevOps-ready Linux environment from scratch โ€” safely and repeatably.

๐Ÿ”ง Features:

  • โœ… Package Management (apt install, remove, purge, autoremove)
  • ๐Ÿ” Firewall Setup using ufw with SSH-only default rules
  • ๐Ÿ‘ค User & Group Creation with validation
  • ๐Ÿ“ฆ Restrict Tools to Groups (e.g. podman โ†’ devops)
  • ๐Ÿงช Dry Run Mode for safe testing before execution
  • ๐Ÿ“œ Logging with timestamps to ~/provisioner/install.log
  • ๐Ÿ“š DevOps Tool Installer with interactive CLI menu

๐Ÿ‘‰ Check it out:

๐Ÿ”— Auto-Provision Me on GitHub


๐Ÿ˜ตโ€๐Ÿ’ซ Challenge of the Week: Users, Groups & The Podman Mystery

One thing I wasnโ€™t too comfortable with โ€” and honestly, kind of scared of โ€” was dealing with users and groups.

Creating users, setting up groups, assigning permissions... it all felt like a permissions mess waiting to explode. ๐Ÿงจ

But once I got over that wall of fear?

It wasnโ€™t nearly as bad as I imagined.

Actually... I kinda enjoyed it.

Yep โ€” me, having fun playing system admin. ๐Ÿ˜Ž

It felt good to flex control and make the system obey. Like I was the boss of my own mini server universe.


๐Ÿ‘ป Then came the Podman Ghost Huntโ€ฆ

So Iโ€™m cruising along, feeling good. I write a clean, reusable function to install packages using apt.

First test? Letโ€™s try installing Podman.

๐Ÿ’ฅ Boom. Right in my face.

E: Package 'podman' has no installation candidate
Enter fullscreen mode Exit fullscreen mode

Wait, what!? ๐Ÿ˜ณ

โ€œWhat do you mean you donโ€™t have Podman? This is Ubuntu 24.04!โ€

Naturally, I dove headfirst into the rabbit hole ๐Ÿ•ณ๏ธ๐Ÿ‡.

I discovered:

  • The package likely wasnโ€™t present in the systemโ€™s default APT registry
  • I needed to add an external registry manually
  • Learned all about GPG key authentication ๐Ÿ›ก๏ธ
  • Understood how Linux verifies trust using signed packages
  • Even found where those keys live (/etc/apt/keyrings) ๐Ÿ”‘

At this point, I was geeked out, ready to go full wizard ๐Ÿง™โ€โ™‚๏ธ.

I told myself:

โ€œLet me just try one last time... sudo apt install -y podmanโ€

And guess what?

๐ŸŽ‰ IT. JUST. WORKED.

No fix. No registry. No GPG key.

Just installed.

I was like:

โ€œBro... the universe just trolled me.โ€ ๐Ÿ˜ญ

At that moment, I swear all the stars aligned.

Shouldโ€™ve bought a lottery ticket. ๐Ÿ˜‚

I still donโ€™t know what changed. Maybe the cache updated. Maybe the package gods blessed me.

But I donโ€™t care โ€” because that deep dive taught me a TON.

Sometimes, the bug disappears, but the lessons stay.


๐Ÿ“ˆ Project 2: Monitor Health

Next up was a fun one โ€” building a Bash-based system health monitor. This script gives me insights into how my system is doing and can even run on a schedule using cron.

๐Ÿงฐ Features:

  • ๐Ÿ“Š Full System Health Checks (Disk, Memory, CPU, Users, Services)
  • ๐Ÿšจ Alerting when thresholds are breached (Disk > 80%, Memory < 20%, CPU Overload)
  • ๐Ÿ“ƒ Summary Report
  • ๐Ÿ” Cron-based Daemon Mode
  • ๐Ÿงน Log Management with Timestamped Logging
  • ๐Ÿ†˜ Built-in Help Menu
  • ๐Ÿชต Clean Logging Format with [INFO] and [ERROR] tags

๐Ÿ‘‰ Check it out:

๐Ÿ”— Monitor Health on GitHub


๐Ÿ’ญ Final Thoughts

With these two mini projects in the bag, Iโ€™m feeling so much more confident than I did last week.

Projects like this give me perspective โ€” itโ€™s one thing to learn theory, but implementing it teaches you 10x more.

That doesnโ€™t mean we skip the theory โ€” without it, I wouldnโ€™t know where to start or what to build. But this has been a solid exercise in turning theory into real-world execution.

If youโ€™ve done similar projects (or are working on something cool), share them with me! Iโ€™d love to check them out, learn from them, and stay motivated.


๐Ÿง  Whatโ€™s Next? Time to GIT Going!

Next up, itโ€™s time to GIT going โ€” literally. ๐Ÿ˜„

Iโ€™ve used Git before, but now I want to dive deeper into the fundamentals and advanced usage โ€” rebasing, hooks, cherry-picking, all that fun stuff.

Because letโ€™s be honest, when you think you know Git...

Git hits back. ๐Ÿ˜…

But Iโ€™m here for it.

Thanks for tagging along, and if you checked out the projects โ€” thank you.

If you left a โญ or dropped a comment โ€” you're the real MVP.


Stay sharp. Stay curious.

And remember โ€” even when the package โ€œhas no installation candidateโ€...

๐Ÿ‘‰ Youโ€™ve got this.


Top comments (1)

Collapse
 
madhurima_rawat profile image
Madhurima Rawat

Projects are great โœจ๏ธ Also it's great that you put this as series, looks good and easy to navigate.

Keep up the good work. Looking forward to more Projects and resources ๐Ÿ”ฅ๐Ÿ“š