Back to basics with the Bash terminal

Slashdot it! Delicious Share on Facebook Tweet! Digg!

Shell Supremacy

The Linux terminal, the shell, or whatever name you know it by, is ubiquitous in the Linux world. Although it was created in the 1970s, the earliest days of modern computing, it has not outlived its usefulness.

We've done this before. In Ubuntu User #21 [1], we also dedicated our cover story to the shell. Back then, we talked mainly about scripting. We showed how to add "graphical" text menus to terminal-based apps, how to clean up your code to make it more legible and maintainable, and how you could make Bash scripts more efficient and faster by compiling them into machine code.

This time, of course, it's different. In fact, it is impossible to cover everything the shell can do in one, may I say, puny cover section. Whole big, bulky, and very heavy books have been written about the subject after all. And, if that were not enough, the shell has grown a lot since its inception: New instructions, old instructions that have learnt new tricks, and improved and repurposed versions of classic commands all guarantee that writing a complete treatise on the subject is all but impossible.

In this issue, we bring you an illustrated guide to the shell. We're broaching low-level, very basic commands this time around – the building blocks, as it were, of which whole systems are made.To make things simpler, the articles themselves include comprehensive tables listing common and exotic (although always useful) options for each instruction, along with screenshots showing how to use them in context. Visit our FTP site [2] to get the sample files and the longer scripts so you can start practicing immediately on data manipulation and file processing from the command line.

As mentioned above, you'll learn the very basic, but powerful, instructions that are the cornerstones of all Unix systems: things like the sed , awk , cat , and other text and data manipulators; the essential looping structures and how to use them for advanced process control; and the mechanisms used to capture user input or events that happen while the system is running.

These tools will give you the basics on which to build bigger things and start you on the road to becoming a true shell guru.

Much has happened since the shell was built into code by Ken Thompson back in 1971. Although it is now possible to live and work with a modern Linux operating system, such as Ubuntu, and never or very rarely feel the need to drop down into the terminal, users who ignore the power of the command line are cutting themselves off from one of the most powerful, if not the most powerful, toolset in modern computing.

Knowledge of the shell will make you more efficient, in the eyes of your peers, nearly superhumanly so. With a handful of commands linked by pipes, you will be able to solve problems that would force others to slog through tens, nay hundreds of files, carrying out repetitive tasks.

And, because the shell is largely universal (it's even available on Macs!), you can be sure that, even when faced with unfamiliar or buggy graphical tools, you can always open a terminal and get work done.

So, turn the page, fire up your terminal window, and get hacking.

Infos

  1. Ubuntu User , Issue 21: http://www.ubuntu-user.com/Magazine/Archive/2014/21
  2. Sample text files and scripts for this issue: ftp://ftp.linux-magazine.com/pub/listings/ubuntu-user.com/25/

Buy this article as PDF

Express-Checkout as PDF

Pages: 1

Price $0.99
(incl. VAT)

Buy Ubuntu User

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content