Using and Administering Linux: Volume 1: Zero to SysAdmin: Getting Started, 2nd Edition

This document was uploaded by one of our users. The uploader already confirmed that they had the permission to publish it. If you are author/publisher or own the copyright of this documents, please report to us by using this DMCA report form.

Simply click on the Download Book button.

Yes, Book downloads on Ebookily are 100% Free.

Sometimes the book is free on Amazon As well, so go ahead and hit "Search on Amazon"

Learn to be a Linux sysadmin and an expert user of the Linux operating system, even with no previous Linux experience. This second edition of the popular and highly rated Linux self-study training course has been fully updated to Fedora Linux 37 with expanded and revised content and figures as well new chapters on the BTRFS file system, using Zram for swap, NetworkManager, automation with Ansible, and systemd. Like the previous version, this edition has been reviewed for technical accuracy by a highly respected Linux expert and will prepare you to manage complex systems with ease and equip you for a new career. It has also been reviewed by a student who took this course to ensure its readability and flow for those with little or no previous experience with Linux. In this first volume of the training course series, you will learn about operating systems in general and Linux in particular, and explore the Linux philosophy for SysAdmins in preparation for the rest of the course. This book provides you with the tools necessary for mastering user management; installing, updating, and deleting software; and using command line tools to do performance tuning and basic problem determination. You'll begin by creating a virtual network and installing an instance of Fedora – a popular and powerful Linux distribution – on a VirtualBox VM that can be used for all of the experiments on an existing Windows or Linux computer. You’ll then move on to the basics of using the Xfce GUI desktop and the many tools Linux provides for working on the command line including virtual consoles, various terminal emulators, Bash, and other shells. Explore data streams and the Linux tools used to manipulate them, and learn about the Vim text editor, which is indispensable to advanced Linux users and system administrators and be introduced to some other text editors. You’ll also see how to install software updates and new software, learn additional terminal emulators, and some advanced shell skills. Examine the sequence of events that take place as the computer boots and Linux starts up, configure your shell to personalize it in ways that can seriously enhance your command line efficiency, and delve into files and filesystems. What You Will Learn Install Fedora Linux and basic configuration of the Xfce desktop Access the root user ID, and the care that must be taken when working as root Use Bash and other shells in the Linux virtual consoles and terminal emulators Create and modify system configuration files with Use the Vim text editor Explore administrative tools available to root that enable you to manage users, filesystems, processes, and basic network communications Configure the boot and startup sequences Who This Book Is For Anyone who wants to learn Linux as an advanced user and system administrator at the command line while using the GUI desktop to leverage productivity.

Author(s): David Both
Edition: 2
Publisher: Apress
Year: 2023

Language: English
Pages: 667

