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.
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.
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 [email protected]. The value can vary; EMAIL could also refer to [email protected].
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.
[Illustration: Figure 6.1: Sample printenv output]
Environment variables are one way to configure the system. For example, the EDITOR variable lets you select your preferred editor for posting news, writing e-mail, and so on.
Setting environment variables is simple. For practice, try customizing your shell’s prompt and your text file viewer with environment variables. First, let’s get a bit of background information.