Linux Tutorials - Herong's Tutorial Examples

© 2009-2024 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; managing users and groups; managing files and directories; managing NTFS, CIFS, EXT4, LBA, LVM file systems; using network tools and security firewall; installing CentOS systems; using SELinux (Security-Enhanced Linux) system; DNF/YUM software package manager; SSH Server configuration and client tools; managing vsftpd - Very Secure FTP daemon; managing directory service with OpenLDAP; Updated in 2024 (Version v5.44) with email topics moved to 'Email Tutorials' book.

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

Cron Daemon, Table and 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

System Users and Groups

Add Users and Groups Manually

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

Reset Host Name on Linux Systems

Update All Installed Packages

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

Internet Networking Tools

"wget" - Get Files from the Web

"cURL" - Client for URL

SSH Protocol and ssh/scp Commands

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

Failed to Download Metadata for Repo ...

Replacing CentOS Repositories to Local Mirrors

vsftpd - Very Secure FTP Daemon

Install vsftpd on CentOS

vsftpd Server Configuration

Setup FTP Sub-Directory for Local Users

Test FTP Access Locally on CentOS

Test FTP Access Remotely on CentOS

Support FTP Over TLS on CentOS

Disable SSH Access for FTP Users

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

Administrative Tasks

"systemctl status/start/stop/enable/disable" Commands

"shutdown" and "halt/poweroff/reboot" Commands

Move /home Directory to New Partition

Move All Users to a New System

"last/lastb" - Review Login History


Full Version in PDF/EPUB

Keywords: Linux, CentOS, macOS, Tutorials