CHAPTER 13 INTRODUCING THE BASH SHELL There s (Web hosting isp)
Thursday, October 18th, 2007CHAPTER 13 INTRODUCING THE BASH SHELL There s another reason why the shell is used to run programs: you can specify how a particular program runs before starting it. For example, to launch the Totem Movie Player in full-screen mode playing the myvideofile.mpg file, you could type this: totem –fullscreen myvideofile.mpg This saves the bother of starting the program, loading a clip, and then selecting the full- screen option. After you ve typed the command once or twice, you ll be able to remember it for the next time. No matter how much you love the mouse, you ll have to admit that this method of running programs is more efficient. When you get used to using the shell, it s likely you ll have it open most of the time behind your other program windows. Getting Started with the Shell You can start the shell in a number of ways. The most common is to use a terminal emulator program. As its name suggests, this runs a shell inside a program window on your desktop. You can start GNOME Terminal, the built-in GNOME shell emulator, by clicking Applications . Accessories . Terminal, as shown in Figure 13-1. Figure 13-1. Start the The GNOME Terminal program from the Accessories submenu. You ll see the terminal window a blank, white window that s similar to a simple text editor window. It will show what s referred to as a command prompt: a few words followed by the dollar symbol: $. On my test system, this is what I see: keir@ubuntu:~$ The first part is my username the user account I created during installation and use to log in to the PC. After the @ sign is the name of the PC, which I also chose when installing Ubuntu. The name of the PC isn t important on most desktop PCs; it s a legacy from the days of Unix. After the colon is the current directory you re browsing. In this example, the ~ symbol appears instead of an actual path or directory name. This is merely Linux shorthand for the user s homedirectory. In other words, wherever I see a ~on my test PC, I read it as /home/keir/. After this is the dollar symbol ($), which indicates that I m currently logged in as an ordinary