Running Commands from the Shell
computer software
Running Commands from the Shell Running Commands from the Shell
Running Commands from the Shell   Home | Site Map | About Us | Products | Services | News | Contact Us | Links Running Commands from the Shell
Running Commands from the Shell Running Commands from the Shell

Copyright © 2009

Linux® Bible


/root
-- Represents the root user's home directory. The home directory for root does not
reside beneath
/home
for security reasons.
/sbin
-- Contains administrative commands and daemon processes.
/sys
-- A
/proc
-like file system, new in the Linux 2.6 kernel and intended to contain
files for getting hardware status and reflecting the system's device tree as it is seen by the
kernel. It pulls many of its functions from
/proc
.
/tmp
-- Contains temporary files used by applications.
/usr
-- Contains user documentation, games, graphical files (X11), libraries (lib), and a
variety of other user and administrative commands and files.
/var
-- Contains directories of data used by various applications. In particular, this is
where you would place files that you share as an FTP server (
/var/ftp
) or a Web
server (
/var/www
). It also contains all system log files (
/var/log
) and spool files in
/var/spool
(such as
mail
,
cups
, and
news
).
The file systems in the DOS or Microsoft Windows operating systems differ from Linux's file struc-
ture, as the sidebar "Linux File Systems Versus Windows-Based File Systems" explains.
Linux File Systems Versus Windows-Based File Systems
Although similar in many ways, the Linux file system has some striking differences from file systems
used in MS-DOS and Windows operating systems. Here are a few:
In MS-DOS and Windows file systems, drive letters represent different storage devices (for
example, A: is a floppy drive and C: is a hard disk). In Linux, all storage devices are fit
into the file system hierarchy. So, the fact that all of
/usr
may be on a separate hard disk
or that
/mnt/rem1
is a file system from another computer is invisible to the user.
Slashes, rather than backslashes, are used to separate directory names in Linux. So,
C:\home\chris
in an MS system is
/home/chris
in a Linux system.
Filenames almost always have suffixes in DOS (such as .txt for text files or .doc for word-
processing files). Although at times you can use that convention in Linux, three-character
suffixes have no required meaning in Linux. They can be useful for identifying a file type.
Many Linux applications and desktop environments use file suffixes to determine the con-
tents of a file. In Linux, however, DOS command extensions such as ·com, .exe, and .bat
don't necessarily signify an executable (permission flags make Linux files executable).
Every file and directory in a Linux system has permissions and ownership associated with
it. Security varies among Microsoft systems. Because DOS and MS Windows began as
single-user systems, file ownership was not built into those systems when they were
designed. Later releases added features such as file and folder attributes to address this
problem.
67
Running Commands from the Shell
2