Linux Command Line and Shell Scripting Bible
Linux Command Line and Shell Scripting Bible
Click to enlarge
Author(s): Blum, Richard
ISBN No.: 9781119700913
Pages: 832
Year: 202101
Format: Trade Paper
Price: $ 71.76
Dispatch delay: Dispatched between 7 to 15 days
Status: Available

Acknowledgments xi Part I: The Linux Command Line 1 Chapter 1: Starting with Linux Shells 3 Investigating Linux 3 Looking into the Linux kernel 4 System memory management 5 Software program management 6 Hardware management 8 Filesystem management 8 The GNU utilities 9 The core GNU utilities 10 The shell 10 The Linux desktop environment 11 The X Window software 12 The KDE Plasma desktop 12 The GNOME desktop 13 Other desktops 15 Examining Linux Distributions 17 Core Linux distributions 18 Specialized Linux distributions 19 Summary 20 Chapter 2: Getting to the Shell 21 Reaching the Command Line 21 Console terminals 22 Graphical terminals 22 Accessing CLI via a Linux Console Terminal 23 Accessing CLI via Graphical Terminal Emulation 26 Using the GNOME Terminal Emulator 27 Accessing GNOME Terminal 27 The menu bar 32 Using the Konsole Terminal Emulator 36 Accessing Konsole 36 The menu bar 38 Using the xterm Terminal Emulator 42 Accessing xterm 43 Command-line parameters 44 Summary 45 Chapter 3: Basic Bash Shell Commands 47 Starting the Shell 47 Using the Shell Prompt 48 Interacting with the Bash Manual 49 Navigating the Filesystem 53 Looking at the Linux filesystem 53 Traversing directories 57 Using absolute directory references 57 Using relative directory references 59 Listing Files and Directories 60 Displaying a basic listing 61 Displaying a long listing 63 Filtering listing output 64 Handling Files 66 Creating files 66 Copying files 66 Using command-line completion 69 Linking files 69 Renaming files 71 Deleting files 73 Managing Directories 74 Creating directories 74 Deleting directories 75 Viewing File Contents 77 Viewing the file type 77 Viewing the whole file 78 Using the cat command 78 Using the more command 78 Using the less command 80 Viewing parts of a file 80 Using the tail command 80 Using the head command 82 Summary 82 Chapter 4: More Bash Shell Commands 85 Monitoring Programs 85 Peeking at the processes 85 Unix-style parameters 86 BSD-style parameters 89 The GNU long parameters 91 Real-time process monitoring 93 Stopping processes 95 The kill command 95 The pkill command 96 Monitoring Disk Space 96 Mounting media 97 The mount command 97 The umount command 99 Using the df command 100 Using the du command 101 Working with Data Files 102 Sorting data 102 Searching for data 106 Compressing data 108 Archiving data 109 Summary 111 Chapter 5: Understanding the Shell 113 Investigating Shell Types 113 Exploring Parent and Child Shell Relationships 117 Looking at process lists 121 Creatively using subshells 123 Investigating background mode 123 Putting process lists into the background 125 Looking at co-processing 126 Understanding External and Built-In Commands 127 Looking at external commands 128 Looking at built-in commands 129 Using the history command 130 Using command aliases 134 Summary 135 Chapter 6: Using Linux Environment Variables 137 Exploring Environment Variables 137 Looking at global environment variables 138 Looking at local environment variables 140 Setting User-Defined Variables 141 Setting local user-defined variables 141 Setting global environment variables 142 Removing Environment Variables 144 Uncovering Default Shell Environment Variables 145 Setting the PATH Environment Variable 150 Locating System Environment Variables 152 Understanding the login shell process 152 Viewing the /etc/profi le file 152 Viewing the $HOME startup files 156 Understanding the interactive shell process 157 Understanding the noninteractive shell process 158 Making environment variables persistent 159 Learning about Variable Arrays 159 Summary 161 Chapter 7: Understanding Linux File Permissions 163 Exploring Linux Security 163 The /etc/passwd file 164 The /etc/shadow file 165 Adding a new user 166 Removing a user 169 Modifying a user 169 usermod 170 passwd and chpasswd 170 chsh , chfn , and chage 171 Using Linux Groups 173 The /etc/group file 173 Creating new groups 174 Modifying groups 175 Decoding File Permissions 176 Using file permission symbols 176 Default file permissions 178 Changing Security Settings 179 Changing permissions 180 Changing ownership 181 Sharing Files 182 Access Control Lists 184 Summary 186 Chapter 8: Managing Filesystems 189 Exploring Linux Filesystems 189 Exploring the Linux filesystem evolution 190 Looking at the ext filesystem 190 Looking at the ext2 filesystem 190 Digging into journaling filesystems 191 Looking at the ext3 filesystem 191 Looking at the ext4 filesystem 191 Looking at the JFS filesystem 192 Looking at ReiserFS 192 Looking at XFS 192 Understanding the volume-managing filesystems 192 Looking at the ZFS filesystem 193 Looking at the Btrfs filesystem 193 Looking at the Stratis filesystem 193 Working with Filesystems 194 Creating partitions 194 Looking at the fdisk utility 194 Working with gdisk 197 The GNU parted command 198 Creating a filesystem 199 Checking and repairing a filesystem 201 Managing Logical Volumes 202 Exploring LVM layout 203 Physical volume 203 Volume group 203 Logical volume 203 Understanding the LVM in Linux 203 Create the PVs 204 Create a VG 204 Create an LV 205 Using the Linux LVM 206 Format and mount an LV 206 Growing or shrinking your VGs and LVs 206 Summary 207 Chapter 9: Installing Software 209 Exploring Package Management 209 Inspecting the Debian-Based Systems 210 Managing packages with apt 211 Installing software packages with apt 213 Upgrading software with apt 215 Uninstalling software with apt 216 The apt repositories 218 The Red Hat-Based Systems 220 Listing installed packages 220 Installing software with dnf 221 Upgrading software with dnf 223 Uninstalling software with dnf 223 Dealing with broken dependencies 223 RPM repositories 224 Managing Software Using Containers 225 Using snap containers 225 Using flatpak containers 227 Installing from Source Code 229 Summary 232 Chapter 10: Working with Editors 235 Visiting the vim Editor 235 Checking your vim package 236 Exploring vim basics 237 Editing data 240 Copying and pasting 240 Searching and substituting 241 Navigating the nano Editor 242 Exploring the Emacs Editor 244 Checking your Emacs package 245 Using Emacs on the console 246 Exploring the basics of Emacs 247 Editing data 248 Copying and pasting 249 Searching and replacing 249 Using buffers in Emacs 250 Using windows in console mode Emacs 251 Using Emacs in a GUI 252 Exploring the KDE Family of Editors 253 Looking at the KWrite editor 253 Looking at the Kate editor 259 Exploring the GNOME Editor 263 Starting gedit 264 Understanding basic gedit features 265 Managing plugins 268 Summary 271 Part II: Shell Scripting Basics 273 Chapter 11: Basic Script Building 275 Using Multiple Commands 275 Creating a Script File 276 Displaying Messages 278 Using Variables 279 Environment variables 280 User variables 281 Command substitution 283 Redirecting Input and Output 284 Output redirection 285 Input redirection 285 Employing Pipes 287 Performing Math 289 The expr command 290 Using brackets 292 A floating-point solution 293 The basics of bc 293 Using bc in scripts 295 Exiting the Script 297 Checking the exit status 297 The exit command 298 Working through a Practical Example 300 Summary 301 Chapter 12: Using Structured Commands 303 Working with the if-then Statement 303 Exploring the if-then-else Statement 306 Nesting if s 307 Trying the test Command 311 Using numeric comparisons 313 Using string comparisons 314 Looking at string equality 315 Looking at string order 316 Looking at string size 318 Using file comparisons 320 Checking directories 320 Checking whether an object exists 321 Checking for a file 322 Checking for read access 324 Checking for empty files 325 Checking whether you can write to a file 326 Checking.


To be able to view the table of contents for this publication then please subscribe by clicking the button below...
To be able to view the full description for this publication then please subscribe by clicking the button below...