A Polite Introduction to the Command Line

In your line of Kicker icons, there is something that looks like a screen with a shell in the lower right-hand corner. If you move your mouse over it and pause for a second, the bubble help will tell you that this is called Konsole. This is your command prompt. In Windows-land, you might have thought of it as the DOS prompt.

The reason there is a shell in front of the icon is because Konsole is your access to the Linux command line, known as the shell. There are many types of shells, each of which works similarly (e.g.: all allow you to run commands), but each may have different capabilities. The default on Linux is called bash, the GNU Bourne-Again Shell.

The shell is powerful, and learning about its capabilities will make you a wizard of the Linux world. Become one with the shell, and nothing can stop you. The shell is the land of the Linux systems guru and the administrator. For the most part, you can do just about anything you need to do by staying and working with the X window system and your KDE desktop. Still, from time to time, I will ask you to do something from the shell prompt. As time goes on, you too, will feel the power of the Linux shell.

Give me more!


For those of you who get to the end of the chapters in this book and find yourselves wanting to know more about the shell, check out the appendix section.

Here's our polite introduction. Click the Konsole icon. The Konsole will appear with a Tip of the Day window in front of it (Figure 4-12). Early on in your Linux experience, you might want to leave these tips on. You can even walk through them by clicking on the Next button. When you've had enough of these tips, you can banish them by checking off the check box to Show on start and clicking Close. If you find yourself missing the tips later on, click Help on the menu bar and select Tip of the Day.

Figure 4-12. Konsole (shell) with Tip of the Day.


When you do click Close, you'll be left with an open Konsole and your cursor sitting beside a dollar sign prompt. This is the shell prompt. Whenever you find yourself at a shell prompt, the system is waiting for you to type in a command. Remember the CD player from earlier? You could type kscd here and have it start up just as easily. For now, type date at the shell prompt, then hit the <Enter> key.

[marcel@mypc marcel]$ date
Tue Apr 8 10:37:22 EDT 2003

Aside from knowing the date and time that I wrote this paragraph, you'll also get your current date and time when you try it. That's what date is, a command that displays the date and time. You'll also find yourself back at the shell prompt as your system patiently awaits your next command. Type exit and press the <Enter> key.

The Konsole disappears. That's it. We'll use the shell again as we go through this book, but for now, your polite introduction to the shell ends here.