Академический Документы
Профессиональный Документы
Культура Документы
Linux Presentation
Copyright © 2007. Cybage Software Pvt. Ltd. All Rights Reserved. Cybage Confidential.
Agenda
Copyright © 2007. Cybage Software Pvt. Ltd. All Rights Reserved. Cybage Confidential.
Unix History & Its principles
Unix History
First version of Unix was created in Bell Labs in 1969
Thereafter many Unix flavors emerged with its new name
E.g. IBM – AIX, HP – UX, SUN – Solaris etc..
These all flavors operate in similar manner
Unix Principles
Everything is a file including hardware
Can create small, single purpose programs
Chain the programs together to perform complex tasks
Copyright © 2007. Cybage Software Pvt. Ltd. All Rights Reserved. Cybage Confidential.
Linux origins and Why Linux
Linus Torvald, a Finnish college student in 1991 created Linux
kernel
And when Linux kernel combined with GNU applications, Complete
free UNIX-like OS possible
It is open source development model – Free software!
It supports wide variety of hardware
It supports many networking protocols and configurations
Now it is fully supported (RedHat, SuSE)
Copyright © 2007. Cybage Software Pvt. Ltd. All Rights Reserved. Cybage Confidential.
Logins / Virtual Consoles / Command syntax
Login Modes:Text & Graphical Login Mode
Virtual consoles provide multiple non-GUI logins
There are by default 6 available virtual consoles
It is available through CTRL – ALT - F [ 1 - 6 ]
And X will be available at CTRL – ALT – F7, incase if it is running
Linux Commands have the following syntax:
commands [options] [arguments]
Each item is separated by a space
Command options modify the command behavior
Arguments are filenames or other information needed by the
command
Command can be separated with semicolon (;)
Copyright © 2007. Cybage Software Pvt. Ltd. All Rights Reserved. Cybage Confidential.
Getting Help In Linux
Copyright © 2007. Cybage Software Pvt. Ltd. All Rights Reserved. Cybage Confidential.
Browsing the Filesystem
Copyright © 2007. Cybage Software Pvt. Ltd. All Rights Reserved. Cybage Confidential.
Other Important Directories
Copyright © 2007. Cybage Software Pvt. Ltd. All Rights Reserved. Cybage Confidential.
Absolute Pathnames & Relative Pathnames
Absolute pathnames begin with a slash (/)
It signifies complete "road map" to file location
It can be used anytime you wish to specify a file name
Copyright © 2007. Cybage Software Pvt. Ltd. All Rights Reserved. Cybage Confidential.
Changing Directories & Listing Directory Contents
cd - Changing directories
Change directories to an absolute or relative path
$ cd /home/jkumar/project
$ cd project/documents
Move to a directory one level up
$ cd ..
Move to your home directory
$ cd
Move to your previous working directory:
$ cd –
Lists the contents of the current directory or as specified
ls [options] [files_or_dirs]
Copyright © 2007. Cybage Software Pvt. Ltd. All Rights Reserved. Cybage Confidential.
Copying, Moving and Renaming Files and Directories
Copyright © 2007. Cybage Software Pvt. Ltd. All Rights Reserved. Cybage Confidential.
Creating and Removing Files & Directories
rm - remove files
Usage: rm [options] filenames
-i - interactive
-r - recursive
-f - force
touch – create empty files or update file timestamps
mkdir - make a directory
rmdir - remove an empty directory
rm –r - recursively remove a directory and all of its contents
Copyright © 2007. Cybage Software Pvt. Ltd. All Rights Reserved. Cybage Confidential.
Determining File Content & Viewing Text File
Copyright © 2007. Cybage Software Pvt. Ltd. All Rights Reserved. Cybage Confidential.
Partitions, File System And File Types
Disk drives are divided into partitions
Partitions are formatted with file system allowing user to store
data
Default file system: ext3, The Third Extended Linux File System
Other common file systems: ext2 and msdos (Typically used for
the floppies) & iso 9660 (Typically used for the CDs)
There are seven fundamental file types..
Regular File (-)
Directory (d)
Symbolic Link (l)
Block Special File (b)
Character Special File (c)
Named Pipe (p)
Socket (s)
Copyright © 2007. Cybage Software Pvt. Ltd. All Rights Reserved. Cybage Confidential.
Inode – Index Node
Copyright © 2007. Cybage Software Pvt. Ltd. All Rights Reserved. Cybage Confidential.
Symbolic and Hard Links
A symbolic link points to another file
ls –l displays the link name and the referenced file
The content of the symbolic link is the name of the file that that
its references
ln –s <file name> <link name>
Copyright © 2007. Cybage Software Pvt. Ltd. All Rights Reserved. Cybage Confidential.
Checking Free Space
Copyright © 2007. Cybage Software Pvt. Ltd. All Rights Reserved. Cybage Confidential.
Removable Media
Copyright © 2007. Cybage Software Pvt. Ltd. All Rights Reserved. Cybage Confidential.
Archive Files & Compression Utilities
Copyright © 2007. Cybage Software Pvt. Ltd. All Rights Reserved. Cybage Confidential.
The bash Shell
Copyright © 2007. Cybage Software Pvt. Ltd. All Rights Reserved. Cybage Confidential.
Command Line Shortcuts
Copyright © 2007. Cybage Software Pvt. Ltd. All Rights Reserved. Cybage Confidential.
Command Line Expansion
Tilde ( ~ ) : It may refer to your home directory
cat ~/.bashrc
It may also refer to another user's home directory
$ ls ~jkumar/projects.doc
Variable and String
Parameter/Variable: ( $ )
Substitute the value of a variable in a command line
$ cd $HOME/projects.doc
Curly braces: { } - A string is created for every pattern inside the
braces regardless if any file exists
$ rm hello.{c,o}
Command Output - ``
Substitute output from a command in a command line
$ echo “Current Working Directory is: `pwd`"
Copyright © 2007. Cybage Software Pvt. Ltd. All Rights Reserved. Cybage Confidential.
Protecting From Expansion
Copyright © 2007. Cybage Software Pvt. Ltd. All Rights Reserved. Cybage Confidential.
History Tricks
Use the up and down arrow keys to scroll through previous
commands
Type <CTRL-R> to search for a command in command history.
(reverse-i-search)`':
To recall last argument from previous command:
<ESC>. (the escape key followed by a period)
<ALT-.> (hold down the alt key while pressing the period)
Copyright © 2007. Cybage Software Pvt. Ltd. All Rights Reserved. Cybage Confidential.
Variables & Aliases
A variable is a label that has a value
Variables are used to configure the shell or other programs
Variables are resident in memory
There are two types of variables: local and environment
Local variables are used only by the shell
Environment variables are passed onto other commands
set to display all variables
env to display environment variables
Copyright © 2007. Cybage Software Pvt. Ltd. All Rights Reserved. Cybage Confidential.
Thank You !
Copyright © 2007. Cybage Software Pvt. Ltd. All Rights Reserved. Cybage Confidential.