Book Image

Linux Administration Cookbook

By : Adam K. Dean
Book Image

Linux Administration Cookbook

By: Adam K. Dean

Overview of this book

Linux is one of the most widely used operating systems among system administrators,and even modern application and server development is heavily reliant on the Linux platform. The Linux Administration Cookbook is your go-to guide to get started on your Linux journey. It will help you understand what that strange little server is doing in the corner of your office, what the mysterious virtual machine languishing in Azure is crunching through, what that circuit-board-like thing is doing under your office TV, and why the LEDs on it are blinking rapidly. This book will get you started with administering Linux, giving you the knowledge and tools you need to troubleshoot day-to-day problems, ranging from a Raspberry Pi to a server in Azure, while giving you a good understanding of the fundamentals of how GNU/Linux works. Through the course of the book, you’ll install and configure a system, while the author regales you with errors and anecdotes from his vast experience as a data center hardware engineer, systems administrator, and DevOps consultant. By the end of the book, you will have gained practical knowledge of Linux, which will serve as a bedrock for learning Linux administration and aid you in your Linux journey.
Table of Contents (15 chapters)

Anecdote - try, try, and try again

You will find that in your career the concept of holy wars is dominant, and every new generation of technology has its apologists and opponents. This is not least seen in the distribution-wars, which has tribal factions staunchly defending their OS of choice. If you ever find yourself in the position of choosing which distribution to install for a company or project, take into consideration everything you've read here, and do your own reading around before blindly accepting one person's opinion as truth.

That's not to say you should become tribal yourself I've installed all of the preceding distributions at one time or another, the first of which was Ubuntu.

Back in 2005, I learned about this thing called Linux.

Before then, I'd known Macs my entire life, as it was the brand my dad had decided upon. I'd also cobbled together a single Windows machine for the purpose of playing Diablo, though I can't say I ever enjoyed using the OS itself.

Everything changed when I spotted a computer magazine on holiday, and ended up flipping through the various pages until I landed on a piece about Linux, which captured my imagination immediately. Something different and quirky appealed to my rebellious attitude, and as a result I ended up burning this thing called Ubuntu to a CD (or several).

Back then, Canonical would freely send you Ubuntu CDs if you requested them, but I was impatient, and burning disks was quicker.

I made a backup of everything I cared about on my computer, and set about working my way through my first installation once I'd worked out exactly how to boot from a CD. By all accounts it went well, and though I had to nip to another computer occasionally (no smartphones, remember) to look up what certain options meant, I eventually had a shiny new desktop OS installed.

The trouble started around this time.

My wireless card didn't work, the graphics seemed sluggish, and I ran a single update before rebooting, which landed me not on a desktop, but at a command-line interface.

I had never seen a command-line interface before.

To this day, I have no idea how I ever managed to get a functional OS on that box, and I was forever fighting a program called NdisWrapper to get my wireless to work, or installing proprietary (though I didn't know the word at the time) graphics drivers, which would break as soon as you upgraded the kernel (though again, I had no idea that was what was happening at the time).

I somehow plodded along, soon getting bored of Ubuntu when I discovered different distributions, and spending the next few months with a different desktop every week. I distinctly remember running through Ubuntu, Debian, Fedora, OpenSUSE, and a very, very early attempt at installing Gentoo, which I gave up on after about five minutes.

I ended up on forums frequently, painstakingly copying errors into Google to try and find other people who'd had the issues I was experiencing, and often discovering a post where the poster had inconveniently announced they'd Fixed It! without actually providing the solution they'd used.

All of this, as irritating as it was to me at the time, was a learning experience, and I think my love of Linux and computing in general can be traced back to the first time I installed Ubuntu. Prior to that date, computers had been games machines and that was it.

Soon, I was using Linux Mint to bypass the school firewall, booting to a Live USB drive, and ignoring all the feeble attempts at blocking that the school IT department had enabled (for some reason, they believed Windows was the only OS in existence). I still don't quite know how this worked, but the point was that it did.

Between bouts of World of Warcraft, Linux was something I tinkered with for years, keeping up on the latest releases and installing other distributions to try ("distribution-hopping" frequently). I broke things, fixed them, got angry with Linux, got angry with computers in general, but on the whole, I slowly improved.

Fast forward a little while and generally bad school results meant I bailed out without finishing college, or going to university. I had very little in the way of qualifications, but still had something of an aptitude for computing. I found and went on a course that lasted a few months and resulted in a couple of noddy Microsoft certifications, but which ultimately meant that I had a sparse CV that I could start submitting to companies.

I was called by and went for an interview with a hosting provider based in Manchester, and met with the man who's now the CTO. The interview was weird, with us variously discussing taking computers apart, a bit of Linux, and a lot of Counter Strike, as it turned out he'd played a lot in years past. I left feeling nervous, but fairly amused at how it had gone.

Upon returning, after being called back in, I was fairly stunned to get offered the job of Data Center Engineer, which while not a Linux-focused position, was more than I could have hoped for given my level of education. It made me incredibly happy to be employable, and I'm forever grateful to that company and interviewer for giving me a chance.

The takeaway I'd like to present from this is that Linux is fairly great it can give even the most academically illiterate of us a decent career, and it's so vibrant and forever evolving that there's always something new to learn. I've met some great people, and learned some fascinating things on my journey, a lot of which I hope to pass on in these pages.

I hope you find the rest of this book informative, whether you're a newcomer to Linux administration, or you're someone experienced that's just checking for tips and tricks you might not know.