> Retrieving file system information.
> Reporting media mount point information via USB; for example, the Linux kernel reports what device to use to access files (such as /dev/sda
) if a USB camera or hard drive is detected on the system. You can use the dmesg
command to see this information.
> Getting the kernel version in /proc/version
, performance information such as uptime in /proc/uptime,
or other statistics such as CPU load, swap file usage, and processes in /proc/stat
.
Work with Shared Data in the /usr
Directory
The /usr
directory (nearly 3GB in size if you do a default install) contains software applications, libraries, and other types of shared data for use by anyone on the system. Many Linux system administrators give /usr
its own partition. A number of subdirectories under /usr
contain the X Window System (/usr/bin
), manual pages (/usr/share/man
), software package shared files (/usr/share/
, such as /usr/share/emacs
), additional application or software package documentation (/usr/share/doc
), and an entire subdirectory tree of locally built and installed software, /usr/local
.
Temporary File Storage in the /tmp
Directory
As its name implies, the /tmp
directory is used for temporary file storage; as you use Linux, various programs create files in this directory. The /tmp
directory is cleaned of stale files each day by the tmpwatch
command. (A stale file is any file not used after 10 days.) Settings in your system's scheduling table, /etc/crontab
, configure Fedora by default to use tmpwatch
to check /tmp
each day.
Access Variable Data Files in the /var
Directory
The /var directory contains subdirectories used by various system services for spooling and logging. Many of these variable data files, such as print spooler queues, are temporary, whereas others, such as system and kernel logs, are renamed and rotated in use. Incoming electronic mail is usually directed to files under /var/spool/mail.
Linux also uses /var
for other important system services. These include the topmost File Transfer Protocol (FTP) directory under /var/ftp
(see Chapter 20, 'Remote File Serving with FTP'), and the Apache web server's initial home page directory for the system, /var/www/html
. (See Chapter 17, 'Apache Web Server Management,' for more information on using Apache.)
Logging In to and Working with Linux
You can access and use a Linux system in a number of ways. One way is at the console with a monitor, keyboard, and mouse attached to the PC. Another way is via a serial console, either by dialup via a modem or a PC running a terminal emulator and connected to the Linux PC via a null modem cable. You can also connect to your system through a wired or wireless network, using the telnet
or ssh
commands. The information in this section shows you how to access and use the Linux system, using physical and remote text-based logins.
This chapter focuses on text-based logins and use of Linux. Graphical logins and using a graphical desktop are described in Chapter 3.
Text-Based Console Login
If you sit down at your PC and log in to a Linux system that has not been booted to a graphical login, you see a prompt similar to this one:
Fedora release 8 (Werewolf)
Kernel 2.6.23-1.217 fc8 on an i686
login:
Your prompt might vary, depending on the version of Fedora you are using. In any event, at this prompt, type in your username and press Enter. When you are prompted for your password, type it in and press Enter.
Note that your password is not echoed back to you, which is a good idea. Why is it a good idea? Well, people are prevented from looking over your shoulder and seeing how many characters are on your screen. It is not difficult to guess that a five-letter pass word might correspond to the user's spouse's first name!
Logging Out
Use the exit
or logout
commands to exit your session. Type the command and press Enter. You are then returned to the login prompt. If you use virtual consoles, remember to exit each console before leaving your PC. (Otherwise, someone could easily sit down and use your account.)
Logging In and Out from a Remote Computer
Although you can happily log in on your computer, an act known as a