-->
Previous Table of Contents Next


Section II
Using Linux

Now that you have Linux installed and configured on your PC, it’s time for the fun part—actually using it.

Chapter 4 covers basic Linux tools that you’ll probably use every day in some fashion. The coverage here focuses on tools that are unique to Linux, whether they be features not found in other UNIX implementations or features found in the UNIX world that have been slightly changed for use under Linux. A good example of this is the elvis text editor, which is a clone of the ubiquitous vi editor.

Chapter 5 covers additional Linux tools that you probably won’t use every day, but that will still come in handy. This would include the emacs text editor and the Mtools, which are specific to Linux and allow Linux to interoperate mare easily with the PC architecture.

Chapter 6 introduces basic system administration and the tools you’ll need to use Linux on a long-term basis, whether you’re working on a standalone system or a network. These include utilities for hard-disk usage, managing users, and scheduling tasks.

Chapter 4
Basic Linux Tools

This chapter covers:

  Linux tools
  The Linux filesystem
  File types
  File permissions
  Basic Linux commands
  Wildcards
  Other ways of viewing files
  Linux and passwords
  Linux shells
  Using the elvis text editor

Linux Tools

Because it’s a UNIX workalike, you’d expect Linux to toe the line when it comes to UNIX design philosophy and user tools. Design philosophy? Yes. As an operating system, UNIX can be seen as a collection of tools, some more important than others. Because UNIX (and Linux, for that matter) originally evolved through the contributions of a widespread computing community, UNIX tools tend to spring up in response to specific situations: When a problem needed to be solved, either a new command was added or new options were added to old commands.

This tool-based approach is what gives UNIX much of its perceived complexity. Compared to Microsoft Windows and the Macintosh operating system, the use of UNIX tools like vi and ls may seem to be fairly archaic and nonintuitive. For the outsider, they are.

But once you spend some time with UNIX and its command structure, you’ll see that there’s a great deal of logic underlying the UNIX operating system—and by extension, the Linux operating system. Once you’ve mastered a few Linux commands, you can move on to more complex command lines and more complex computing chores. We’ll begin this chapter with a discussion of basic UNIX/Linux commands and concepts. In the next chapter, we’ll discuss more advanced Linux tools. The tools in this chapter can be run from a command line or under the X Window System in an xterm window.


NOTE:  If you’re a computing neophyte, you may want to check out a basic UNIX text (such as teach yourself . . . UNIX, Third Edition—MIS:Press) for a more detailed explanation of UNIX directories, files, commands, command lines, pipes, and standard input/output. See Appendix A for details.

The Linux Filesystem

Linux organizes your information in files. Files can contain text, programming information, shell scripts, or virtually any other kind of information.

We’re not going to spend a lot of time on this basic concept here or on the different types of files under the UNIX operating system; if you’re not sure what a file is, you should check out one of the basic UNIX texts listed in Appendix A. However, there are some things you should know about how Linux treats files:

  Linux has no practical limit on the length of filenames. While there are some internal limits on filename size (namely, 256 characters), you’re probably not going to run into these limits. If you’re frustrated by DOS’s eight-dot-three filename limitation, you’ll be pleased with this aspect of Linux. However, if you’re using Linux on a network with other forms of UNIX, you’ll probably want to limit your filenames to a 14-character limit, because this is the general limit in the UNIX world.
  Linux has few limitations on what characters can be used in filenames. Generally speaking, you shouldn’t use the following characters in filenames:

  ! @ # $ % ^ & ( ) [ ] { } ' " ? | ; < > ` + - \ / . ..


These characters have a tendency to conflict with the shell. In addition, you can’t use spaces in the middle of a filename.
  With Linux, case always counts, and that includes filenames. Under Linux, report, Report, and REPORT are three different files.

A file can be looked at in a few different ways when it comes to the name. When we refer to files throughout this chapter, we’re mainly speaking about the filename itself (like test) and not the absolute pathname. Under Linux, an absolute filename is the name of the file as measured from the root directory. Therefore, a file that’s stored in a subdirectory (which you’ll learn about later in this chapter) named /home/kevinr would have an absolute pathname of /home/kevinr/test. When we refer to test without a reference to the subdirectory containing it, we’re referring to its relative pathname. There’s a lot more rigmarole to do with relative pathnames, but you’ll probably not deal with it all that often.

One difference from MS-DOS that you’ll notice: With Linux, there’s no such thing as drive names. There’s a single filesystem, and any differences in physical media are pretty much abstracted away. This is why the CD-ROM drive actually appears as part of the filesystem as /cdrom. Similarly, the floppy drive is represented by a device driver, not a physical drive letter. (There are ways that Linux deals with floppy drives; some of them will be covered in Chapter 5.)


Previous Table of Contents Next