Sie sind auf Seite 1von 21

7/3/2010

 accepts your instruction or commands in


English (mostly) and if its a valid command, it
is pass to kernel.
 a user program or it's environment provided
for user interaction
 command language interpreter that executes
commands read from the standard input
device (keyboard) or from a file

1
7/3/2010

 BASH ( Bourne-Again SHell )


 Most common shell in Linux. It's Freeware shell.

 CSH (C Shell)
 The C shell's syntax and usage are very similar to the
C programming language.

 TCSH
 TCSH is an enhanced but completely compatible
version of the Berkeley UNIX C shell (CSH).

 "terminal emulators.“

 programs that put a window up and let you


interact with the shell.

2
7/3/2010

 CLI
 Because of the memorization and familiarity needed
to operate a command line interface new users find it
much more difficult to successfully navigate and
operate a command line interface.
 GUI
 Although new users may have a difficult at time
learning to use the mouse to operate and use a GUI
most users pick up this interface much easier when
compared to a command line interface.

3
7/3/2010

 CLI
 Users have much more control of their file system
and operating system in a command line interface.
For example, users can easily copy a specific type of
file from one location to another with a one-line
command.
 GUI
 Although a GUI offers plenty of control of a file
system and operating system often advance users or
users who need to do specific task may need to
resort to a command line to complete that task.

 CLI
 Because command line users only need to use their
keyboards to navigate a command line interface and often
only need to execute a few lines to perform a task an
advanced command line interface user would be able to
get something done faster then an advance GUI user.
 GUI
 A GUI may be easier to use because of the mouse.
However, using a mouse and/or keyboard to navigate
and control your operating system for many things is
going to be much slower than someone who is working in
a command line environment.

4
7/3/2010

 CLI
 A computer that is only using the command line
takes a lot less of the computers resources.
 GUI
 A GUI will require a lot more system resources
because of each of the elements that need to be
loaded such as icons, fonts, etc. In addition video
drivers, mouse drivers, and other drivers that need
to be loaded will also take additional resources.

 CLI
 Although many command line environments are
capable of multitasking they do not offer the same
ease and ability to view multiple things at once on
one screen.
 GUI
 GUI users have windows that enable a user to easily
view, control, and manipulate multiple things at
once and is commonly much faster to do when
compared to a command line.

5
7/3/2010

 CLI
 A command line interface enables a user to easily
script a sequence of commands to perform a task or
execute a program.
 GUI
 Although A GUI enables a user to create shortcuts,
tasks, or other similar actions to complete a task or
run a program it doesn't even come close in
comparison to what is available through a command
line.

 CLI
 Often when accessing another computer or networking
device over a network a user will only be able to
manipulate the device and/or its files using a command
line, CLI, or other text only manipulation.
 GUI
 Although remote graphical access is becoming popular
and is possible. Not all computers and especially not all
network equipment will have this ability.

6
7/3/2010

 features a file system order that is:


 thorough hierarchical 1
 specific to the function of a file and not to its
program context (no program directories) 2

7
7/3/2010

 centralized file system hierarchy is easy to


administer
 assures a seamless integration into the system,
regardless if the mount is a local partition or
one on the network server.
 Linux caches a lot of disk accesses using system
memory while it us running to accelerate these
accesses

Notes:
1Directories follow a designed order starting

from the root directory ( / ) instead of having


so-called “drives”.

2Linux sorts directories ascending from the


root directory ( / ) according to their
importance for the boot process. And it is the
operating system that determines into which
directories programs have to put their files
into.

8
7/3/2010

 Confusion about into which directory certain


files should be put into.

 Inconsistencies

9
7/3/2010

 The Linux filesystem hierarchy starts with the


root ( / ), all other directories are “children” of
this directory.

 Contains essential system programs that must


be available even if only the partition ( / ) is
mounted.
 Contains programs which the boot scripts
relies on.

10
7/3/2010

 Home of the kernel, the System.map, GRUB's


configuration files and other important boot
files

 contains device files

11
7/3/2010

 all important system-wide configuration files


are here or in one of its sub-directories

 user's home directory

12
7/3/2010

 essential libs needed for basic system


functionality

 if a file system check discovers any loose file


fragments, it puts them in here

13
7/3/2010

 contains the directories external media and


non-extfs2 are mounted to

 a bogus filesystem

 doesn't contain real files but runtime system


information i.e. system memory, devices,
mounted hardware used, etc

14
7/3/2010

 home directory of the system administrator,


root

 Linux discriminates between normal


executables and those used for system
maintenance or administrative tasks.
 The latter resides here and the less important ones in
/usr/sbin

15
7/3/2010

 contains temporary files

 usually the largest chunk of data on the system


 it contains all the files that might be shared by
the users of the system during normal
operation like executables, documentation,
libraries, or the X system.

16
7/3/2010

 contains variable data files like:


 logging files
 mail and printer spool directories

 Some of the directories can be put on a separate


partitions or systems for easier backups, due to
network topology or security concerns. Other
directories have to be on the root partition,
because they are vital for the boot process.
 Mountable directories are /home, /mnt, /tmp,
/usr, /var
 Essential for booting are /bin, /boot, /dev,
/etc, /lib, /proc, and /sbin

17
7/3/2010

pwd
 The directory you are standing in is called the
working directory
 To find the name of the working directory, use the
pwd command.

18
7/3/2010

ls
 list all the files in the working directory
 Commonly used options are:
 -l : Shows you huge amounts of information
(permissions, owners, size, and when last modified.)
 -a: Shows you all files, even files that are hidden
(these files begin with a dot.)

19
7/3/2010

cd
 To change your working directory (where you
are standing in the maze) you use the cd
command. To do this, type cd followed by the
pathname of the desired working directory
 Pathnames can be specified in one of two
different ways; absolute pathnames or relative
pathnames.

 An absolute pathname begins with the root directory


and follows the tree branch by branch until the path to
the desired directory or file is completed
 Where an absolute pathname starts from the root
directory and leads to its destination, a relative
pathname starts from the working directory
 To do this, it uses a couple of special symbols to
represent relative positions in the file system tree.
These special symbols are "." (dot) and ".." (dot dot).
 The "." symbol refers to the working directory and the
".." symbol refers to the working directory's parent
directory

20
7/3/2010

file
 As you wander around your Linux system, it is
helpful to determine what a file contains before
you try to view it.
 examine a file and tell you what kind of file it
is.
 To use the file program, just type:
file name_of_file

21