Download full Using and Administering Linux Volume 1: From Zero to Linux Sysadmin Self-Study Both ebook all chapters
Download full Using and Administering Linux Volume 1: From Zero to Linux Sysadmin Self-Study Both ebook all chapters
com
https://textbookfull.com/product/using-and-administering-
linux-volume-1-from-zero-to-linux-sysadmin-self-study-both/
OR CLICK BUTTON
DOWNLOAD NOW
https://textbookfull.com/product/using-and-administering-linux-
volume-2-zero-to-sysadmin-advanced-topics-both/
textboxfull.com
https://textbookfull.com/product/linux-and-lpic-1-guide-to-linux-
certification-5th-edition-jason-w-eckert/
textboxfull.com
https://textbookfull.com/product/the-linux-devops-handbook-customize-
and-scale-your-linux-distributions-to-accelerate-your-devops-workflow-
wojslaw/
textboxfull.com
Mastering Linux Shell Scripting a practical guide to Linux
command line Bash scripting and Shell programming Ebrahim
https://textbookfull.com/product/mastering-linux-shell-scripting-a-
practical-guide-to-linux-command-line-bash-scripting-and-shell-
programming-ebrahim/
textboxfull.com
https://textbookfull.com/product/linux-for-developers-jumpstart-your-
linux-programming-skills-william-bo-rothwell/
textboxfull.com
David Both
Using and Administering Linux: Volume 1
David Both
Raleigh, NC, USA
Introduction�����������������������������������������������������������������������������������������������������������xxv
Chapter 1: Introduction�������������������������������������������������������������������������������������������� 1
Objectives������������������������������������������������������������������������������������������������������������������������������������� 1
About Linux����������������������������������������������������������������������������������������������������������������������������������� 1
The birth of Windows�������������������������������������������������������������������������������������������������������������������� 3
Black box syndrome���������������������������������������������������������������������������������������������������������������� 3
The birth of Linux�������������������������������������������������������������������������������������������������������������������� 5
The open box��������������������������������������������������������������������������������������������������������������������������� 6
The Linux Truth������������������������������������������������������������������������������������������������������������������������������ 7
Knowledge������������������������������������������������������������������������������������������������������������������������������� 8
Flexibility��������������������������������������������������������������������������������������������������������������������������������� 9
Stability��������������������������������������������������������������������������������������������������������������������������������� 10
Scalability������������������������������������������������������������������������������������������������������������������������������ 11
Security��������������������������������������������������������������������������������������������������������������������������������� 11
Freedom�������������������������������������������������������������������������������������������������������������������������������� 12
Longevity������������������������������������������������������������������������������������������������������������������������������� 13
Should I be a SysAdmin?������������������������������������������������������������������������������������������������������������ 15
About this course������������������������������������������������������������������������������������������������������������������������ 17
About the experiments���������������������������������������������������������������������������������������������������������������� 18
What to do if the experiments do not work��������������������������������������������������������������������������������� 20
Terminology�������������������������������������������������������������������������������������������������������������������������������� 21
v
Table of Contents
vi
Table of Contents
vii
Table of Contents
Chapter 4: Preparation������������������������������������������������������������������������������������������� 71
Objectives����������������������������������������������������������������������������������������������������������������������������������� 71
Overview������������������������������������������������������������������������������������������������������������������������������������� 71
Got root?������������������������������������������������������������������������������������������������������������������������������������� 72
Hardware specifications������������������������������������������������������������������������������������������������������������� 73
Host software requirements������������������������������������������������������������������������������������������������������� 74
Installing VirtualBox�������������������������������������������������������������������������������������������������������������������� 75
Install VirtualBox on a Linux host������������������������������������������������������������������������������������������ 75
Install VirtualBox on a Windows host������������������������������������������������������������������������������������� 82
Creating the VM��������������������������������������������������������������������������������������������������������������������������� 86
VirtualBox Manager��������������������������������������������������������������������������������������������������������������� 86
Configuring the virtual network��������������������������������������������������������������������������������������������� 88
Preparing disk space������������������������������������������������������������������������������������������������������������� 90
Download the ISO image file����������������������������������������������������������������������������������������������� 104
Creating the VM������������������������������������������������������������������������������������������������������������������� 105
Chapter summary��������������������������������������������������������������������������������������������������������������������� 114
Exercises����������������������������������������������������������������������������������������������������������������������������������� 115
ix
Table of Contents
Preparation������������������������������������������������������������������������������������������������������������������������������� 182
Defining the command line������������������������������������������������������������������������������������������������������� 183
CLI terminology������������������������������������������������������������������������������������������������������������������������� 183
Command prompt���������������������������������������������������������������������������������������������������������������� 184
Command line��������������������������������������������������������������������������������������������������������������������� 184
Command-line interface������������������������������������������������������������������������������������������������������ 184
Command���������������������������������������������������������������������������������������������������������������������������� 185
Terminal������������������������������������������������������������������������������������������������������������������������������� 185
Console�������������������������������������������������������������������������������������������������������������������������������� 187
Virtual consoles������������������������������������������������������������������������������������������������������������������� 188
Terminal emulator��������������������������������������������������������������������������������������������������������������� 195
Pseudo-terminal������������������������������������������������������������������������������������������������������������������ 196
Session�������������������������������������������������������������������������������������������������������������������������������� 197
Shell������������������������������������������������������������������������������������������������������������������������������������ 198
Secure Shell (SSH)�������������������������������������������������������������������������������������������������������������� 201
screen���������������������������������������������������������������������������������������������������������������������������������� 201
The GUI and the CLI������������������������������������������������������������������������������������������������������������������� 204
Some important Linux commands�������������������������������������������������������������������������������������������� 205
The PWD������������������������������������������������������������������������������������������������������������������������������ 206
Directory path notation styles��������������������������������������������������������������������������������������������� 206
Moving around the directory tree���������������������������������������������������������������������������������������� 207
Tab completion facility�������������������������������������������������������������������������������������������������������� 212
Exploring files���������������������������������������������������������������������������������������������������������������������� 214
More commands������������������������������������������������������������������������������������������������������������������ 217
Command recall and editing����������������������������������������������������������������������������������������������������� 220
Chapter summary��������������������������������������������������������������������������������������������������������������������� 223
Exercises����������������������������������������������������������������������������������������������������������������������������������� 223
x
Table of Contents
xi
Table of Contents
xii
Table of Contents
xiii
Table of Contents
xiv
Table of Contents
xv
Table of Contents
Aliases�������������������������������������������������������������������������������������������������������������������������������������� 508
Chapter summary��������������������������������������������������������������������������������������������������������������������� 510
Exercises����������������������������������������������������������������������������������������������������������������������������������� 510
xvi
Table of Contents
Bibliography��������������������������������������������������������������������������������������������������������� 609
Books���������������������������������������������������������������������������������������������������������������������������������������� 609
Web sites���������������������������������������������������������������������������������������������������������������������������������� 610
Index��������������������������������������������������������������������������������������������������������������������� 615
xvii
About the Author
David Both is an open source software and GNU/Linux
advocate, trainer, writer, and speaker. He has been working
with Linux and open source software for more than 20 years
and has been working with computers for over 45 years.
He is a strong proponent of and evangelist for the “Linux
Philosophy for System Administrators.” David has been in
the IT industry for over 40 years.
Mr. Both worked for IBM for 21 years and, while working
as a Course Development Representative in Boca Raton, FL,
in 1981, wrote the training course for the first IBM PC. He
has taught RHCE classes for Red Hat and has worked at MCI
WorldCom, Cisco, and the State of North Carolina. In most
of the places he has worked since leaving IBM in 1995, he has taught classes on Linux
ranging from Lunch’n’Learns to full five-day courses. Helping others learn about Linux
and open source software is one of his great pleasures.
David prefers to purchase the components and build his own computers from
scratch to ensure that each new computer meets his exacting specifications. Building
his own computers also means not having to pay the Microsoft tax. His latest build is an
ASUS TUF X299 motherboard and an Intel i9 CPU with 16 cores (32 CPUs) and 64GB of
RAM in a ThermalTake Core X9 case.
He has written articles for magazines including Linux Magazine, Linux Journal, and
OS/2 back when there was such a thing. His article “Complete Kickstart,” co-authored
with a colleague at Cisco, was ranked 9th in the Linux Magazine Top Ten Best System
Administration Articles list for 2008. He currently writes prolifically and is a volunteer
community moderator for Opensource.com. He particularly enjoys learning new things
while researching his articles.
David currently lives in Raleigh, NC, with his very supportive wife and a strange rescue
dog that is mostly Jack Russell. David also likes reading, travel, the beach, old M*A*S*H
reruns, and spending time with his two children, their spouses, and four grandchildren.
David can be reached at LinuxGeek46@both.org or on Twitter @LinuxGeek46.
xix
About the Technical Reviewer
Jason Baker has been a Linux user since the early 2000s,
ever since stuffing a Slackware box under his desk and
trying to make the darn thing work. He is a writer and
presenter on a variety of open source projects and
technologies, much of which can be found on Opensource.
com. A Red Hat Certified Systems Administrator, he is
currently the managing editor of Enable SysAdmin, Red
Hat’s community publication for system administrators.
When he’s not at work, he enjoys tinkering with hardware
and using open source tools to play with maps and other
visualizations of cool data sets. He lives in Chapel Hill, NC,
with his wife, Erin, and their rescue cat, Mary.
xxi
Acknowledgments
Writing a book is not a solitary activity, and this massive three-volume Linux training
course required a team effort so much more than most.
The most important person in this effort has been my awesome wife, Alice, who
has been my head cheerleader and best friend throughout. I could not have done this
without your support and love.
I am grateful for the support and guidance of Louise Corrigan, senior editor for open
source at Apress, who believed in me and my vision for this book. This book would not
have been possible without her.
To my coordinating editor, Nancy Chen, I owe many thanks for her hours of work,
guidance, and being there to discuss many aspects of this book. As it grew and then
continued to grow some more, our discussions were invaluable in helping to shape the
final format of this work.
And to Jim Markham, my development editor, who quietly kept an eye and a guiding
hand on the vast volume of material in these three volumes to ensure that the end result
would meet the needs of you – my readers – and most importantly, you as the student.
Jason Baker, my intrepid technical reviewer, has done an outstanding job to ensure
the technical accuracy of the first two volumes and part of the third volume of this
course. Due to the major changes made in some parts of the course as its final form
materialized, he retested some chapters in their entirety to help ensure that I had not
screwed anything up. Jason also made important suggestions that have significantly
enhanced the quality and scope of the entire three-volume work. These volumes are
much better for his contributions. Jason’s amazing work and important contributions to
this book and the course of which it is part have helped to make it far better than it might
have been.
Of course any remaining errors and omissions are my responsibility alone.
xxiii
Introduction
First, thank you for purchasing Using and Administering Linux: Volume 1 – Zero to
SysAdmin: Getting Started. The Linux training course upon which you have embarked is
significantly different from other training that you could purchase to learn about Linux.
xxv
Introduction
I have always found that I learn more from my mistakes than I ever have when things
work as they are supposed to. For this reason I suggest that rather than immediately
reverting to an earlier snapshot when you run into trouble, you try to figure out how the
problem was created and how best to recover from it. If, after a reasonable period of
time, you have not resolved the problem, that would be the point at which reverting to a
snapshot would make sense.
Inside, each chapter has specific learning objectives, interactive experiments,
and review exercises that include both hands-on experiments and some review
questions. I learned this format when I worked as a course developer for IBM from
1978 through 1981. It is a tried and true format that works well for self-study.
These course materials can also be used as reference materials. I have used my
previous course materials for reference for many years, and they have been very useful in
that role. I have kept this as one of my goals in this set of materials.
Note Not all of the review exercises in this course can be answered by simply
reviewing the chapter content. For some questions you will need to design
your own experiment in order to find a solution. In many cases there will very
probably be multiple solutions, and all that produce the correct results will be the
“correct” ones.
Process
The process that goes with this format is just as important as the format of the course –
really even more so. The first thing that a course developer must do is generate a list of
requirements that define both the structure and the content of the course. Only then can
the process of writing the course proceed. In fact, many times I find it helpful to write the
review questions and exercises before I create the rest of the content. In many chapters
of this course, I have worked in this manner.
These courses present a complete, end-to-end Linux training course for students
like you who know before you start that you want to learn to be a Linux system
administrator – a SysAdmin. This Linux course will allow you to learn Linux right from
the beginning with the objective of becoming a SysAdmin.
xxvi
Introduction
Many Linux training courses begin with the assumption that the first course a
student should take is one designed to start them as users. Those courses may discuss
the role of root in system administration but ignore topics that are important to future
SysAdmins. Other courses ignore system administration altogether. A typical second
course will introduce the student to system administration, while a third may tackle
advanced administration topics.
Frankly, this baby step approach did not work well for many of us who are now Linux
SysAdmins. We became SysAdmins, in part at least, due to our intense desire – our deep
need – to learn as much as possible as quickly as possible. It is also, I think in large part,
due to our highly inquisitive natures. We learn a basic command and then start asking
questions, experimenting with it to see what its limits are, what breaks it, and what
using it can break. We explore the man(ual) pages and other documentation to learn the
extreme usages to which it might be put. If things don’t break by themselves, we break
them intentionally to see how they work and to learn how to fix them. We relish our own
failures because we learn more from fixing them than we do when things always work as
they are supposed to.
In this course we will dive deep into Linux system administration almost from the
very beginning. You will learn many of the Linux tools required to use and administer
Linux workstations and servers – usually multiple tools that can be applied to each of
these tasks. This course contains many experiments to provide you with the kind of
hands-on experiences that SysAdmins appreciate. All of these experiments guide you
one step at a time into the elegant and beautiful depths of the Linux experience. You will
learn that Linux is simple and that simplicity is what makes it both elegant and knowable.
Based on my own years working with Unix and Linux, the course materials contained
in these three volumes are designed to introduce you to the practical, daily tasks you
will perform as a Linux user and, at the same time, as a Linux system administrator –
SysAdmin. But I do not know everything – that is just not possible – no SysAdmin does.
Further, no two SysAdmins know exactly the same things because that too is impossible.
We have each started with different knowledge and skills; we have different goals; we
have different experiences because the systems on which we work have failed in different
ways, had different hardware, were embedded in different networks, had different
distributions installed, and have many other differences. We use different tools and
approaches to problem solving because the many different mentors and teachers we
had used different sets of tools from each other; we use different Linux distributions; we
think differently; and we know different things about the hardware on which Linux runs.
Our past is much of what makes us what we are and what defines us as SysAdmins.
xxvii
Introduction
So I will show you things in this course – things that I think are important for you
to know – things that, in my opinion, will provide you with the skills to use your own
curiosity and creativity to find solutions that I would never think of to problems I have
never encountered.
Content overview
Because there are three volumes to this course, and because I reference other chapters,
some of which may be in other volumes, we need a method for specifying in which
volume the referenced material exists. If the material is in another volume, I will always
specify the volume number, that is, “Chapter 2 in Volume 3,” or “Volume 2, Chapter 5.” If
the material is in the same volume as the reference to it, I may simply specify the chapter
number; however I may also reference the current volume number for clarity.
This quick overview of the contents of each volume should serve as a quick
orientation guide if you need to locate specific information. If you are trying to decide
whether to purchase this book and its companion volumes, it will give you a good
overview of the entire course.
xxviii
Introduction
4. Preparation
5. Installing Linux
1
Both, David, The Linux Philosophy for SysAdmins, Apress, 2018
xxix
Introduction
8. Core Utilities
9. Data Streams
19. Filesystems
xxx
Introduction
Chapters 9 through 11 show you how to do some simple – and not so simple –
command-line programming and how to automate various administrative tasks.
You will begin to learn the details of networking in Chapter 12, and Chapters 13
through 15 show you how to manage the many services that are required in a Linux
system. You will also explore the underlying software that manages the hardware and
can detect when hardware devices such as USB thumb drives are installed and how the
system reacts to that.
Chapter 16 shows you how to use the logs and journals to look for clues to problems
and confirmation that things are working correctly.
Chapters 17 and 18 show you how to enhance the security of your Linux systems,
including how to perform easy local and remote backups.
2. File Managers
3. Everything Is a File
4. Managing Processes
5. Special Filesystems
6. Regular Expressions
7. Printing
8. Hardware Detection
9. Command-Line Programming
12. Networking
13. systemd
17. Security
18. Backups
xxxi
Introduction
xxxii
Introduction
Finally, Chapter 18 will get you started in the right direction because I know you are
going to ask, “Where do I go from here?”
1. Preparation
2. Server Configuration
3. DHCP
7. Introducing E-mail
8. E-mail Clients
9. Combating Spam
11. WordPress
16. Security
17. Advanced Package Management
xxxiii
Another Random Scribd Document
with Unrelated Content
covering of verdant trees and shrubs, swarming in wild profusion, the
hand of man having in few places contributed its aid.
“Hail, Source of beings! Universal Soul
Of Heav’n and Earth! Essential Presence, hail!
To Thee I bend the knee: to Thee my thoughts
Continual climb, who with a master hand
Hast the great whole into perfection touch’d.”
Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.
textbookfull.com