Bash in easy steps
eBook - ePub

Bash in easy steps

Mike McGrath

  1. English
  2. ePUB (mobile friendly)
  3. Available on iOS & Android
eBook - ePub

Bash in easy steps

Mike McGrath

Book details
Book preview
Table of contents
Citations

About This Book

The Bourne Again SHell (Bash) is a powerful command-line shell interface that lets you communicate directly with the kernel at the heart of a computer's operating system for total control. Bash is the default shell for Unix-based operating systems Linux, Mac OS X, and Raspbian on Raspberry Pi devices, and is also available to Windows users on the Windows Subsystem for Linux (WSL).

This book will show you how to use the Bash command-line interface and how to employ Bash's programming abilities. Complete examples illustrate each aspect with colorized source code and full-color screenshots depict the actual output.

Bash in easy steps begins by demonstrating Bash commands for system navigation and file manipulation so you will quickly become familiar with the command-line interface. It explains all the BASH basics before moving on to describe advanced features such as command history, command-line editing, and environment customization. The book then introduces Bash programming with examples of flow control, command switches, input/output, and debugging - allowing you to create your own executable programs by copying the examples.

Bash in easy steps has an easy-to-follow style that will appeal to:

  • Users who are completely new to Unix-based operating systems
  • Casual users who wish to expand their knowledge of their computer system
  • Those who would like to learn coding skills by writing useful shell scripts
  • The student who is studying programming at school or college
  • Those seeking a career in computing and need a fundamental understanding of the BASH interpreter on Unix-based operating systems
  • Table of Contents:
  • Getting Started
  • Managing Files

Frequently asked questions

How do I cancel my subscription?
Simply head over to the account section in settings and click on “Cancel Subscription” - it’s as simple as that. After you cancel, your membership will stay active for the remainder of the time you’ve paid for. Learn more here.
Can/how do I download books?
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
What is the difference between the pricing plans?
Both plans give you full access to the library and all of Perlego’s features. The only differences are the price and subscription period: With the annual plan you’ll save around 30% compared to 12 months on the monthly plan.
What is Perlego?
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Do you support text-to-speech?
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Is Bash in easy steps an online PDF/ePUB?
Yes, you can access Bash in easy steps by Mike McGrath in PDF and/or ePUB format, as well as other popular books in Ciencia de la computación & Sistemas operativos. We have over one million books available in our catalogue for you to explore.

Information

1
Getting Started
This chapter introduces the Bash command interpreter shell and demonstrates essential basic commands.
Introducing Bash
Discovering the Shell
Installing Linux on Windows
Initializing the Distro
Understanding Commands
Navigating the File System
Dealing Wildcards
Recognizing Metacharacters
Quoting Phrases
Getting Help
Summary
Introducing Bash
Computer operating systems include a command-line interpreter that allows the user to communicate directly with the system by typing text commands at a waiting prompt. The command-line interpreter is a “shell” facility that will process the input command and produce an appropriate output response.
image
GNU Bash logo
An early shell facility was created for the Unix operating system by Stephen Bourne at Bell Labs way back in 1979. This early “Bourne shell” (sh) proved to be very popular as it was both a command-line interpreter and a scripting language that supported most features needed to produce structured programs.
Ten years later, in 1989, a free software replacement for the Bourne shell was created by Brian Fox for the GNU Project. Recognizing its ancestry, the replacement shell was named “Bash” – an acronym for the phrase Bourne-again shell. The Bash command syntax is a superset of that in the Bourne shell, but incorporates many extensions that are lacking in the Bourne shell. Bash can efficiently process commands typed at a prompt and execute shell program scripts that have been saved as text files.
image
The GNU Project is a free-software mass collaboration project. You can discover more at gnu.org/gnu/thegnuproject.en.html
Today Bash is the default shell for most Linux operating systems, for Apple’s macOS operating system (formerly OS X), and for the Solaris Unix operating system.
The Bash command-line processor typically runs in a text window. This is similar to the Command Prompt window found in the Windows operating system in which users can type commands to be interpreted by the Windows Command Processor.
Microsoft has recognized the power and popularity of Bash by introducing support for “WSL” (Windows Subsystem for Linux) in the Windows 10 operating system. This allows users to run a Linux environment directly on Windows so they can issue Bash commands at a shell prompt, create and execute Bash shell scripts, and run Linux command-line applications.
This book describes and demonstrates how to utilize the power of Bash with examples that can be run natively in a “Terminal” text window on a Linux operating system a...

Table of contents