This essential guide covers all aspects of Linux system administration, from user maintenance, backups, filesystem housekeeping, storage management, and network setup to hardware and software troubleshooting and some application management. It's both a practical daily reference manual for sysadmins and IT pros and a handy study guide for those taking Linux certification exams.
You'll turn to it frequently, not only because of the sheer volume of valuable information it provides but because of the real-world examples within and the clear, useful way the information is presented. With this book at your side, you'll be able to:
• Install Linux and perform initial setup duties, such as connecting to a network
• Navigate the Linux filesystem via the command line
• Install software from repositories and source and satisfy dependencies
• Set permissions on files and directories
• Create, modify, and remove user accounts
• Set up networking
• Format and mount filesystems
• Perform basic troubleshooting on hardware and software
• Create and manage logical volumes
• Work with SELinux
• Manage a firewall and iptables
• Shut down, reboot, and recover a system
• Perform backups and restores
Author(s): Kenneth Hess
Edition: 1
Publisher: O'Reilly Media
Year: 2023
Language: English
Commentary: Revision History for the First Edition: 2023-04-18: First Release || NOTE: TOC is broken; Index and Preface links are OK though.
Pages: 246
City: Sebastopol, CA
Tags: Linux; Operating System Administration; User Accounts Management; Network Management; Software Management; Storage Management; System Monitoring; Scripting; Automation; Samba; System Security
Preface
Who Should Read This Book
Why I Wrote This Book
Navigating This Book
Conventions Used in This Book
Using Code Examples
O’Reilly Online Learning
How to Contact Us
Acknowledgments
1. Getting Started with Linux
Installing Linux
Preparing Your System for Linux
Downloading and Installing Linux
Getting to Know Your New Linux System
Learning the CLI
pwd
cd
ls
Starting, Rebooting, and Shutting Down a Linux System
Starting a System
Restarting a System
Shutting Down a System
Summary
2. Working with Permissions and Privileged Accounts
Working as a Regular User
Working as the Root User
Logging in as Root
Using the su Command
Using the sudo Command
Creating a Sudoer
Reading and Modifying Permissions
Read, Write, and Execute
Numerical Permission Values
Group Permissions
Bringing Permissions into Focus
Changing File Permissions
Symbolic Mode
Numeric Mode
Default Permissions Explained: umask
Summary
3. Customizing the User Experience
Altering Home Directory Options
Login Versus Nonlogin Shells
/etc/bashrc
/etc/profile
.bashrc
.bash_profile
.bash_logout
The /etc/skel Directory
Customizing the Shell Prompt
Summary
4. Managing Users
User and Group ID Numbering Conventions
Creating User Accounts
Adding Users with useradd
Adding Users with adduser
Modifying User Accounts
Adding a Supplementary Group
Changing the User Comments Field
Setting an Expiration (Expiry) Date on an Account
Changing a User’s Login Shell
Removing User Accounts
Forcing Password Changes
Handling Service Accounts
Managing Groups Rather Than Users
Summary
5. Connecting to a Network
Plugging into a Network
Static IP Addressing
Dynamic IP Addressing
Networking and Security
Preparing a System for Network Connectivity
Pruning Your Systems
Securing Network Daemons
The Secure Shell Daemon
Summary
6. Installing and Uninstalling Software
Updating Your System
Applying Red Hat Enterprise Linux–Based System Updates
Applying Debian-Based System Updates
Installing Software from Repositories
Installing an Application
Uninstalling an Application
Installing and Uninstalling Individual Software Packages
Installing an Individual Software Package Manually
Uninstalling Individual Software Packages
Finding Package Dependencies
Installing Software from Source Code
Satisfying Prerequisites: Building a Development Environment
Download, Extract, Compile, and Install Your Software
Uninstalling a Source-Installed Software Package
Summary
7. Managing Storage
Administering Linux Storage
Disks
Filesystems
Mounting and Mount Points
Physical and Logical Volumes
Checking Space
Swap Space
RAM-Based Temporary Space (ramfs and tmpfs)
Adding a New Disk to a System
Installing the Disk
Prepping the Disk for Use
Implementing Logical Volumes
Decommissioning and Disk Disposal
Notification
Scream Test
Power Down
Disk Wiping
Unracking and Palletizing
Disposal
Summary
8. Maintaining System Health
Keeping Your System Clutter-Free
Cleaning the /tmp Directory
Making /home a Livable Space for Everyone
Decluttering Shared Directories
Deduplicating Files with fdupes
Tackling /home File Sprawl with Quotas
Patching Your Way to a Healthy System
Patching a Red Hat Enterprise Linux–Based System
Patching a Debian-Based Linux System
Securing Your Systems
Maintaining User and Group Accounts
Setting Up a Naming Convention
Creating Account Retention Policies
Retiring Group Accounts
Monitoring System Health
Gathering System Activity Reports
Formatting System Activity Reports
Summary
9. Monitoring Your System
Maintaining Vigilance on CPU, Memory, and Disk Performance and Capacity
Tracking CPU Usage
Exploring sysstat Monitoring
Reporting System Activity
Displaying System Activity Data in Multiple Formats
Monitoring System I/O Device Loading with iostat
Kicking It Old-School with the tapestat Utility
Collecting Processor Statistics
Monitoring Linux Tasks with pidstat
Watching Windows-Compatible Filesystem Statistics with cifsiostat
Summary
10. Scripting and Automation
Answering the Question: Why Automate?
Automating Yourself Out of a Job
Creating Scripts
Outlining Your Scripts
Writing a Script from an Outline
Scheduling Tasks
Using cron to Schedule Tasks
Preventing Time Drift with the Network Time Protocol
Summary
11. Deploying Samba for Windows Compatibility
Planning Your Samba Environment
Installing Samba and Its Dependencies
Adding Samba Users to Your System
Managing Samba Users as a Group
Providing Services to Mac and Windows Clients
Serving Network Storage to Desktop Clients
Configuring a Shared Directory
Browsing for Shared Directories
Mounting Windows System’s Shares
Summary
12. Troubleshooting Linux
Reviving the Operating System
De-escalating a Kernel Panic
Scraping System Logs
Unraveling Software Problems
Inspecting System Logs
Checking Application Logs
Leveraging Internal Application Checks
Managing Firewalls and Their Rules
Removing and Reinstalling Software
Rebooting Your System
Dealing with Hardware Failures
Preemptively Troubleshooting Hardware
Gathering System Hardware Information
Creating Automated Security Checks
Summary
13. Securing Your System
Protecting the Root Account
Finding the Balance Between Security and Usability
Minimizing Your System’s Attack Surface
Creating and Securing User Accounts
Implementing Advanced Security Measures
Applying STIG Security Controls
Installing and Using Security Tools
Responding to Security Incidents
Creating a Written Security Policy
Confirming the Breach
Identifying the Malicious Actor(s)
Taking Corrective Actions
Summary
14. Continuing Your Education
Training Internally
Seeking Certification
Preparing for a Certification Exam
Taking the Exam
Educating Yourself
Formalizing Your Education
Using Your Job as Education
Summary
15. Making Career Moves
Starting Your Own Business
Facing Self-Employment Realities
Managing Employees
Hiring Contractors
Moving into Corporate Management
Challenging Yourself
Managing Your New Role
Changing with the Job Market
Searching Online Job Boards
Working Remotely
Learning How to Communicate
Leaving Your Current Position
Writing the Resignation Letter
Leaving Your Job
Summary
Index
About the Author