Unix: Visual QuickStart Guide, Second Edition

Book description

What was once regarded as the purview of programmers and administrators is now making its way to users' desktops-most notably via Mac OS X-and users have begun to take note. When you're ready to get to the heart of it all-to the operating system at the core of the Internet, the intranet, and quite possibly your own desktop-there's no better way to start than by consulting with this handy Visual QuickStart Guide. The authors who made Unix comprehensible to the masses are back with Unix, 2nd Edition: Visual QuickStart Guide-completely updated to reflect all that's new in Unix. The book discusses how to run a home network server and use CUPS, Samba, http, and more. Through simple step-by-step instructions, numerous tips, and plenty of visual references, you'll learn everything you need to know to make sense of the flavors, commands, and technical jargon surrounding the Unix operating system. Printing in the Unix environment, managing your system, and more are all covered in the straightforward, approachable style that has become the hallmark of the Visual QuickStart series.

Table of contents

  1. Copyright
    1. Dedication
  2. Acknowledgments
  3. Introduction
    1. How Do You Use This Book?
      1. Who Are You?
      2. What Do You Need to Know to Get Started?
      3. Anything Else You Should Know?
  4. 1. Getting Started with Unix
    1. Connecting to the Unix System
      1. To connect to the Unix system:
    2. Logging In
      1. To log in:
    3. Changing Your Password with passwd
      1. To change your password:
    4. Listing Directories and Files with ls
      1. To list the files and directories of the directory you’re in:
      2. To list the files and directories of a specified directory:
    5. Changing Directories with cd
      1. To change directories:
    6. Finding Yourself with pwd
      1. To find out the name of the current directory:
      2. To find out the name of the current directory and its contents:
    7. Piping Input and Output
      1. To pipe commands:
    8. Redirecting Output
      1. To redirect output to a new file:
      2. To append output to an existing file:
    9. Using Wildcards
    10. Viewing File Contents with more
      1. To view a file with more:
    11. Displaying File Contents with cat
      1. To display file contents with cat:
    12. Exploring the System
      1. To explore locally installed programs:
    13. Getting Help with man
      1. To access a man page:
      2. To find a specific man page:
    14. Logging Out
      1. To log out:
  5. 2. Using Directories and Files
    1. Creating Directories with mkdir
      1. To create a directory:
    2. Creating Files with touch
      1. To create a file:
    3. Copying Directories and Files with cp
      1. To copy a directory:
      2. To copy a file:
    4. Listing Directories and Files with ls (More Goodies)
      1. To list filenames and information:
      2. To list all files in a directory:
    5. Moving Files with mv
      1. To move a file or directory:
    6. Removing Files with rm
      1. To remove a file:
      2. To remove multiple files:
    7. Removing Directories with rmdir
      1. To remove a directory:
    8. Finding Forgotten Files with find
      1. To find a file:
      2. To find files starting in a specific directory:
      3. To find and act on files:
    9. Locating Lost Files with locate
      1. To locate a file:
    10. Linking with ln (Hard Links)
      1. To make a hard link:
    11. Linking with ln -s (Soft Links)
      1. To make a soft link:
  6. 3. Working with Your Shell
    1. Discovering What Shell You’re Using
      1. To discover what shell you’re using:
    2. Understanding Shells and Options
      1. To see which shells are available to you:
    3. Changing Your Shell with chsh
      1. To change your shell with chsh:
    4. Changing Your Shell Temporarily
      1. To find out which temporary shells you can use:
      2. To create a temporary shell (subshell):
      3. To exit a temporary shell (subshell):
    5. Using Completion in the bash Shell
      1. To use completion in the bash shell:
    6. Viewing Session History in the bash Shell
      1. To view session history in the bash shell:
    7. Using Completion in the zsh Shell
      1. To use completion in the zsh shell:
    8. Viewing Session History in the zsh Shell
      1. To view session history in the zsh shell:
    9. Using Completion in the ksh Shell
      1. To use completion in the ksh shell:
    10. Viewing Session History in the ksh Shell
      1. To view session history in the ksh shell:
    11. Viewing Session History in the csh Shell
      1. To view session history in the csh shell:
    12. Changing Your Identity with su
      1. To log in as a different user with su:
      2. To start a new log-in shell with su:
      3. To return to the previous shell:
    13. Fixing Terminal Settings with stty
      1. To fix and key oddities with stty:
      2. To fix general terminal weirdness with stty:
    14. Exiting the Shell
      1. To exit from the shell:
  7. 4. Creating and Editing Files
    1. Choosing an Editor
      1. About pico
      2. About vi
      3. About emacs
    2. Starting pico and Dabbling with It
      1. To start pico and dabble with it:
    3. Saving in pico
      1. To save in pico:
    4. Cutting and Pasting Text Blocks in pico
      1. To cut and paste text in pico:
    5. Checking Spelling in pico
      1. To spell-check in pico:
    6. Getting Help in pico
      1. To get help in pico:
      2. To get help with pico startup options:
    7. Exiting pico
      1. To exit pico:
    8. Starting vi and Dabbling with It
      1. To start vi:
    9. Saving in vi
      1. To save text in vi:
    10. Adding and Deleting Text in vi
      1. To add or delete text in vi:
    11. Importing Files into vi
      1. To import files in vi:
    12. Searching and Replacing in vi
      1. To find a string of text in vi:
      2. To search and replace in vi:
    13. Exiting vi
      1. To exit vi:
    14. Starting emacs and Dabbling with It
      1. To start emacs:
    15. Using emacs Menus to Spell-Check
      1. To use emacs menus to spell-check:
    16. Saving in emacs
      1. To save text in emacs:
    17. Exiting emacs
      1. To exit emacs:
  8. 5. Controlling Ownership & Permissions
    1. Understanding File Ownership and Permissions
    2. Finding Out Who Owns What
      1. To find out who owns what:
    3. Finding Out Which Group You’re In
      1. To find out which group you’re in:
    4. Changing the Group Association of Files and Directories with chgrp
      1. To change group association with chgrp:
    5. Changing Ownership of Files and Directories with chown
      1. To change ownership with chown:
    6. Changing Permissions with chmod
      1. To check current permissions:
      2. To set permissions:
      3. To add permissions:
      4. To remove permissions:
    7. Translating Mnemonic Permissions to Numeric Permissions
      1. To set permissions using numeric equivalents:
    8. Changing Permission Defaults with umask
      1. To figure the umask value:
      2. To set default file-creation permissions with umask:
  9. 6. Manipulating Files
    1. Counting Files and Their Contents with wc
      1. To count words using wc:
      2. To count lines with wc:
    2. Viewing File Beginnings with head
      1. To view file beginnings with head:
      2. To view a specified number of lines:
      3. To view the beginnings of multiple files:
    3. Viewing File Endings with tail
      1. To view file endings with tail:
      2. To view a specified number of lines:
      3. To view the endings of multiple files:
    4. Finding Text with grep
      1. To find text strings with grep:
    5. Using Regular Expressions with grep
      1. To use regular expressions with grep:
    6. Using Other Examples of Regular Expressions
      1. To find lines with specific characteristics:
    7. Making Global Changes with sed
      1. To make global changes with sed:
    8. Changing Files with awk
      1. To change files with awk:
    9. Comparing Files with cmp
      1. To compare files with cmp:
    10. Finding Differences in Files with diff
      1. To find differences with diff:
    11. Finding Differences in Files with sdiff
      1. To compare files with sdiff:
    12. Sorting Files with sort
      1. To sort files with sort:
    13. Eliminating Duplicates with uniq
      1. To eliminate duplicates with uniq:
    14. Redirecting to Multiple Locations with tee
      1. To redirect output to two locations with tee:
    15. Changing with tr
      1. To translate case with tr:
      2. To break lines with tr:
    16. Formatting with fmt
      1. To format with fmt:
    17. Preparing to Print with pr
      1. To process with pr:
    18. Splitting Files with split
      1. To split files with split:
  10. 7. Getting Information About the System
    1. Getting System Information with uname
      1. To find out about the system using uname:
    2. Viewing File Systems with df
      1. To find out about file systems with df:
    3. Determining Disk Usage with du
      1. To determine disk usage with du:
    4. Finding Out File Types with file
      1. To identify file types with file:
    5. Finding Out About Users with finger
      1. To find out who is logged in using finger:
      2. To find out about users using finger:
    6. Learning Who Else Is Logged in with who
      1. To snoop with who:
    7. Learning Who Else Is Logged in with w
      1. To find out who is logged in with w:
    8. Getting Information About Your Userid with id
      1. To check userid information using id:
  11. 8. Configuring Your Unix Environment
    1. Understanding Your Unix Environment
    2. Discovering Your Current Environment
      1. To show your current environment in zsh, bash, or ksh:
      2. To show your current environment in csh:
    3. Adding or Changing Variables
      1. To add or change a variable in zsh, bash, or ksh:
      2. To add or change a variable in csh:
    4. Looking at Your zsh Configuration Files
      1. To look at your zsh configuration files:
    5. Adding to Your zsh Path
      1. To change your zsh path:
    6. Changing Your zsh Prompt
      1. To change your zsh prompt:
    7. Looking at Your bash Configuration Files
      1. To look at your bash configuration files:
    8. Adding to Your bash Path
      1. To change your bash path:
    9. Changing Your bash Prompt
      1. To change your bash prompt:
    10. Looking at Your ksh Configuration Files
      1. To look at your ksh configuration files:
    11. Changing Your ksh Path
      1. To change your ksh path:
    12. Changing Your ksh Prompt
      1. To change your ksh prompt:
    13. Looking at Your csh Configuration Files
      1. To look at your csh configuration files:
    14. Changing Your csh Path
      1. To change your csh path:
    15. Changing Your csh Prompt
      1. To change your csh prompt:
    16. Setting Aliases with alias
      1. To set an alias with alias:
  12. 9. Running Scripts and Programs
    1. Running a Command
      1. To run a command:
      2. To run a specific command:
    2. Scheduling One-Time Jobs with at
      1. To schedule a one-time job with at:
      2. To schedule sequential one-time jobs with at:
      3. To delete a scheduled job:
    3. Scheduling Regularly Occurring Jobs with cron
      1. To schedule a regularly occurring job with cron:
    4. Suspending Jobs
      1. To suspend a job:
    5. Checking Job Status with jobs
      1. To check job status with jobs:
    6. Running Jobs in the Background with bg
      1. To run jobs in the background with bg:
    7. Running Jobs in the Foreground with fg
      1. To run jobs in the foreground with fg:
    8. Controlling Job Priority with nice
      1. To control job order with nice:
    9. Timing Jobs with time
      1. To time a job using time:
      2. To compare job times with time:
    10. Finding Out What Processes Are Running with ps
      1. To find out what processes are running with ps:
    11. Deleting Processes with kill
      1. To kill a job with kill:
      2. To delete a process with kill:
  13. 10. Writing Basic Scripts
    1. Creating a Shell Script
      1. To create a shell script:
    2. Running a Shell Script
      1. To run a script:
    3. Making a Script Executable
    4. Getting a Head Start on Scripts with history
      1. To get a head start on your script with history:
    5. Embedding Commands
      1. To embed a command:
    6. Looping Your Scripts
      1. To make a loop:
    7. Creating If-Then Statements
      1. To write an if-then conditional statement:
    8. Accepting Command-Line Arguments in Your Scripts
      1. To accept command-line arguments in a script:
    9. Accepting Input While a Script Is Running
      1. To accept input while a script is running:
    10. Debugging Scripts
      1. To print the script onscreen as it runs:
  14. 11. Sending and Reading Email
    1. Choosing an Email Program and Getting Started
    2. Reading Email with pine
      1. To read email with pine:
    3. Sending Email with pine
      1. To compose and send a message using pine:
    4. Customizing pine
      1. To customize pine:
    5. Reading Email with mutt
      1. To read email with mutt:
    6. Sending Email with mutt
      1. To compose and send a message using mutt:
    7. Reading Email with mail
      1. To read email with mail:
    8. Sending Email with mail
      1. To compose and send a message using mail:
      2. To send text files with mail:
    9. Creating a Signature File
      1. To create a signature file:
    10. Forwarding Incoming Messages
      1. To forward incoming email messages:
    11. Announcing an Absence with vacation
      1. To send “I’m on vacation” messages using vacation:
      2. To stop vacation emails:
    12. Configuring procmail
      1. To specify settings for procmail:
      2. To turn on procmail filtering:
    13. Responding to Email with procmail
      1. To specify how messages should be filtered (to “write a recipe”):
      2. To forward mail with procmail:
      3. To invoke vacation with procmail:
  15. 12. Accessing the Internet
    1. Getting Familiar with Unix Internet Lingo
    2. Logging in to Remote Systems with ssh
      1. To connect to another computer using ssh:
    3. Logging in to Remote Systems with telnet
      1. To connect to another computer using telnet:
    4. Communicating with Other Users Using write
      1. To communicate with other users using write:
    5. Communicating with Other Users Using talk
      1. To communicate with other users using talk:
    6. Getting Files from the Internet with ftp
      1. Getting a single file through anonymous ftp:
    7. Sharing Files on the Internet with ftp
      1. To share files on the Internet with ftp:
    8. Surfing the Web with links
      1. To surf the Web with links:
    9. Surfing the Web with lynx
      1. To surf the Web with lynx:
    10. Downloading the Web with wget
      1. To download the Web with wget:
    11. Checking Connections with ping
      1. To check a computer with ping:
    12. Tracing Connections with traceroute
      1. To trace a connection with traceroute:
    13. Matching Domain Names with IP Numbers
      1. To match a domain name with an IP number using nslookup:
      2. To match a domain name with an IP number using dig:
    14. Choosing a News Reader
    15. Reading News with pine
      1. To configure pine to read news:
      2. To subscribe to newsgroups with pine:
      3. To read newsgroup messages with pine:
    16. Reading News with tin
      1. To subscribe to newsgroups with tin:
      2. To read newsgroup messages with tin:
  16. 13. Working with Encoded & Compressed Files
    1. Encoding Files with uuencode
      1. To encode a file using uuencode:
      2. To encode with uuencode and email at once:
    2. Decoding Files with uudecode
      1. To decode files with uudecode:
    3. Archiving with tar
      1. To archive a directory with tar:
    4. Unarchiving Files with tar
      1. To unarchive files with tar:
      2. To unarchive selected files with tar:
    5. Compressing Files with compress
      1. To compress a file with compress:
    6. Uncompressing Files with uncompress
      1. To uncompress a file with uncompress:
    7. Zipping a File or Directory with gzip
      1. To zip a file or directory with gzip:
    8. Unzipping a gzip File with gunzip
      1. To unzip a gzip file with gunzip:
    9. Zipping Files and Directories with zip
      1. To zip files or directories with zip:
    10. Unzipping Zipped Files with unzip
      1. To unzip a zip file using unzip:
    11. Combining Commands
      1. To uudecode and gunzip at one time:
      2. To uncompress and untar at one time:
      3. To tar and gzip at one time:
  17. 14. Installing Your Own Software
    1. Understanding Unix Software Installation
    2. Finding Unix Software
    3. Downloading, Placing, and Decompressing Software
      1. To download, place, and decompress software:
    4. Configuring Software
      1. To configure software:
    5. Compiling and Installing with make install
      1. To compile and install using make install:
  18. 15. Using Handy Utilities
    1. Calendaring with cal
      1. To use the cal utility:
    2. Calculating with bc
      1. To calculate with bc:
    3. Evaluating Expressions with expr
      1. To evaluate with expr:
    4. Converting with units
      1. To convert with units:
    5. Checking Spelling with ispell
      1. To check spelling with ispell:
    6. Looking It up with look
      1. To look up a definition with look:
    7. Printing with lp
      1. To print with lp:
    8. Keeping a Record of Your Session with script
      1. To record your session with script:
  19. 16. Being Root
    1. Acting Like root with sudo
      1. To act like root with sudo:
    2. Becoming root with su
      1. To become root:
    3. Starting, Stopping, and Restarting Daemons
      1. To start a daemon:
    4. Changing the System Configuration
      1. To change the motd:
    5. Monitoring the System
      1. To monitor logs:
      2. To monitor users:
      3. To monitor system load:
    6. Keeping up with watch
      1. To watch:
    7. Checking Boot Messages with dmesg
      1. To check status with dmesg:
    8. Setting the Date and Time
      1. To set the time with ntpdate:
  20. 17. Sensational Unix Tricks
    1. Cleaning up HTML Documents with tidy
      1. To clean up HTML documents with tidy:
    2. Searching and Replacing Throughout Multiple Documents with sed
      1. To search and replace throughout multiple documents:
    3. Generating Reports with awk
      1. To generate reports with awk:
    4. Using Input to Customize Your Environment
      1. To use input to customize your environment:
    5. Using ROT13 Encoding with sed
      1. To use ROT13 encoding with sed:
    6. Embedding ROT13 Encoding in a Shell Script
      1. To create a ROT13 shell script:
    7. Making Backups with rsync
      1. To make backups with rsync:
    8. Using Advanced Redirection with stderr
      1. To redirect stderr in zsh, bash, ksh, and similar shells:
  21. A. Unix Reference
  22. B. What’s What and What’s Where
  23. C. Command Flags

Product information

  • Title: Unix: Visual QuickStart Guide, Second Edition
  • Author(s): Deborah S. Ray, Eric J. Ray
  • Release date: March 2003
  • Publisher(s): Peachpit Press
  • ISBN: 9780321170101