The bash shell can guess what filename or command you are trying to type and automatically finish typing it for you. Just type the beginning of a command or filename and press Tab. If bash finds a single unique completion, it will finish the word and put a space after it. If it finds multiple possible completions, it will fill out the part all completions have in common and beep. You can then enter enough of the word to make it unique and press Tab again. If it finds no completions, it will simply beep.

5.7 Managing Your Identity

Unix-like systems are multiuser, and so you have your own electronic identity as a user on the system. Type finger yourusername to look at some of the information about you that’s publically available. To change the name and shell listed there, you can use the commands chfn and chsh. Only the superuser can change your login (username) and directory. You’ll notice that it says “No plan.” A “plan” is just some information you can make available to others. To create a plan, you put whatever information you want people to see in a file called .plan. To do this you’ll use a text editor; see section 8.2 on page [*]. Then finger yourself to see your plan. Others can finger you to see your plan and to check whether you’ve received new mail or read your mail.

Note that this finger information is available to the entire Internet by default. If you don’t want this, read about configuring inetd and the file /etc/services. Eventually the installation manual will describe this configuration, but for now you might try the man pages or just put nonsense in for your finger information.

6. Using the Shell

As you have been reading this book, you’ve been interacting with the shell already. The shell is the program that reads your commands and then does what you ask it to. In this chapter, you explore the shell in greater detail, with a special eye towards customizing the shell to work as you want it to.

6.1 Environment Variables

Every process has an environment associated with it. An environment is a collection of environment variables. A variable is a changeable value with a fixed name. For example, the name EMAIL could refer to the value joe@nowhere.com. The value can vary; EMAIL could also refer to jane@somewhere.com.

Because your shell is a process like any other, it has an environment. You can view your shell’s environment by entering the printenv command. Figure 6.1 has some sample output from printenv. On your system, the output will be different but similar.