image

Icon made by Muhammad Ali from www.flaticon.com

The power of the command line

Linux users and admins know it:
There are things you can’t do in GUI! - And if so, it usually takes much more time.

I’ve always admired admins who really live in the command line and I’m trying to be one of them. Windows/Microsoft administration involves the GUI heavily and maybe that’s good for newcomers and delegating tasks to users and less experienced sub-admins, but it quickly becomes tedious, once you learn what you can do with a few strokes on the keyboard. And don’t let me start on scripting and automating workflows… 😍
I’ve made it my mission to teach some of the most useful commands I’ve learned over the years to the newbies (many of them are formally trained), when I’m doing onboarding.
Much to the dismay of some:

“Why do I need to learn this? I can do it in this-and-that menu. I can’t remember all this command stuff!

I guess it’s understandable. Many people think much more visual and they like their menus, buttons and ticking boxes. And the learning curve is a bit steep, when you’re used to doing things in a GUI.

I started using Linux in my twenties, when we learned a bit of syntax at uni.
And at first I thought:

“What an antiquated, complicated way to use a computer. Where the hell is my mouse cursor?”

But I already felt, that you get a better understanding on how a computer processes user input. In a way, you learn how the computer thinks. It is much more abstract, than waving your mouse cursor arround, because you need to know what exists and what is possible/allowed. Your wishes need to be translated, much like learning a new language. While using a GUI has much more in common with pointing to pictures, when you order in a foreign restaurant (Which is fine. You’ll get your food.).
And at first I was a bit afraid, that I could break things. But then I quickly learned what I could gain by learning this mystical, sometimes cryptic language.

So I learned to use Linux through the shell. And it felt awesome:

I am ROOT! (or I’ll borrow his powers through “sudo”)

But: When a superior admin (from whom I’ve leard massively) helpt me to build my first server (Thx, Markus! It’s still running! 😉), we installed webmin (a web based GUI interface for linux servers), because learning takes time…
AND there is a place for the GUI, especially when it comes to monitoring.

Nevertheless I felt like a wizard, when I wrote (mostly copied) my first bash script, to turn the server off, when I did not use it. I was smug about my very own personal cloud and my roomies and I shared files (totally legal) and backed our data up, like good digital citizens, before any of our friends and family could do it.

When I started learning Powershell, it was in an MS/Windows enterprise environment (actually an university, my first IT job in 1st level support…), and I was a little disappointed, that it wasn’t widely used by the admins. MS brings so many GUI tools to admintrate their products. I guess that is why the Windows ecosystem became so successful in the enterprise world: Everyone can learn to click some buttons. 🐵
The interesting stuff was going on in the background. User generation, login scripts, backup jobs, system hardening, group policy design… Carefully crafted by 3rd level admins with heaps of knowledge and experience.
I wanted to do that! But you can’t start at the finish line and, at that time, I had very much going on in my private life. So it wasn’t until I got a job placing me in 1st and 2nd level support at a big german public news outlet, that I got the time and opportunity to develop and hone my scripting skills.

For me it is the task at hand, that demands developement. I am a quick learner, but I like to understand what I do, so I’m always looking for opportunities to use aquired skills and develop new ones. So, I need the task! Given by my employer or to myself.
I asked for it (and I keep asking):
What do we want, what do we need? What is the problem at hand and how can we solve it? This is how software manufacturers for IT Management solutions develop their products.
And this is how I largly gained my scripting skills:

  • Time consuming work => Script it!
  • A boring task? => Script it!
  • Strange errors => Find more of them (via script) until you find the cause
  • Reoccuring problems with a known condition => Prevention by monitoring the condition (via script)

I should not forget: The Open Source Community operates, to a large extend on the command line. There is loads of software, that you can get for free (but don’t forget to pay it forward or back by supporting projects every once in a while) if you can operate the command line.

So, if you are starting out in IT: Get to know your command line and therefore your systems. Dive in and find out! Otherwise you’ll only scratch the surface of what is possible and you will have to pay for software and features, which you could render useless, if you develop the solution yourself.

You’ll get faster, smarter and - in the long run - wiser.