Practical Linux System Administration
by Ken Hess
Copyright 2022 Hess Media and Consulting, LLC. All rights reserved.
Printed in the United States of America.
Published by OReilly Media, Inc. , 1005 Gravenstein Highway North, Sebastopol, CA 95472.
OReilly books may be purchased for educational, business, or sales promotional use. Online editions are also available for most titles (http://oreilly.com). For more information, contact our corporate/institutional sales department: 800-998-9938 or corporate@oreilly.com .
- Acquisitions Editor: John Devins
- Development Editor: Jeff Bleiel
- Production Editor: Gregory Hyman
- Interior Designer: David Futato
- Cover Designer: Karen Montgomery
- Illustrator: Kate Dullea
- August 2023: First Edition
Revision History for the Early Release
- 2021-08-31: First Release
- 2021-10-29: Second Release
- 2021-12-09: Third Release
- 2022-01-24: Fourth Release
- 2022-03-03: Fifth Release
- 2022-05-19: Sixth Release
- 2022-06-28: Seventh Release
- 2022-08-09: Eighth Release
- 2022-09-19: Ninth Release
- 2022-11-01: Tenth Release
- 2022-12-05: Eleventh Release
- 2022-12-13: Twelfth Release
- 2023-01-27: Thirteenth Release
See http://oreilly.com/catalog/errata.csp?isbn=9781098109035 for release details.
The OReilly logo is a registered trademark of OReilly Media, Inc. Practical Linux System Administration, the cover image, and related trade dress are trademarks of OReilly Media, Inc.
The views expressed in this work are those of the author, and do not represent the publishers views. While the publisher and the author have used good faith efforts to ensure that the information and instructions contained in this work are accurate, the publisher and the author disclaim all responsibility for errors or omissions, including without limitation responsibility for damages resulting from the use of or reliance on this work. Use of the information and instructions contained in this work is at your own risk. If any code samples or other technology this work contains or describes is subject to open source licenses or the intellectual property rights of others, it is your responsibility to ensure that your use thereof complies with such licenses and/or rights.
978-1-098-10903-5
Chapter 1. Getting started with Linux
A Note for Early Release Readers
With Early Release ebooks, you get books in their earliest formthe authors raw and unedited content as they writeso you can take advantage of these technologies long before the official release of these titles.
This will be the first chapter of the final book.
If you have comments about how we might improve the content and/or examples in this book, or if you notice missing material within this chapter, please reach out to the author at .
Linux system administration means different things to different people. Administration, for this book, means the daily actions that a Linux system administrator must take to manage and support users, maintain system health, implement best practices for security, install software, and perform housekeeping tasks. This chapter covers Linux installation, initial setup, and system exploration using simple shell commands.
Youll spend a significant portion of your time at the command line, also known as the command line interface (CLI). Linux system administrators rarely install or use graphic user interfaces (GUIs) on their supported server systems. This chapter introduces you to the CLI and some simple commands to navigate the filesystem, locate important files, and familiarize yourself with the Linux CLI.
Installing Linux
One of the first things every Linux system administrator (sysadmin) learns is how to install Linux. Theres no single correct way to install Linux, but a few guidelines and suggestions will make your life easier as your users needs change.
While this section wont go into detailed step-by-step instructions on installing Linux, the basic steps are outlined here. For most junior-level sysadmins, system installation generally occurs via automated means such as Kickstart or another enterprise-level delivery system.
Preparing your system for Linux
If this is your first time installing Linux, I suggest that you install it into a virtual machine (VM) so that you dont have to dedicate an entire piece of hardware for a learning system and so that you dont potentially render your system inoperable by attempting to install Linux in parallel to your current system creating a multi-boot computer. (Setting up multi-booting is a more advanced concept and is out of the scope of this book.)
If you dont already have it installed, a good place to start with virtualization is to download and install the latest version of VirtualBox (https://www.virtualbox.org/). VirtualBox is an application that allows your current computer to act as a virtual machine host system where you may install virtual guests, such as Linux, into a separate functioning computer system. Virtualbox runs on various host operating systems (OSs) and supports various guest operating systems, including Linux. The host OS and guest OS can be different from one another. Your computer (host OS) can be a Windows, Mac, or Linux-based system but have guest Linux systems installed on it as VirtualBox VMs.
Downloading and installing Linux
Next, youll need to select a Linux distribution (distro) to install so that you can practice issuing commands, changing configurations, rebooting, installing software, creating users, and so on. I suggest you select a Linux distro based on the one your current employer uses. If your company doesnt use Linux yet or youre not employed in a system administrator role, then select from one of the popular distributions described below:
Debian (https://www.debian.org/) - Debian is a top-level distribution from which many other distributions are derived. Debian is community-supported, open source, and free.
OpenSUSE (https://www.opensuse.org/) - OpenSUSE is a community-supported, top-level distribution with many faithful followers worldwide. Its commercial version SUSE Linux Enterprise has widespread adoption.
Red Hat Enterprise Linux (https://www.redhat.com/) - Red Hat is a commercially-supported Linux that enjoys worldwide enterprise adoption and is now owned by IBM.
Ubuntu (https://ubuntu.com/) - Ubuntu is a very popular, Debian-derived community and commercially-supported distribution. Ubuntu also offers ready-made VirtualBox (and other) virtual machines to help you get a quick start.
The downloaded ISO file is a bootable Linux image. You dont have to do anything to it if you use it to create a virtual machine. A virtual machine will boot from the ISO image and begin the installation process. After configuring your virtual machine in VirtualBox, select Settings from the Oracle VM VirtualBox Manager, as shown in .
Figure 1-1. The Oracle VirtualBox Manager application and a configured virtual machine.
Then, select Storage, as shown in .