Operating Systems

Full Stack Web Developer

Operating Systems – My 2nd love

The age of Microsoft

It was Summer of 1998, Intel and AMD were battling out their consumer grade processors and the AMD K6-2 was just released. Coming in at an astonishing ~200-500 mhz it was faster than anything we’ve seen before and don’t forget this was back when computers were actually slow. I was 15 years of age and was about to build my first computer, a socket 7 — 333 mhz AMD K6-2. Best of all it was going to run the absolute best operating system available, Windows 95. Microsoft had economized the computer world, cutting the massive prices Apple wanted to charge and allowing vendors to create software without a strict approval process. It was beautiful, we were running 56k dial up modems, surfing the cheap $10 a month internet and starting the infrastructure that will become the modern day global internet.

Windows continued to dominate the market through Windows 98, ME (Mistake Edition), 2k, and XP. Microsoft relied on the DOS kernel all the way up until the millennial edition, finally XP merged the NT kernel and the Windows UI we all grew to love.

The Linux revelation

It wasn’t until 2003 when I really started using Linux. It was Red Hat 7.2 (not RHEL) and we used it to compile C++ applications in Linux’s gcc compiler. I loved it, but it was still relatively immature, several issues caused me think that Linux wasn’t quite there yet. Driver support was abysmal, the free open source text editors and spread sheet applications didn’t stack up to the Microsoft Office Suite, and it was ridiculously difficult to install and maintain. However, it was still more stable than Windows.

Then in late 2005 Ubuntu was released. I started using it in late 2006 as I had become of pretty big fan of Red Hat and really had no motivation to try a new distribution. However, Ubuntu had better driver support, was easier to install and ultimately became the big stepping stone Linux needed to reach a larger user base. You would think a free operating system, that’s capable of powering the most important servers in the world would be popular, but Windows continued to dominate the consumer market. Personally I ran a dual boot windows / Linux setup to meet the needs of multiple classes while in college.

Today’s Linux and the rise of Android

Today I’m heavily engrossed in CentOS, Ubuntu and Android (a Linux derivative). CentOS being the CLI OS of choice for production environments, whilst Ubuntu still being my personal preference for a workstation and management of my server. Fourteen years of Linux and it just keeps getting better, service management, improved file systems with ext4, zfs, glusterfs and uncompromising driver support. Modern Linux will pretty much run on anything now.

Aside from being an extremely stable server environment, navigating today’s Linux is incredibly fun and offers an level of extensibility just not seen in other operating systems. Android which is the most widely used mobile operating system is based off the Linux kernel.

 

Why is Linux so darn complicated?

It’s no secret that Linux is one of the more complicated Operating Systems. The learning curve is steep and to truly understand what the hell you’re actually doing will take years of practice. It’s fundamentally abstract and the command line interface (CLI) administration is especially daunting. It’s complicated simple because it’s designed for power users. It’s a product designed to be flexible enough to meet the desktop and server needs of people all over the world. CLI is especially important since many instances of Linux are installed remotely and the only feasible way to get into those systems is remotely over SSH through the CLI. Command line Linux is designed to be fast and powerful, and it has become an important part of efficient system administration. In a nutshell it’s complicated because it’s flexible and powerful.

Why do all the ‘nerds’ rave about Linux?

  • User management
    • Simple, straightforward and very strict.
    • chown, chmod, useradd, usermod are really all you need to get started.
    • Eventually you’ll find you need recursive ownership commands:
      • find . -type d -exec chmod 755 {} +
      • Some command are more ‘dangerous’ than others, leaving out a ‘.’ or putting a ‘/’ in the wrong place can change reference points on recursive commands potentially devestating systems. This is why it’s always better to perform actions on a restricted user and not ‘root’.
  • Package Management
    • Free everything – that’s right, open source in Linux means the actual software and binaries are free.
    • Software is organized by repositories (repos) and made available to download through simple install commands.
    • Common repos include Apt-get, Yum, and Epel.
      • apt-get update; apt-get upgrade; apt-get autoremove;
      • I am able to install and configure Apache, MySQL, and PHP on a Linux distro in very little time (~1hr) thanks to the existance of repos.
    • Repos also make updating software a breeze. Simply run update functions and the package manager will automatically upgrade your software.
      • One should be weary of running this in a production environment without testing it in a development environment first as newer versions could have bugs or may change requirements on how your software runs!
  • Stability
    • We’ve all heard the stories, if you want a stable environment Linux is king. There’s absolutely 100% truth to that.
    • Linux systems heavily mitigate system failure errors and pride themselves on robust uptime, minimal resource usage, efficient file systems and the need to very rarely restart.
    • It’s not uncommon for my servers to have uptimes in the hundreds of days with absolutely no issues.
    • Compare that to Windows who needs to restart every time you update anything and will spontaneously turn into the next version of Windows while you’re sleeping one night.
  • Security
    • Very few points of entry.
    • Strict control over open ports through superior firewall software.
      • Ubuntu using UFW (uncomplicated firewall)
      • CentOS using IPTables and Firewalld
      • Often I’ll see WHM (Web Host Manager) and cPanel accounts using CSF which is a firewall suite that sits overtop of IPTables.
    • SSH handshake is extremely secure.
  • Easily accessible
    • SSH makes accessing Linux machines very easy.
    • I usually access them from Windows machines over Putty.
      • I remember SSHing into a server while at the airport from my phone to fix a server config issue.
  • Power overwhelming
    •  Gif of a standard CLI Linux User
    • When you’re comfortable in the Linux Terminal you have absolute power.
    • Did you know that in Windows 10 you can’t permanently turn off the firewall? Yeah, you can only temporarily disable it and then it automatically turns itself back on after a preset amount of time. I didn’t believe it at first either, but it’s true.
    • But with great power comes great mistakes. That’s right, it’s quite easy to completely brick a system if you don’t know what you’re doing in the terminal or even worse when you’re learning how to use the terminal and are overconfident with your copy/paste from Google. There’s no undo when you “rm -rf”, just scream for help from Tom Cruise and hit that enter button.
  • Did I mention free?
    • Yeah, it’s free too.
  • Necessary to be a productive developer in most environments.
    • CLI .git is just better than using a GUI.
    • VIM is fantastic for quick edits.
    • Having a solid understanding of front-end can greatly aid in server optimization process goals.