3 options
Linux command line and shell scripting techniques : master practical aspects of the Linux command line and then use it as a part of the shell scripting process / Vedran Dakic and Jasmin Redzepagic.
- Format:
- Book
- Author/Creator:
- Dakic, Vedran, author.
- Redzepagic, Jasmin, author.
- Language:
- English
- Subjects (All):
- Linux.
- Operating systems (Computers).
- Scripting languages (Computer science).
- Physical Description:
- 1 online resource (552 pages)
- Place of Publication:
- Birmingham : Packt Publishing, Limited, [2022]
- Biography/History:
- Dakic Vedran: Vedran Dakic is a master of electrical engineering and computing and an IT trainer, covering system administration, cloud, automatization, and orchestration courses. He is a certified Red Hat, VMware, and Microsoft trainer. He's currently employed as head of the department of operating systems at Algebra University College in Zagreb. As part of this job, he's a lecturer for 3- and 5-year study programs in system engineering, programming, and multimedia tracks. Also, he does a lot of consulting and systems integration for his clients' projects something he has been doing for the past 25 years. His approach is simple bring real-world experience to all the courses that he teaches as it brings added value to his students and customers. Redzepagic Jasmin: Jasmin Redzepagic is a professional master in computer engineering, with a sub-specialization in system engineering, but is a person with many hats worn over the years. Having worked in IT as long as he has, he has been a sound technician, SysOps, DevOps, hardware tester, editor-in-chief of a major magazine, writer, IT support lead, and head of IT at a couple of companies. He is currently employed by Algebra University College in Zagreb. This enables him to have a very wide overview of different technologies while still maintaining his focus implementing and teaching the implementation of open source technologies in the field. Right now, his main interest is trying to teach his students and clients to understand the immense expanse of tools available for any conceivable task, with his goal being to get people to understand computers as something that is the most formidable tool we, as humanity, have ever had.
- Summary:
- Practical and actionable recipes for using shell and command-line scripting on your Linux OS with confidence. Linux Command Line and Shell Scripting Techniques begins by taking you through the basics of the shell and command-line utilities. You'll start by exploring shell commands for file, directory, service, package, and process management. Next, you'll learn about networking - network, firewall and DNS client configuration, ssh, scp, rsync, and vsftpd, as well as some network troubleshooting tools. You'll also focus on using the command line to find and manipulate text content, via commands such as cut, egrep, and sed. As you progress, you'll learn how to use shell scripting. You'll understand the basics - input and output, along with various programming concepts such as loops, variables, arguments, functions, and arrays. Later, you'll learn about shell script interaction and troubleshooting, before covering a wide range of examples of complete shell scripts, varying from network and firewall configuration, through to backup and concepts for creating live environments. This includes examples of performing scripted virtual machine installation and administration, LAMP (Linux, Apache, MySQL, PHP) stack provisioning and bulk user creation for testing environments. By the end of this Linux book, you'll have gained the knowledge and confidence you need to use shell and command-line scripts.
- Contents:
- Cover
- Title Page
- Copyright and Credits
- Contributors
- Table of Contents
- Preface
- Chapter 1: Basics of Shell and Text Terminal
- Technical requirements
- Accessing the shell
- Getting ready
- How to do it…
- How it works…
- See also
- Setting up the user shell
- Setting up the Bash shell
- There's more…
- Using the most common shell commands
- How it works...
- Using screen
- Chapter 2: Using Text Editors
- Learning the basics of the Vi(m) Editor
- Learning the basics of the nano editor
- Going through the advanced Vi(m) settings
- Chapter 3: Using Commands and Services for Process Management
- Process management tools
- Managing background jobs
- Managing process priorities
- Configuring crond
- Chapter 4: Using Shell to Configure and Troubleshoot a Network
- Using nmcli and netplan
- How to do it
- How it works
- There's more
- Using firewall-cmd and ufw
- Working with open ports and connections
- Configuring /etc/hosts and DNS resolving.
- Getting ready
- Using network diagnostic tools
- Chapter 5: Using Commands for File, Directory, and Service Management
- Basic file and directory-based commands
- Additional commands for manipulating file/directory security aspects
- Manipulating text files by using commands
- Finding files and folders
- Archiving and compressing files and folders
- Managing services and targets
- Chapter 6: Shell-Based Software Management
- Using dnf and apt for package management
- Using additional repositories, streams, and profiles
- Creating custom repositories
- Compiling third-party software
- Chapter 7: Network-Based File Synchronization
- Learning how to use SSH and SCP
- Learning how to use rsync
- Using vsftpd
- Chapter 8: Using the Command Line to Find, Extract, and Manipulate Text Content.
- Technical requirements
- Using text commands to merge file content
- Converting DOS text to Linux text and vice versa
- Using cut
- Using egrep
- Using sed
- Chapter 9: An Introduction to Shell Scripting
- Writing your first Bash shell script
- Serializing basic commands - from simple to complex
- Manipulating shell script input, output, and errors
- Shell script hygiene
- Chapter 10: Using Loops
- The for loop
- break and continue
- The while loop
- The test-if loop
- The case loop
- Logical looping with and, or, and not
- Chapter 11: Working with Variables
- Using shell variables
- Using variables in shell scripting
- Quoting in the shell
- See also.
- Performing operations on variables
- Variables via external commands
- Chapter 12: Using Arguments and Functions
- Using custom functions in shell script code
- Passing arguments to a function
- Local and global variables
- Working with returns from a function
- Loading an external function to a shell script
- Implementing commonly used procedures via functions
- Chapter 13: Using Arrays
- Basic array manipulation
- Advanced array manipulation
- Chapter 14: Interacting with Shell Scripts
- Creating text-based interactive scripts
- Using expect to automate repetitive tasks based on text output
- Using dialog for menu-driven interactive scripts
- Chapter 15: Troubleshooting Shell Scripts
- Common scripting mistakes
- See also…
- Simple debugging approach - echoing values during script execution
- Using the bash -x and -v options
- Using set to debug a part of the script
- Chapter 16: Shell Script Examples for Server Management, Network Configuration, and Backups
- Creating a file and folder inventory
- Checking if you're running as root
- Displaying server stats
- Finding files by name, ownership, or content type and copying them to a specified directory
- Parsing date and time data
- Configuring the most common firewall settings interactively
- Configuring network settings interactively
- Backing up the current directory with shell script arguments and variables
- Creating a current backup based on the user input for the backup source and destination
- Chapter 17: Shell Script Examples
- Implementing a web server service and security settings
- Creating users and groups and forcing users to change them on the next login
- Creating users and groups from a standardized input file and a random password for each user
- Scripted VM installation on KVM
- Using a shell script to provision SSH keys
- A shell script for VM administration.
- Notes:
- Description based upon print version of record.
- There's more...
- Description based on print version record.
- ISBN:
- 9781800204607
- 1800204604
- OCLC:
- 1306055894
The Penn Libraries is committed to describing library materials using current, accurate, and responsible language. If you discover outdated or inaccurate language, please fill out this feedback form to report it and suggest alternative language.