Your Home Directory

When you first log in on a Linux system or start a terminal emulator window, your working directory is your home directory. To display the pathname of your home directory, use pwd just after you log in (Figure 6-4).

When used without any arguments, the Is utility displays a list of the files in the working directory. Because your home directory has been the only working directory you have used so far, Is has always displayed a list of files in your home directory. (All the files you have created up to this point were created in your home directory.)

Startup Files

Startup files, which appear in your home directory, give the shell and other programs information about you and your preferences. Frequently one of these files tells the shell what kind of terminal you are using (page 1040) and executes the stty (set terminal) utility to establish the erase (page 139) and line kill (page 139) keys.

Either you or the system administrator can put a shell startup file containing shell commands in your home directory. The shell executes the commands in this file each time you log in. Because the startup files have hidden filenames, you must use the ls -a command to see whether one is in your home directory. A GUI has many startup files. Usually you do not need to work with these files directly but can control startup sequences by using icons on the desktop. See page 281 for more information about startup files.

login: alex Password:

Last login: Wed Oct 20 11:14:21 from bravo $ pwd


Figure 6-4 Logging in and displaying the pathname of your home directory

0 0

Post a comment