SUSE Linux 10 Unleashed
Authors: McCallister M.
Published year: 2003
Pages: 45-49/332
Buy this book on amazon.com >>

Where All the Good Stuff Goes: Your /home Directory

Ultimately, the most important data on any computer belongs in this directory—the files you create for yourself. Every "real" (in contrast to a system) user on a Linux system gets a /home directory labeled with their username. That user has complete control over folders and files created in this directory and control over all access to those files except for the Root user.

In an effort to be helpful, SUSE Linux adds a few subdirectories to the /home directory by default:

  • /bin can hold binary (program) files, but is usually empty to begin with.

  • /Desktop holds your KDE desktop icons. GNOME users tend to have a cleaner look, but the subdirectory is there if you want it.

  • Documents is a lovely place to store word processing files and other, well... documents.

  • /public_html is a place to store your website. If you have a web server, such as Apache, installed, this directory links directly to your localhost URL. Read more about building websites in Chapter 14, "Creating Basic Websites," and Chapter 31, "Programming Dynamic Websites ." Learn more about the Apache web server in Chapter 26, "Managing Your Apache Web Server."

You can work with these subdirectories, create more, delete some—your /home is your playground. But remember, back up your /home directory regularly. It's designed for that.


Finding Desktop Programs in /opt

The Filesystem Hierarchy Standard (FHS) says, "The /opt/ directory provides storage for large, static application software packages." In practice, this seems to mean applications oriented to the desktop. Confined within /opt are all the built-in KDE and GNOME applications, Mozilla and its Firefox progeny, Softmaker Office files, and the Zope web application server. Depending on what you have installed, your mileage may vary.


Where Most of the Programs Go: The /usr Directory

The /usr directory is somewhat surprising when you look at it, because it has a parallel structure to the main (/) directory. This is why some folks give /usr its own mount point (that is, in DOS/Windows it would have its own drive letter). This directory is usually quite large (in the multigigabyte range, depending on how many applications you install) and contains many shared files and applications. It also houses the X Window System for graphical and remote computing. This directory is the place to start when looking for a particular application on your system, to handle troubleshooting, desktop icon placing, and everything in between.


Variable Data: The /var Directory

The /var directory holds subdirectories used by various system services for spooling and logging. Some of the files in this directory are temporary, like a printer queue spooler file. System and kernel logs keep much longer and so are renamed and rotated through periodically. Incoming local email is usually directed to /var/spool/mail as well.

Linux also uses /var for other system services. YaST keeps backup boot sectors and YaST Online Update files, among other things, in /var/lib/YaST2 . The RPM package database is also stored in /var/lib/rpm .


Changing User Information and the Finger Program

Unix was born in a multiuser environment at Bell Labs and was widely used in university computer science labs with a bunch of students floating in and out using whatever terminal was available. Defining users in a system was a necessity in the early days of Unix. As more users came on to systems with the advent of the PC, requiring users to log in was the touchstone of security measures. Today, because of viruses, worms, and assorted evildoers trying to break into networks almost constantly, named users and passwords are essential elements in any secure computing environment.

The Root user, who is responsible for all administrative tasks on the system, creates an account for each user. This involves assigning a username and creating an initial password for that user. You created the first user account for your system during the installation in Chapter 3, "Installing SUSE Linux."

The Root user can delegate responsibilities to a single user or a group of users by sharing the Root password. Those users can then run the SuperUser program (su) to act as the Root user. You will learn more about SuperUsers in Chapter 19.

Individual users cannot change their usernames. System administrators of large user communities like to have some consistency in usernames, especially considering that a username is a central element of that user's email address. Users can, however, change the information associated with their name and contained with your other login information in /etc/passwd and in your public "finger" file. This is generally phone-directory information that may need to be public, but that otherwise may be an artifact of a bygone era.

Finger was a program developed to help Unix users find each other, both electronically and physically. Typing finger <username> delivered whatever was in that user's finger file. To see what's in yours, type chfn (change finger information) at the shell prompt. By default, SUSE Linux does not create additional user information with new users, but it is easily configured by Root. You'll see something like this:

Name:

Office:

Office Phone:

Home Phone:

You're led through a series of prompts to enter new or updated information. Feel free to leave items blank (or change them appropriately).

SUSE Linux 10 Unleashed
Authors: McCallister M.
Published year: 2003
Pages: 45-49/332
Buy this book on amazon.com >>