Linux Tutorials - Herong's Tutorial Examples

© 2021 Dr. Herong Yang. All rights reserved.

Linux Tutorials This book is a collection of notes and sample codes written by the author while he was learning Linux systems. Topics include using Cockpit Web portal for admin tasks; using network configuration and security firewall; managing users and groups; managing files and directories; managing NTFS, CIFS, EXT4, LBA, LVM file systems; installing CentOS systems; using SELinux (Security-Enhanced Linux) system; DNF/YUM software package manager; managing MySQL server; developing Python and PHP scripts; using GCC C/C++ compilers; managing vsftpd - Very Secure FTP daemon; managing Postfix and Dovecot servers for emails; managing directory service with OpenLDAP; running graphical applications on GNOME desktop and X11 servers; running Conda - Environment and Package Manager. Updated in 2021 (Version v5.39) with minor updates.

Table of Contents

About This Book

Introduction to Linux Systems

"uname" - Display System Information

"free" - Display Free and Used Memory

Cockpit - Web Portal for Administrator

What Is Cockpit

Install and Configure Cockpit

"Web console" Login Welcome Message

Process Management

"ps" - Display Current Processes

"jobs" - Manage Background Jobs

"tmux" - Terminal Multiplexer

Files and Directories

"find" - Search for Files

"more", "head" and "cat" - Read Files

"split" and "cat" - Split and Join Files

Truncate Log Files

"compress/uncompress" - Compressed *.Z Files

"gzip/gunzip" - Compressed *.gz Files

"xz/unxz" - Compressed *.xz or *.lzma Files

"tar -c" and "tar -x" - Create and Extract Archive Files

"zip" and "unzip" - Create and Extract ZIP Files

"Operation not permitted" Error on macOS

Users and Groups

Manage User Groups

Group Access Permissions on Files

"sudo" Command and Privilege

"adduser/usermod/userdel" - Commands to Manage Users

File Systems

"df" - Display Free Space of File System

Mount USB Drive as File System

"dd" - Copy Data from/to Storage Devices

Use "dd" Command to Test I/O Speed

"du" - Display Disk Usage of Directories

Mount Windows NTFS File System

Access Persmissions on "ntfs-3g" File System

Mount Windows Shared Folders

W95 Ext'd (LBA) Partition

Reformat NTFS Partition into EXT4 Partition

NFS (Network File System)

Mount NFS (Network File System) on macOS

/etc/mtab and /etc/fstab Files

Unreachable Remote File Systems

Block Devices and Partitions

LVM (Logical Volume Manager)

What Is LVM (Logical Volume Manager)

Create New PV (Physical Volume)

Add/Remove PV on VG on the Fly

Create LV on VG on the Fly

Extend /home LV with a New Partition

Installing CentOS

Create CentOS Bootable USB

Install CentOS from Bootable USB

Install CentOS by Deleting Existing Partition

Reset Timezone on Linux Systems

SELinux - Security-Enhanced Linux

Network Connection on CentOS

Setup Ethernet Connection on CentOS

Network Firewall Tools on CentOS

"firewalld" and "firewall-cmd" on CentOS

Manage Multiple Firewall Zones

"nftables" and "nft" on CentOS

"iptables" Command on CentOS

"nmap" - Network Mapper on CentOS

Monitor Network Services on CentOS

"ifconfig" - Trace Routes to Remote Host

"traceroute" - Trace Routes to Remote Host

"route" - Upate Routing Table

"netstat" - Display Network Statistics

"lsof" - List of Open Files

Software Package Manager on CentOS - DNF and YUM

What Is DNF

Manage DNF Package Repositories

What Is YUM

What Is RPM

What Is

Install and Manage Java Packages on CentOS

Install and Manage Perl Packages on CentOS

Install "git-core" for GitHub Packages on CentOS

Running Apache Web Server (httpd) on Linux Systems

Verify Apache Web Server "httpd"

Running PHP Scripts on Linux Systems

Install and Manage PHP Packages on CentOS

"php -i" - Dump PHP Environment Information

Install and Manage PHP Modules on CentOS

Files Used in PHP "include" Statements

Publish PHP Scripts on Apache Web Server

Dump PHP/Apache Environment Information

Change PHP Configuration Settings

Apache PHP file_put_contents() Permission Denied

SELinux Security Context on /var/www/html

Migrate Old Scripts to New PHP Release

Running MySQL Database Server on Linux Systems

Install MySQL Database Server on CentOS

Manage MySQL Server 'mysqld' on CentOS

Set MySQL Server "root" Password on CentOS

MySQL Server File Locations on CentOS

MySQL Server Data Backups on CentOS

MySQL Server Log Files on CentOS

MySQL Server Socket Connection on CentOS

MySQL Server TCP/IP Connection on CentOS

Open Firewall for MySQL Server on CentOS

"Server sent charset unknown to the client" Error

Performance of Inserting Integers to MySQL Database

Performance Comparison of Inserting Integers vs. Strings

Running Python Scripts on Linux Systems

Install and Manage Python Engine on CentOS

"pip/pip3" Python Package Manager

Install MySQL Connector/Python on CentOS

Install Python 2 Engine on CentOS

vsftpd - Very Secure FTP Daemon

Postfix - Mail Transport Agent (MTA)

Dovecot - IMAP and POP3 Server

Email Client Tools - Mail User Agents (MUA)

"mailx" Command - Send and Read Emails

"Alpine" - Terminal-Based Email Client

SquirrelMail Webmail Installation on CentOS

SquirrelMail Configuration on CentOS

Thunderbird Installation on macOS

Thunderbird Configuration for POP3S and SMTP

Thunderbird to Accept POP3S Certificate Exception

Thunderbird Configuration for IMAPS and SMTP

Thunderbird Configuratin for SMTPS Service

macOS Mail Auto Configuration

macOS Mail Manual Configuration

Accept Certificate Exception in macOS Mail

Windows 10 Mail Configuration Failed

SSL/TLS Connection Issue in Windows 10 Mail

LDAP (Lightweight Directory Access Protocol)

What Is LDAP

What Is OpenLDAP

Install OpenLDAP Server on CentOS

Configure OpenLDAP Server on CentOS

Use OpenLDAP Client Tools

Delete or Modify LDAP Entries

LDIF File Format

Hierarchical Structure of LDAP Entries

Install OpenLDAP Server on CentOS 8

Configure Mozilla Thunderbird to Use LDAP

LDAP Attributes Mapping in Mozilla Thunderbird

Configure Apple iPhone to Use LDAP

GCC - C/C++ Compiler

Install GCC C/C++ Compilers

"g++ --verbose" - GCC Compiler Steps and Settings

"g++ -I..." and CPATH Environment Variable

"g++ -l..." to Link with Library Files

"g++ -c" and "ar src" to Build Static Library

"g++ -shared" to Build Dynamic Library

"ldd" - Dynamic Library Dependency Checker

"make" - Manage Program Build Process

Graphics Environments on Linux

Conda - Environment and Package Manager

What Is Conda

Install Miniconda 3

Introduction to Conda Environment

Tools and Utilities

Install Tesseract as the OCR Engine

Administrative Tasks

Move /home Directory to New Partition


Full Version in PDF/EPUB

Keywords: Linux, CentOS, macOS, Tutorials