O'Reilly logo

Ubuntu Linux Toolbox: 1000+ Commands for Power Users, 2nd Edition by Christopher Negus

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

3

Using the Shell

IN THIS CHAPTER

Accessing the shell

Using command history and completion

Assigning aliases

Gaining super user access

Writing simple shell scripts

The use of a shell command interpreter (usually just called a shell) dates back to the early days of the first UNIX systems. Besides its obvious use of running commands, shells have many built-in features such as environment variables, aliases, and a variety of functions for programming.

Although the shell used most often with Linux systems is called the Bourne Again Shell (bash), other shells are available as well (such as sh, csh, ksh, and tcsh). In many cases, these shells, such as sh, are really symbolic links to other shell programs, such as bash. On Ubuntu Linux, sh is a symbolic link to /bin/dash. The sh shell is important as it is called in most shell scripts as the shell to run scripts. For interactive usage, bash forms the default shell.

This chapter offers information that will help you use Linux shells, in general, and the bash shell, in particular.

Terminal Windows and Shell Access

The most common way to access a shell from a Linux graphical interface is using a Terminal window. From a graphical interface, you can often access virtual terminals to get to a shell. With no graphical interface, with a text-based login you are typically dropped directly to a shell after login.

Using Terminal Windows

To open a Terminal window from Unity (the default Ubuntu desktop), select the Dashboard icon, and then begin ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required