Bash tricks

SHELL POLISHING

Article from Issue 70/2006
Author(s):

A few basic tricks can liven up the command line and add a dash of color to your console.

The shell is the command line interpreter that interfaces between the user and the system. Among other things it interprets commands, wildcards and variables, links commands, and passes program output in to other tools or to files. Besides the Bourne Shell (Sh), Korn Shell (Ksh), C Shell (Csh), and Z Shell (Zsh), the Bourne Again Shell, or Bash for short, plays a prominent role on Unix-style systems – it has long established itself as the standard shell on Linux. Working with Bash is a lot more fun if you modify the prompt to suit your personal preferences, if you are familiar with the many keyboard shortcuts, and if you add more functionality by defining your own aliases and environmental variables. Attention!

Commands are typically entered at the shell prompt. A typical prompt looks like this:

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

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

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Command Line: Environmental Variables

    Environmental variables give users the ability to set up the command line to suit their own needs.

  • Introducing Bash

    Beyond all the splash screens, screen savers, and vivid rock-star wallpaper is the simple yet powerful Bash shell.

  • Command Line: Fish

    The fish shell provides many features that rival the well-known Bash. We examine some highlights.

  • Command Line

    This month, we’ll show you how to decorate your console and give it a fresh new look by adding color to the command line with ANSI escape sequences.

  • Command Line: Bash Prompt

    Color-coding your prompt may help avoid configuration errors and data loss. We’ll show you how to design your own custom shell prompt with color and control sequences.

comments powered by Disqus

Direct Download

Read full article as PDF:

Command_Line_Bash_Tricks.pdf (159.99 kB)

News