Linux Administration Cookbook
Insightful recipes to work with system administration tasks on Linux
Adam K. Dean
BIRMINGHAM - MUMBAI
Linux Administration Cookbook
Copyright 2018 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing or its dealers and distributors, will be held liable for any damages caused or alleged to have been caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
Commissioning Editor: Gebin George
Acquisition Editor: Prachi Bisht
Content Development Editor: Deepti Thore
Technical Editor: Sayali Thanekar
Copy Editor:Safis Editing
Project Coordinator: Jagdish Prabhu
Proofreader: Safis Editing
Indexer: Mariammal Chettiyar
Graphics: Jisha Chirayil
Production Coordinator: Arvindkumar Gupta
First published: December 2018
Production reference: 1311218
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham
B3 2PB, UK.
ISBN 978-1-78934-252-9
www.packtpub.com
mapt.io
Mapt is an online digital library that gives you full access to over 5,000 books and videos, as well as industry leading tools to help you plan your personal development and advance your career. For more information, please visit our website.
Why subscribe?
Spend less time learning and more time coding with practical eBooks and Videos from over 4,000 industry professionals
Improve your learning with Skill Plans built especially for you
Get a free eBook or video every month
Mapt is fully searchable
Copy and paste, print, and bookmark content
Packt.com
Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.packt.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at customercare@packtpub.com for more details.
At www.packt.com , you can also read a collection of free technical articles, sign up for a range of free newsletters, and receive exclusive discounts and offers on Packt books and eBooks.
Contributors
About the author
Adam K. Dean has used Linux since 2005, when he rendered his first computer unbootable during an Ubuntu installation. Undeterred, a subsequent installation was successful, notwithstanding the odd graphical and Wi-Fi issues.
Between bouts of writing about himself in the third person, Adam now runs his own consultancy offering Linux expertise to a range of clients, though he hasn't forgotten his origins, and stil l occasionally renders computers unbootable.
This book wouldn't have been possible without the cumulative effort of a number of people. With that in mind, I'd like to first thank Lucy, for being supportive and understanding of my seemingly erratic life; Sam and Jon, for their excellent feedback on this book; and Martyn, Daj, AJ, Colin, Lath, Rob, and many others I've met in my career, for shaping the engineer I am.
About the reviewer
Donald Tevaultbut you can call him Donniegot involved with Linux way back in 2006, and has been working with it ever since. He holds the Linux Professional Institute Level 3security certification, and the GIAC Incident Handler certification. Donnie is a professional Linux trainer, and thanks to the magic of the internet, teaches Linux classes literally the world over from the comfort of his living room.
Sam Norbury is someone who you never find frowning, at best you'll get a non-informative mmm from his general direction, which gives nothing away as to the inner-workings of his head, or what he thinks of your latest suggestion. Prized for his Ansible knowledge and patience, he now splits his time between consulting and travelling the world, spreading apathy everywhere he goes.
Jon Nield is a senior engineer who's reputation for calm and methodical problem solving has earned him a reputation as one of the most easy-going and nicest guys in tech. Having worked in the computing and server industry for many years, his expertise in areas such as C, and the underpinnings of the Linux operating system, make him a highly-sought consultant.
Packt is searching for authors like you
If you're interested in becoming an author for Packt, please visit authors.packtpub.com and apply today. We have worked with thousands of developers and tech professionals, just like you, to help them share their insight with the global tech community. You can make a general application, apply for a specific hot topic that we are recruiting an author for, or submit your own idea.
Preface
When it comes to servers, there's no more popular OS than Linux and its family of distributions. No matter which company you work for these days, there's a good chance at least part of their infrastructure runs some flavor of Linux.
Because of this, there's never been a better time to get into Linux system administration and engineering (along with the tangentially related disciplines), though I would say that, of course... being a Linux sysadmin.
This book aims to be your reference and guide for certain common tasks in the Linux world, from the mundane and basic to the fun and complex, though anything can be complex if you try hard enough. I hope that, while reading it, you find something new (preferably a lot of new things) and maybe come across suggestions that you wouldn't have come across otherwise.
We're also going to get practical in our work (because just reading about things is boring), using virtual machines throughout to achieve our intended goals.
Who this book is for
This book is for a mixture of people, from the new and inexperienced, to the old and grumpy (like me).
It aims to teach you the basics of what you need to know to get started, while also introducing some real-world examples and suggesting various tips and tricks that you may not know already.
Even if you've been using Linux for a couple of decades, I hope you'll find something in this book that you didn't know, or find enlightening.
Next page