ENGLISH

Linux Bible - the comprehensive tutorial resource

Book information

ISBN
9781119578888, 9781119578918, 9781119578895, 2019956690
Language
english
Format
PDF
Filesize
19 MB (19912180 bytes)
Edition
10
Pages
\931
Time added
2022-04-23 15:58:37

Description

Cover Title Page Copyright About the Author About the Technical Editors Acknowledgments Contents at a Glance Contents Introduction Part I Getting Started Chapter 1 Starting with Linux Understanding What Linux Is Understanding How Linux Differs from Other Operating Systems Exploring Linux History Free-flowing UNIX culture at Bell Labs Commercial UNIX Berkeley Software Distribution arrives UNIX Laboratory and commercialization GNU transitions UNIX to freedom BSD loses some steam Linus builds the missing piece OSI open source definition Understanding How Linux Distributions Emerged Choosing a Red Hat distribution Using Red Hat Enterprise Linux Using Fedora Choosing Ubuntu or another Debian distribution Finding Professional Opportunities with Linux Today Understanding how companies make money with Linux Becoming Red Hat certified RHCSA topics RHCE topics Summary Chapter 2 Creating the Perfect Linux Desktop Understanding Linux Desktop Technology Starting with the Fedora GNOME Desktop Live image Using the GNOME 3 Desktop After the computer boots up Navigating with the mouse Navigating with the keyboard Setting up the GNOME 3 desktop Extending the GNOME 3 desktop Using GNOME shell extensions Using the GNOME Tweak Tool Starting with desktop applications Managing files and folders with Nautilus Installing and managing additional software Playing music with Rhythmbox Stopping the GNOME 3 desktop Using the GNOME 2 Desktop Using the Metacity window manager Changing GNOME’s appearance Using the GNOME panels Using the Applications and System menus Adding an applet Adding another panel Adding an application launcher Adding a drawer Changing panel properties Adding 3D effects with AIGLX Summary Exercises Part II Becoming a Linux Power User Chapter 3 Using the Shell About Shells and Terminal Windows Using the shell prompt Using a Terminal window Using virtual consoles Choosing Your Shell Running Commands Understanding command syntax Locating commands Recalling Commands Using Command History Command-line editing Command-line completion Command-line recall Connecting and Expanding Commands Piping between commands Sequential commands Background commands Expanding commands Expanding arithmetic expressions Expanding variables Using Shell Variables Creating and using aliases Exiting the shell Creating Your Shell Environment Configuring your shell Setting your prompt Adding environment variables Getting Information about Commands Summary Exercises Chapter 4 Moving Around the Filesystem Using Basic Filesystem Commands Using Metacharacters and Operators Using file-matching metacharacters Using file-redirection metacharacters Using brace expansion characters Listing Files and Directories Understanding File Permissions and Ownership Changing permissions with chmod (numbers) Changing permissions with chmod (letters) Setting default file permission with umask Changing file ownership Moving, Copying, and Removing Files Summary Exercises Chapter 5 Working with Text Files Editing Files with vim and vi Starting with vi Adding text Moving around in the text Deleting, copying, and changing text Pasting (putting) text Repeating commands Skipping around in the file Searching for text Using ex mode Learning more about vi and vim Finding Files Using locate to find files by name Searching for files with find Finding files by name Finding files by size Finding files by user Finding files by permission Finding files by date and time Using ‘not’ and ‘or’ when finding files Finding files and executing commands Searching in files with grep Summary Exercises Chapter 6 Managing Running Processes Understanding Processes Listing Processes Listing processes with ps Listing and changing processes with top Listing processes with System Monitor Managing Background and Foreground Processes Starting background processes Using foreground and background commands Killing and Renicing Processes Killing processes with kill and killall Using kill to signal processes by PID Using killall to signal processes by name Setting processor priority with nice and renice Limiting Processes with cgroups Summary Exercises Chapter 7 Writing Simple Shell Scripts Understanding Shell Scripts Executing and debugging shell scripts Understanding shell variables Special shell positional parameters Reading in parameters Parameter expansion in bash Performing arithmetic in shell scripts Using programming constructs in shell scripts The ″if. . .then″ statements The case command The ″for. . .do″ loop The ″while. . .do″ and ″until. . .do″ loops Trying some useful text manipulation programs The general regular expression parser Remove sections of lines of text (cut) Translate or delete characters (tr) The stream editor (sed) Using simple shell scripts Telephone list Backup script Summary Exercises Part III Becoming a Linux System Administrator Chapter 8 Learning System Administration Understanding System Administration Using Graphical Administration Tools Using Cockpit browser-based administration Using system-config-* tools Using other browser-based admin tools Using the root User Account Becoming root from the shell (su command) Allowing administrative access via the GUI Gaining administrative access with sudo Exploring Administrative Commands, Configuration Files, and Log Files Administrative commands Administrative configuration files Administrative log files and systemd journal Using journalctl to view the systemd journal Managing log messages with rsyslogd Using Other Administrative Accounts Checking and Configuring Hardware Checking your hardware Managing removable hardware Working with loadable modules Listing loaded modules Loading modules Removing modules Summary Exercises Chapter 9 Installing Linux Choosing a Computer Installing Fedora from Live Media Installing Red Hat Enterprise Linux from Installation Media Understanding Cloud-Based Installations Installing Linux in the Enterprise Exploring Common Installation Topics Upgrading or installing from scratch Dual booting Installing Linux to run virtually Using installation boot options Boot options for disabling features Boot options for video problems Boot options for special installation types Boot options for kickstarts and remote repositories Miscellaneous boot options Using specialized storage Partitioning hard drives Understanding different partition types Tips for creating partitions Using the GRUB boot loader Summary Exercises Chapter 10 Getting and Managing Software Managing Software on the Desktop Going Beyond the Software Window Understanding Linux RPM and DEB Software Packaging Understanding DEB packaging Understanding RPM packaging What is in an RPM? Where do RPMs come from? Installing RPMs Managing RPM Packages with YUM Transitioning from yum to dnf Understanding how yum works Using YUM with third-party software repositories Managing software with the yum command Searching for packages Installing and removing packages Updating packages Updating groups of packages Maintaining your RPM package database and cache Downloading RPMs from a YUM repository Installing, Querying, and Verifying Software with the rpm Command Installing and removing packages with rpm Querying rpm information Verifying RPM packages Managing Software in the Enterprise Summary Exercises Chapter 11 Managing User Accounts Creating User Accounts Adding users with useradd Setting user defaults Modifying users with usermod Deleting users with userdel Understanding Group Accounts Using group accounts Creating group accounts Managing Users in the Enterprise Setting permissions with Access Control Lists Setting ACLs with setfacl Setting default ACLs Enabling ACLs Adding directories for users to collaborate Creating group collaboration directories (set GID bit) Creating restricted deletion directories (sticky bit) Centralizing User Accounts Summary Exercises Chapter 12 Managing Disks and Filesystems Understanding Disk Storage Partitioning Hard Disks Understanding partition tables Viewing disk partitions Creating a single-partition disk Creating a multiple-partition disk Using Logical Volume Manager Partitions Checking an existing LVM Creating LVM logical volumes Growing LVM logical volumes Mounting Filesystems Supported filesystems Enabling swap areas Disabling swap area Using the fstab file to define mountable file systems Using the mount command to mount file systems Mounting a disk image in loopback Using the umount command Using the mkfs Command to Create a Filesystem Managing Storage with Cockpit Summary Exercises Part IV Becoming a Linux Server Administrator Chapter 13 Understanding Server Administration Starting with Server Administration Step 1: Install the server Step 2: Configure the server Using configuration files Checking the default configuration Step 3: Start the server Step 4: Secure the server Password protection Firewalls TCP Wrappers SELinux Security settings in configuration files Step 5: Monitor the server Configure logging Run system activity reports Watch activity live with Cockpit Keep system software up to date Check the filesystem for signs of crackers Checking and Setting Servers Managing Remote Access with the Secure Shell Service Starting the openssh-server service Using SSH client tools Using ssh for remote login Using ssh for remote execution Copying files between systems with scp and rsync Interactive copying with sftp Using key-based (passwordless) authentication Configuring System Logging Enabling system logging with rsyslog Understanding the rsyslog.conf file Understanding the messages log file Setting up and using a loghost with rsyslogd Watching logs with logwatch Checking System Resources with sar Checking System Space Displaying system space with df Checking disk usage with du Finding disk consumption with find Managing Servers in the Enterprise Summary Exercises Chapter 14 Administering Networking Configuring Networking for Desktops Checking your network interfaces Checking your network from NetworkManager Checking your network from Cockpit Checking your network from the command line Configuring network interfaces Setting IP addresses manually Setting IP address aliases Setting routes Configuring a network proxy connection Configuring Networking from the Command Line Configure networking with nmtui Editing a NetworkManager TUI connection Understanding networking configuration files Network interface files Other networking files Setting alias network interfaces Setting up Ethernet channel bonding Setting custom routes Configuring Networking in the Enterprise Configuring Linux as a router Configuring Linux as a DHCP server Configuring Linux as a DNS server Configuring Linux as a proxy server Summary Exercises Chapter 15 Starting and Stopping Services Understanding the Initialization Daemon (init or systemd) Understanding the classic init daemons Understanding systemd initialization Learning systemd basics Learning systemd’s backward compatibility to SysVinit Checking the Status of Services Checking services for SysVinit systems Stopping and Starting Services Stopping and starting SysVinit services Starting a service with systemd Restarting a service with systemd Reloading a service with systemd Enabling Persistent Services Configuring persistent services for SysVinit Enabling a service with systemd Disabling a service with systemd Configuring a Default Runlevel or Target Unit Configuring the SysVinit default runlevel Adding New or Customized Services Adding new services to SysVinit Step 1: Create a new or customized service script file Step 2: Add the service script to /etc/rc.d/init.d Step 3: Set appropriate permission on the script Step 4: Add the service to runlevel directories Adding new services to systemd Step 1: Create a new or customized service configuration unit file Step 2: Move the service configuration unit file Step 3: Add the service to the Wants directory Summary Exercises Chapter 16 Configuring a Print Server Common UNIX Printing System Setting Up Printers Adding a printer automatically Using web-based CUPS administration Allow remote printing administration Add a printer not automatically detected Using the Print Settings window Configuring local printers with the Print Settings window Configuring remote printers Adding a remote CUPS printer Adding a remote UNIX (LDP/LPR) printer Adding a Windows (SMB) printer Working with CUPS Printing Configuring the CUPS server (cupsd.conf) Starting the CUPS server Configuring CUPS printer options manually Using Printing Commands Printing with lp Listing status with lpstat -t Removing print jobs with lprm Configuring Print Servers Configuring a shared CUPS printer Configuring a shared Samba printer Understanding smb.conf for printing Setting up SMB clients Summary Exercises Chapter 17 Configuring a Web Server Understanding the Apache Web Server Getting and Installing Your Web Server Understanding the httpd package Installing Apache Starting Apache Securing Apache Apache file permissions and ownership Apache and firewalls Apache and SELinux Understanding the Apache configuration files Using directives Understanding default settings Adding a virtual host to Apache Allowing users to publish their own web content Securing your web traffic with SSL/TLS Understanding how SSL is configured Generating an SSL key and self-signed certificate Generating a certificate signing request Troubleshooting Your Web Server Checking for configuration errors Accessing forbidden and server internal errors Summary Exercises Chapter 18 Configuring an FTP Server Understanding FTP Installing the vsftpd FTP Server Starting the vsftpd Service Securing Your FTP Server Opening up your firewall for FTP Configuring SELinux for your FTP server Relating Linux file permissions to vsftpd Configuring Your FTP Server Setting up user access Allowing uploading Setting up vsftpd for the Internet Using FTP Clients to Connect to Your Server Accessing an FTP server from Firefox Accessing an FTP server with the lftp command Using the gFTP client Summary Exercises Chapter 19 Configuring a Windows File Sharing (Samba) Server Understanding Samba Installing Samba Starting and Stopping Samba Starting the Samba (smb) service Starting the NetBIOS (nmbd) name server Stopping the Samba (smb) and NetBIOS (nmb) services Securing Samba Configuring firewalls for Samba Configuring SELinux for Samba Setting SELinux Booleans for Samba Setting SELinux file contexts for Samba Configuring Samba host/user permissions Configuring Samba Configuring the [global] section Configuring the [homes] section Configuring the [printers] section Creating a Samba shared folder Adding the shared folder to Samba Checking the Samba share Accessing Samba Shares Accessing Samba shares in Linux Accessing Samba shares from a Linux file manager Mounting a Samba share from a Linux command line Accessing Samba shares in Windows Using Samba in the Enterprise Summary Exercises Chapter 20 Configuring an NFS File Server Installing an NFS Server Starting the NFS service Sharing NFS Filesystems Configuring the /etc/exports file Hostnames in /etc/exports Access options in /etc/exports User mapping options in /etc/exports Exporting the shared filesystems Securing Your NFS Server Opening up your firewall for NFS Allowing NFS access in TCP wrappers Configuring SELinux for your NFS server Using NFS Filesystems Viewing NFS shares Manually mounting an NFS filesystem Mounting an NFS filesystem at boot time Mounting noauto filesystems Using mount options Using autofs to mount NFS filesystems on demand Automounting to the /net directory Automounting home directories Unmounting NFS filesystems Summary Exercises Chapter 21 Troubleshooting Linux Boot-Up Troubleshooting Understanding Startup Methods Starting with System V init scripts Starting with systemd Starting from the firmware (BIOS or UEFI) Troubleshooting BIOS setup Troubleshooting boot order Troubleshooting the GRUB boot loader The GRUB Legacy boot loader GRUB 2 Boot loader Starting the kernel Troubleshooting the initialization system Troubleshooting System V initialization Troubleshooting rc.sysinit Troubleshooting runlevel processes Troubleshooting systemd initialization Troubleshooting Software Packages Fixing RPM databases and cache Troubleshooting Networking Troubleshooting outgoing connections View network interfaces Check physical connections Check routes Check hostname resolution Troubleshooting incoming connections Check if the client can reach your system at all Check if the service is available to the client Check the firewall on the server Check the service on the server Troubleshooting Memory Uncovering memory issues Checking for memory problems Dealing with memory problems Troubleshooting in Rescue Mode Summary Exercises Part V Learning Linux Security Techniques Chapter 22 Understanding Basic Linux Security Implementing Physical Security Implementing disaster recovery Securing user accounts One user per user account Limiting access to the root user account Setting expiration dates on temporary accounts Removing unused user accounts Securing passwords Choosing good passwords Setting and changing passwords Enforcing best password practices Understanding the password files and password hashes Securing the filesystem Managing dangerous filesystem permissions Securing the password files Locking down the filesystem Managing software and services Updating software packages Keeping up with security advisories Advanced implementation Monitoring Your Systems Monitoring log files Monitoring user accounts Detecting counterfeit new accounts and privileges Detecting bad account passwords Monitoring the filesystem Verifying software packages Scanning the filesystem Detecting viruses and rootkits Auditing and Reviewing Linux Conducting compliance reviews Conducting security reviews Summary Exercises Chapter 23 Understanding Advanced Linux Security Implementing Linux Security with Cryptography Understanding hashing Understanding encryption/decryption Understanding cryptographic ciphers Understanding cryptographic cipher keys Understanding digital signatures Implementing Linux cryptography Ensuring file integrity Encrypting a Linux filesystem at installation Encrypting a Linux directory Encrypting a Linux file Encrypting Linux with miscellaneous tools Using Encryption from the Desktop Implementing Linux Security with PAM Understanding the PAM authentication process Understanding PAM contexts Understanding PAM control flags Understanding PAM modules Administering PAM on your Linux system Managing PAM-aware application configuration files Managing PAM system event configuration files Implementing time restrictions with PAM Enforcing good passwords with PAM Encouraging sudo use with PAM Obtaining more information on PAM Summary Exercises Chapter 24 Enhancing Linux Security with SELinux Understanding SELinux Benefits Understanding How SELinux Works Understanding Type Enforcement Understanding Multi-Level Security Implementing SELinux security models Understanding SELinux operational modes Understanding SELinux security contexts Understanding SELinux Policy types Understanding SELinux policy rule packages Configuring SELinux Setting the SELinux mode Setting the SELinux policy type Managing SELinux security contexts Managing the user security context Managing the file security context Managing the process security context Managing SELinux policy rule packages Managing SELinux via Booleans Monitoring and Troubleshooting SELinux Understanding SELinux logging Reviewing SELinux messages in the audit log Reviewing SELinux messages in the messages log Troubleshooting SELinux logging Troubleshooting common SELinux problems Using a nonstandard directory for a service Using a nonstandard port for a service Moving files and losing security context labels Booleans set incorrectly Putting It All Together Obtaining More Information on SELinux Summary Exercises Chapter 25 Securing Linux on a Network Auditing Network Services Evaluating access to network services with nmap Using nmap to audit your network services advertisements Working with Firewalls Understanding firewalls Implementing firewalls Starting with firewalld Changing firewall rules with Cockpit Understanding the iptables utility Using the iptables utility Summary Exercises Part VI Engaging with Cloud Computing Chapter 26 Shifting to Clouds and Containers Understanding Linux Containers Namespaces Container registries Base images and layers Starting with Linux Containers Pulling and running containers Pulling a container Running a shell from a container Running an FTP server from a container Starting and stopping containers Building a container image Build a simple container image Build an FTP container from GitHub Tagging and pushing an image to a registry Using containers in the enterprise Summary Exercises Chapter 27 Using Linux for Cloud Computing Overview of Linux and Cloud Computing Cloud hypervisors (aka compute nodes) Cloud controllers Cloud storage Cloud authentication Cloud deployment and configuration Cloud platforms Trying Basic Cloud Technology Setting Up a Small Cloud Configuring hypervisors Step 1: Get Linux software Step 2: Check your computers Step 3: Install Linux on hypervisors Step 4: Start services on the hypervisors Step 5: Edit /etc/hosts, or set up DNS Configuring storage Step 1: Install Linux software Step 2: Configure NFS share Step 3: Start the NFS service Step 4: Mount the NFS share on the hypervisors Creating virtual machines Step 1: Get images to make virtual machines Step 2: Check the network bridge Step 3: Start Virtual Machine Manager (virt-manager) Step 4: Check connection details Step 5: Create a new virtual machine Managing virtual machines Migrating virtual machines Step 1: Identify other hypervisors Step 2: Migrate running VM to Other hypervisor Summary Exercises Chapter 28 Deploying Linux to the Cloud Getting Linux to Run in a Cloud Creating Linux Images for Clouds Configuring and running a cloud-init cloud instance Investigating the cloud instance Cloning the cloud instance Expanding your cloud-init configuration Adding ssh keys with cloud-init Adding software with cloud-init Using cloud-init in enterprise computing Using OpenStack to Deploy Cloud Images Starting from the OpenStack Dashboard Configuring your OpenStack virtual network Configuring keys for remote access Launching a virtual machine in OpenStack Accessing the virtual machine via ssh Using Amazon EC2 to Deploy Cloud Images Summary Exercises Chapter 29 Automating Apps and Infrastructure with Ansible Understanding Ansible Exploring Ansible Components Inventories Playbooks Plays Tasks Modules Roles, imports, and includes Stepping Through an Ansible Deployment Prerequisites Setting up SSH keys to each node Installing Ansible Creating an inventory Authenticating to the hosts Creating a playbook Run the playbook Running Ad-Hoc Ansible Commands Trying ad-hoc commands Automating Tasks with Ansible Tower Automation Framework Summary Exercises Chapter 30 Deploying Applications as Containers with Kubernetes Understanding Kubernetes Kubernetes masters Kubernetes workers Kubernetes applications Kubernetes interfaces Trying Kubernetes Getting Kubernetes Starting the Kubernetes Basics Tutorial Starting Minikube Running the Kubernetes Basics tutorial Get information about your cluster Deploy a Kubernetes application Get information on the deployment’s pods Expose applications with services Label a service Delete a service Scale up an application Check the load balancer Scale down an application Enterprise-Quality Kubernetes with OpenShift Summary Exercises Part VII Appendixes Appendix A Media Appendix B Exercise Answers Index EULA

Similar books