Table of Contents
About the Author
About the Technical Reviewers
Acknowledgments
Introduction
Chapter 1: Introduction
Objectives
About Linux
The Birth of Windows
Black Box Syndrome
The Birth of Linux
The Open Box
The Linux Truth
Knowledge
Flexibility
Stability
Scalability
Security
Freedom
Our Software Rights
Longevity
Data
Resist Malware
Should I Be a SysAdmin?
About This Course
About the Experiments
What to Do If the Experiments Do Not Work
Terminology
How to Access the Command Line
Chapter Summary
Exercises
Chapter 2: Introduction to Operating Systems
Objectives
Choice – Really!
What Is an Operating System?
Hardware
Motherboard
The Processor
Hyperthreading
P- and E-Cores
Peripherals
The Operating System
The Definition
Typical Operating System Functions
Memory Management
Multitasking
Multiuser
Process Management
Interprocess Communication
Device Management
Error Handling
Utilities
A Bit of History
Starting with UNICS
UNIX
The Berkeley Software Distribution (BSD)
The Unix Philosophy
A (Very) Brief History of Linux
Core Utilities
GNU Coreutils
util-linux
Copyleft
Games
Chapter Summary
Exercises
Chapter 3: The Linux Philosophy for SysAdmins
Objectives
Background
The Structure of the Philosophy
The Tenets
Data Streams Are a Universal Interface
Transforming Data Streams
Everything Is a File
Use the Linux FHS
Embrace the CLI
Be the Lazy SysAdmin
Automate Everything
Always Use Shell Scripts
Test Early and Test Often
Use Commonsense Naming
Store Data in Open Formats
Use Separate Filesystems for Data
Make Programs Portable
Use Open Source Software
Strive for Elegance
Find the Simplicity
Use Your Favorite Editor
Document Everything
Backup Everything – Frequently
Follow Your Curiosity
There Is No “Should”
Mentor the Young SysAdmins
Support Your Favorite Open Source Project
Reality Bytes
Chapter Summary
Exercises
Chapter 4: Preparation
Objectives
Overview
Got Root?
Hardware Specifications
Host Software Requirements
Installing VirtualBox
Install VirtualBox on a Linux Host
Install VirtualBox on a Windows Host
Creating the VM
VirtualBox Manager
Configuring the Virtual Network
Preparing Disk Space
Windows
Linux
Download the ISO Image File
Creating the VM
Chapter Summary
Exercises
Chapter 5: Installing Linux
Objectives
Overview
Insert the Fedora Live Image
Boot the Live Image
Installing Fedora
Start the Installation
Set the Host Name
User Accounts
Hard Drive Partitioning
About Swap Space
Finish Partitioning
Begin the Installation
Finish the Installation
Shut Down the Live System
Reconfigure the VM
Create a Snapshot
First Boot
What to Do If the Experiments Do Not Work
Chapter Summary
Exercises
Chapter 6: Using the Xfce Desktop
Objectives
Why Xfce
The Desktop
The File Manager
Stability
Xfce4 Terminal Emulator
Configurability
Getting Started
Login
First Look
Exploring the Xfce Desktop
Screensaver
Settings Manager
Adding Launchers to Panel 2
Default Applications
Desktop Appearance
Appearance
Multiple Desktops
Installing Updates
Chapter Summary
Exercises
Chapter 7: Using the Linux Command Line
Objectives
Introduction
Preparation
Defining the Command Line
CLI Terminology
Command Prompt
Command Line
Command-Line Interface
Command
Terminal
Console
Virtual Consoles
Using Virtual Consoles
Terminal Emulator
Pseudo-terminal
Device Special Files
Session
Shell
Using Different Shells
Secure Shell (SSH)
Screen
The GUI and the CLI
Some Important Linux Commands
The PWD
Directory Path Notation Styles
Moving Around the Directory Tree
Tab Completion Facility
Exploring Files
More Commands
Command Recall and Editing
Chapter Summary
Exercises
Chapter 8: Core Utilities
Objectives
GNU Coreutils
util-linux
Chapter Summary
Exercises
Chapter 9: Data Streams
Objectives
Data Streams as Raw Materials
Text Streams: A Universal Interface
STDIO File Handles
Preparing a Logical Volume for Testing
Storage Device Logical Structure
Creating the New Volume
Generating Data Streams
Test a Theory with Yes
The Boot Record
Digging Deeper
Randomness
Pipe Dreams
Building Pipelines
Redirection
Just grepping Around
Chapter Summary
Exercises
Chapter 10: Text Editors
Objectives
Why We Need Text Editors
Vim
Other Editors
Nano
Emacs
gnome-text-editor
gedit
Leafpad
Kate
xfw
xed
Learning Nano
Learning Vim
Setting SELinux to Permissive
Use Your Favorite Text Editor
Chapter Summary
Exercises
Chapter 11: Working as Root
Objectives
Why Root?
More About the su Command
Getting to Know the Root Account
Disadvantages of Root
Escalating User Privilege
The Bad Ways
Using sudo
Do Do That sudo That You Do So Well
The sudoers File
Host Aliases
User Aliases
Command Aliases
Environment Defaults
Command Section
Bypassing Passwords
wheel
Real SysAdmins Don’t sudo
sudo or Not sudo
Valid Uses for sudo
Using su as Root
Chapter Summary
Exercises
Chapter 12: Installing and Updating Software
Objectives
Dependency Hell
RPM
YUM
DNF
Installing Packages
Installing Updates
Post-update Tasks
Removing Packages
Groups
Adding Repositories
Other Software
Installing Zoom
Updating Zoom
About the Kernel
Chapter Summary
Exercises
Chapter 13: Tools for Problem Solving
Objectives
The Art of Problem Solving
The Five Steps of Problem Solving
Knowledge
Observation
Reasoning
Action
Test
System Performance and Problem Solving
top
Summary Section
Load Averages
CPU Usage
Process Section
Things to Look for with CPU Usage
Memory Statistics
The Task List
Signals
Consistency
Other top-Like Tools
htop
atop
More Tools
Memory Tools
Tools That Display Disk I/O Statistics
The /proc Filesystem
Exploring Hardware
Monitoring Hardware Temperatures
Monitoring Storage Drives
System Statistics with SAR
Installation and Configuration
Examining Collected Data
Cleanup
Chapter Summary
Exercises
Chapter 14: Terminal Emulator Mania
Objectives
About Terminals
My Requirements
The Terminal Emulators
rxvt
xfce4-terminal
LXTerminal
Tilix
Konsole
Terminator
Chapter Summary
Exercises
Chapter 15: Advanced Shell Topics
Objectives
The Bash Shell
Shell Options
Shell Variables
Commands
The PATH
Internal Commands
External Commands
Forcing the Use of External Commands
Command-Line Programs
Time-Saving Tools
Brace Expansion
Special Pattern Characters
Sets
Meta-characters
Using grep
Finding Files
Chapter Summary
Exercises
Chapter 16: Linux Boot and Startup
Objectives
Overview
Hardware Boot
The Boot Sector
The MBR
The GPT
Impact
Linux Boot
GRUB
GRUB Stage 1
GRUB Stage 1.5
GRUB Stage 2
Configuring GRUB
Finishing GRUB Boot
The Linux Kernel
Linux Startup
Text-Mode Startup
systemd
Graphical Login Screen
Display Manager
Window Manager
How Do I Deal with All These Choices?
Recovery Mode
When Booting to Rescue Mode Fails
Working in Rescue Mode
About the Login
CLI Login Screen
GUI Login Screen
Chapter Summary
Exercises
Chapter 17: Shell Configuration
Objectives
Starting the Shell
Non-login Shell Startup
Login Shell Startup
Exploring the Global Configuration Scripts
Exploring the Local Configuration Scripts
Testing It
Exploring the Environment
User Shell Variables
Aliases
Chapter Summary
Exercises
Chapter 18: Files, Directories, and Links
Objectives
Introduction
Preparation
User Accounts and Security
File Attributes
File Ownership
File Permissions
Directory Permissions
Implications of Group Ownership
umask
Changing File Permissions
Applying Permissions
Timestamps
File Meta-structures
The Directory Entry
The inode
File Information
Links
Hard Links
Locating Files with Several Hard Links
Symbolic (Soft) Links
Chapter Summary
Exercises
Chapter 19: Filesystems
Objectives
Overview
Definitions
Filesystem
Storage
Filesystem Functions
The Linux Filesystem Hierarchical Standard
The Standard
Problem Solving
Using the Filesystem Incorrectly
Adhering to the Standard
Linux Unified Directory Structure
Filesystem Types
Mounting
The Linux EXT4 Filesystem
Cylinder Groups
The inode
Journal
Data Allocation Strategies
Data Fragmentation
Repairing Problems
The /etc/fstab File
Repairing Damaged Filesystems
Using a Fedora Live USB Device for System Recovery
Recovery Mode Using a Live USB Image
Finding Lost Files
Creating a New Filesystem
Finding Space
Add a New Virtual Hard Drive
Other Filesystems
Chapter Summary
Exercises
Index