Philosophy and Concepts / Introduction
Background
Quick Guide (For the Impatient)
Installation Methods
Using Live Media Instead of a Full Install
Installing with a Hypervisor and Virtual Machine
Performing a Native Linux Installation
Disk Space and Partitioning
More About Linux History
Linux Philosophy Overview
Linux Basics and System Startup / The Boot Process
The Boot Process
BIOS – The Initial Step
Master Boot Record (MBR), EFI Partition, and Boot Loader
Boot Loader Operation
Initial RAM Disk
Text-Mode Login
Linux Basics and System Startup / Kernel, init and Services
The Linux Kernel
/sbin/init and Services
Startup Alternatives
systemd Features
Lab: Apache Web Server Status
Linux Basics and System Startup / Linux Distribution Installation
Determining which Linux distribution to deploy requires thoughtful planning. The figure shows some, but not all, choices. Note that many embedded Linux systems use custom-crafted contents rather than Android or Yocto.
Questions to Ask When Choosing a Distribution
Linux Installation: Planning
Linux Installation: Software Choices
Linux Installation: Install Source
Linux Installation: The Process
IMPORTANT!
Graphical Interface / Graphical Desktop
Graphical Desktop
X Window System
More About the Graphical Desktop
GUI Startup
GNOME Desktop Environment
Graphical Desktop Background
gnome-tweaks
Changing the Theme
Customizing the Desktop
Solution
Graphical Interface / Session Management
Locking the Screen
Switching Users
Shutting Down and Restarting
Shutting Down and Restarting on GNOME
Suspending
Suspending the System
Graphical Interface / Basic Operations
Basic Operations
Locating Applications
Default Applications
File Manager
Home Directories
Viewing Files
Searching for Files
More About Searching for Files
Removing a File
More About Removing a File
Lab: Viewing File Sort Options
Lab: Recovering Deleted Files
System Configuration from the Graphical Interface / System, Display, Date and Time Settings
System Settings
System Settings Menus
gnome-tweaks
Display Settings
Setting Resolution and Configuring Multiple Screens
Date and Time Settings
Network Time Protocol
Lab: Getting and Setting Screen Resolution
Lab Solution
Lab: Working with Time Settings
Lab: Solution
Configuration from the Graphical Interface / Network Manager
Network Configuration
Wired and Wireless Connections
Configuring Wireless Connections
Mobile Broadband and VPN Connections
Lab: Managing Network Connections
Lab: Solution
System Configuration from the Graphical Interface / Installing and Updating Software
Installing and Updating Software
Debian Packaging
Red Hat Package Manager (RPM)
openSUSE’s YaST Software Management
Lab: Installing and Removing Software Packages
Lab: Solution
Common Applications / Internet Applications
You have finished Chapter 5. Here are the main points covered:
Basic system and desktop settings can be managed through the System Settings panel.
Linux internally keeps time based on Coordinated Universal Time (UTC).
You can adjust the date and time through the System Settings.
Network Time Protocol (NTP) is the most widely used and reliable method to synchronize local time using Internet servers.
The Displays settings panel lets you change screen resolution and configure multiple monitors.
Network Manager shows available wireless networks, allows connection to wireless or mobile broadband, manages passwords, and configures VPN connections.
The most common package management systems on Linux are dpkg and RPM.
Debian-based systems use dpkg and apt tools for package management.
RPM was developed by Red Hat and has been adopted by many other distributions.
Learning Objectives
Internet Applications
Web Browsers
Email Applications
Other Internet Applications
Common Applications / Productivity and Development Applications
Office Applications
LibreOffice Components
Development Applications
Common Applications / Multimedia Applications
Sound Players (Audio Applications)
Movie Players (Video Playback Applications)
Movie Editors (Video Editing Applications)
GIMP (GNU Image Manipulation Program)
GIMP (GNU Image Manipulation Program)
Additional Graphic Utilities
Lab: Checking Installed Applications on Your System
Lab: Solution
Command Line Operations / Command-Line Mode Options
Introduction to the Command Line
Using a Terminal on a Desktop Environment
Launching Terminal Windows
Basic Command Line Utilities
Understanding the Command Line Format
Using sudo for Administrative Access
Switching Between GUI and CLI
Virtual Terminals (VTs)
Turning the Graphical Interface On and Off
Lab: Killing the Graphical User Interface
Command Line Operations / Basic Operations
Basic Operations in the Command Line
Logging In and Out
Logging Into a Remote System (SSH)
Rebooting and Shutting Down the System
Locating Applications
Accessing Directories
Try It Yourself: Navigating Directories
Understanding Absolute and Relative Paths
Relative Paths
Exploring the Filesystem
Hard Links
Soft (Symbolic) Links
Navigating Directory History
Lab: Locating Applications
Command Line Operations / Working with Files
Linux provides a wide range of commands for working with files. These commands allow you to view file contents, create new or empty files, modify timestamps, and move, rename, or delete files and directories. Using these tools effectively helps you manage your data, keep your filesystem organized, and ensure the right files are in the right places.
Viewing Files
Creating Files and Changing Timestamps
Creating and Deleting Directories
Moving, Renaming, and Deleting Files
Working with Directories
Changing the Command Prompt
Lab: Practice Exercise
Command Line Operations / Installing Software
The core parts of a Linux distribution and most of its add-on software are installed via the Package Management System. Each package contains the files and other instructions needed to make one software component work well and cooperate with the other components that comprise the entire system. Packages can depend on each other. For example, a package for a web-based application written in Python will require the appropriate Python packages to be installed first.
There are two broad families of package managers widely deployed: those based on Debian and those which use RPM as their low-level package manager. The two systems are incompatible but, broadly speaking, provide the same essential features and satisfy the same needs. In addition, there are some other systems used by more specialized Linux distributions.
In this section, you will learn how to install, remove, or search for packages from the command line using these two package management systems.
Package Managers: Two Levels
Working With Different Package Management Systems
Lab: Installing and Removing Software Packages
Lab: Solution
Linux Documentation Sources
Linux Documentation Sources
Finding Linux Documentation / The man pages
The Man Pages
The man Command
Manual Sections (Chapters)
Lab Working with man
Lab Solution
Finding Linux Documentation / GNU Info
The GNU Info System: Key Concepts
Using info from the Command Line
Lab: Working with info
Finding Linux Documentation / The –help Option and help Command
The –help Option
The help Command
Lab: Using Help in the Command Line
Finding Linux Documentation / Other Documentation Sources
Beyond man, info, and help, there are several other ways to access Linux documentation.
Graphical Help Systems
Package Documentation
Online Resources
Lab: Using the Graphical Help System
Processes / Introduction to Processes and Process Attributes
What Is a Process?
Types of Processes
Process States and Scheduling
Process IDs
Killing a Process
Priorities
Processes / Process Metrics and Process Control
Load Averages (Linux System Monitoring)
Foreground & Background Jobs
Lab Solution: Get Load Averages
Lab Solution: Manage Job States
Processes / Listing Processes: ps and top
Monitoring Processes on a Unix/Linux System
The ps Command (Process Status)
The pstree Command – Visualizing Process Hierarchies
The top Command – Real-Time System Monitoring
Interactive Controls in top
Alternative Tools to top
Conclusion
Processes / Starting Processes in the Future
Scheduling Future Processes Using at
cron
anacron
sleep
Lab: Using at for Future Batch Jobs
Lab: Using cron for Recurring Jobs
File Operations / Filesystems
Introduction to Filesystems
Filesystem Types
Disk Partitions
Mount Points and Mounting
Using NFS on the Server
Mounting NFS on the Client
Lab: Exploring Mounted Filesystems
Lab Solution
File Operations / Filesystem Layout
Overview of User Home Directories
The /bin and /sbin Directories
The /proc Filesystem
The /dev Directory
The /var Directory
The /etc Directory
The /boot Directory
The /lib and /lib64 Directories
Removable Media: /media, /run, and /mnt Directories
Additional Root-Level Directories
The /usr Directory Tree
Common emacs Commands and Their Usage
Lab: vi and emacs Tutorials
ab: Working with vi
Lab Solution: Navigating in vi
Lab Solution: Editing in vi
Lab Solution: External Commands in vi
Operations / Comparing Files and File Types
Comparing Files with diff
Comparing Three Files with diff3
Using the file Utility
The file Utility
Lab: Using diff and patch
File Operations / Backing Up and Compressing Data
Backing Up Data
Compressing Data
Using gzip
Using bzip2
Using xz
Using zip
Relative Compression Times and Sizes
Disk Copying with dd
Text Editors / Basic Editors: nano and gedit
Overview of Text Editors in Linux
Creating Files Without Using an Editor
nano and gedit
nano
gedit
Visual Studio Code
Lab: Using nano
Lab: Using gedit
Text Editors / More Advanced Editors: vi and emacs
vi (vim) — The Modal Editor
Introduction to vi
vimtutor
Modes in vi
Working with Files in vi
External Commands
Searching for Text in vi
Changing, Adding, Deleting Text in vi
Using External Commands in vi
Introduction to emacs
Starting, Exiting, Reading, and Writing Files in emacs
Keys and Usage Examples
Key Combinations Used to Search for Text in emacs
Changing, Adding, and Deleting Text in emacs
Searching Text in emacs
Working with Text in emacs
Lab: vi and emacs Tutorials
Lab: Working with vi
Lab Solution: Navigating in vi
Lab Solution: Editing in vi
Lab Solution: External Commands in vi
User Environment / Accounts, Users and Groups
Identifying the Current User
User Startup Files (Shell Initialization)
Order of the Startup Files
Creating Aliases
Basics of Users and Groups
Adding and Removing Users
Adding and Removing Groups
The Root Account and Privileges
Try-It-Yourself Exercise: Define an Alias
User Environment / Environment Variables
Environment Variables
Setting Environment Variables
The HOME Variable
The PATH Variable
The SHELL Variable
he PS1 Variable and the Command Line Prompt
Lab: Adding /tmp to Your Path
Lab: Solution
Lab: Changing the Command Line Prompt
User Environment / Recalling Previous Commands
Recalling Previous Commands
Using History Environment Variables
Finding and Using Previous Commands
Executing Previous Commands
Keyboard Shortcuts
Lab: Command History
Lab Solution
User Environment / File Permissions
File Ownership
File Permission Modes and chmod
Example of chown
Manipulating Text / cat and echo
Command Line Tools for Manipulating Text Files
cat
Using cat Interactively
echo Command
Working with Large Files
Working with Large Files
head Command
tail Command
Viewing Compressed Files
Manipulating Text / sed and awk
Introduction to sed and awk
sed (Stream Editor)
sed Command Syntax
sed Basic Operations
awk (Pattern Scanner and Processor)
awk Basic Operations
Lab: sed Practice
Manipulating Text / File Manipulation Utilities
File Manipulation Utilities
sort
uniq
paste
join
split
Regular Expressions and Search Patterns
Lab: Parsing Files with awk (and sort and uniq)
Manipulating Text / grep and strings
grep
strings
Lab: Using grep
Lab Solution
Manipulating Text / Miscellaneous Text Utilities
grep — Search for Text Patterns
tr — Translate or Delete Characters
tee — Output to Terminal and Save to File
wc — Word, Line, and Byte Count
Lab Solution
cut — Extract Columns
Network Operations / Network Addresses and DNS
Introduction to Networking
IP Addresses
IPv4 vs IPv6
Decoding IPv4 Addresses
Class A Network Addresses
Class B Network Addresses
Class C Network Addresses
IP Address Allocation
Network Operations / Networking Configuration and Tools
Introduction to Networking
Network Interfaces
The ip Utility
ping
route
traceroute
More Networking Tools
Network Operations / Browsers, wget and curl
Graphical and Non-Graphical Browsers
wget
curl
Network Operations / Transferring Files
FTP (File Transfer Protocol)
FTP Clients
SSH (Secure Shell)
SCP (Secure Copy Protocol)
Lab: Network Troubleshooting
The Bash Shell and Basic Scripting / Features and Capabilities
Shell Scripting in Linux
Command Shell Choices
History of Command Shells
Creating Shell Scripts
A Simple bash Script
Return Values in Shell Scripts
Lab: Exit Status Codes
The Bash Shell and Basic Scripting / Syntax
Basic Syntax and Special Characters
Splitting Long Commands Across Lines
Chaining Commands
Redirection
Input Redirection
Built-In Shell Commands
Commands Built in to bash
Script Parameters
Using Script Parameters
Command Substitution
Environment Variables
Functions
Lab: Working with Files and Directories in a Script
The Bash Shell and Basic Scripting / Constructs
The if Statement in Bash
Using the if Statement
The elif Statement
File Test Operators
Boolean Expressions
Tests in Boolean Expressions
Example of Testing of Strings
Numerical Tests
Lab – Bash Calculator
More on Bash Shell Scripting / String Manipulation
String Manipulation
Example of String Manipulation
Parts of a String
Lab: String Tests and Operations
Lab Solution
More on Bash Shell Scripting / The case Statement
The case Statement
Structure of the case Statement
Lab: Using the case Statement
Lab Solution
Make the Script Executable and Run It
More on Bash Shell Scripting / Looping Constructs
Looping Constructs
The for Loop
The while Loop
The until Loop
More on Bash Shell Scripting / Script Debugging
Debugging bash Scripts
Script Debug Mode
Redirecting Errors to a File or Screen
More on Bash Shell Scripting / Some Additional Useful Techniques
Creating Temporary Files and Directories
Why Safe Temporary File Naming Matters
Discarding Output with /dev/null
Random Numbers and Data
How Linux Generates Random Numbers
Lab: Using Random Numbers
Printing / Configuration
Printing on Linux
CUPS Overview
How Does CUPS Work?
Scheduler
Configuration Files
Job Files
Log Files
Filters, Printer Drivers, and Backends
Managing CUPS
Configuring a Printer from the GUI
Adding Printers from the CUPS Web Interface
Printing / Printing Operations
Printing from the Graphical Interface
Printing from the Command-Line Interface
Using lp
Managing Print Jobs
Printing / Manipulating Postscript and PDF Files
Quick Overview
Working with enscript
Converting between PostScript and PDF
Viewing PDFs
Manipulating PDFs
Using qpdf
Using pdftk
Encrypting PDF Files with pdftk
Using Ghostscript
Using Additional Tools
Lab: Creating PostScript and PDF from Text Files
Lab: Combining PDFs
Security Principles / Understanding Linux Security
User Accounts
/etc/passwd File Fields
Types of Linux Accounts
Understanding the root Account
Local Security Principles / When Are root Privileges Required?
Root Privileges in Linux
Operations Not Requiring Root Privileges
Local Security Principles / sudo, Process Isolation, Limiting Hardware Access and Keeping Systems Current
Understanding sudo vs su
sudo Features and Configuration
The sudoers File
Process Isolation and Security Features
Hardware Device Access
Keeping Your System Updated
Lab: Using sudo
Local Security Principles / Working with Passwords
How Passwords Are Stored in Linux
Password Encryption
Good Password Practices
Lab: Password Aging
Local Security Principles / Securing the Boot Process and Hardware Resources
Requiring Boot Loader Passwords
Hardware Vulnerability
Software Vulnerability
Linux Essentials and System Fundamentals: Practice Test