Introduction To Linux
Introduction To Linux
CDAC Mumbai
Introduction to Linux
The Linux operating system (OS) was
first coded by a Finnish computer
programmer called Linus Benedict
Torvalds in 1991, when he was just
21! He had got a new 386, and he
found the existing DOS and UNIX too
expensive and inadequate.
As a hobby he decided to build his own
tiny OS
In those days, a UNIX-like tiny, free OS
called Minix was extensively used for
academic purposes. Since its source
code was available, Linus decided to
take Minix as a model.
GNU PROJECT
Introduction to Linux
Linus liked the endeavours of the Free Software Foundation
and released his kernel under the GNU GPL
The Linux kernel and GNU tools made a complete, free
operating system: the GNU/Linux operating system
Linux most commonly distributed with the toolset & collection of
application called as distributions.(Redhat, Fedora, Ubuntu,
Mandrake etc)
The largest part of the work on Linux is performed by the
community: the thousands of programmers around the world that
use Linux and send their suggested improvements to the
maintainers.
Various companies have also helped not only with the
development of the Kernels, but also with the writing of the body
of auxiliary software, which is distributed with Linux.
4
WHY LINUX ?
Linux utilizes your memory, CPU, and other hardware to the fullest
10
cd changes directories
Usage: cd [DIRECTORY]
eg. cd prabhat
Usage: pwd
11
Usage: history
13
14
file type
owner
group
8 9 10
others
SYSTEM ADMINISTRATION
17
18
PROCESS MANAGEMENT
Usage: ps [OPTION]
eg. ps, ps el
ARCHIVAL COMMANDS
20
21
22
Function
Example
ls
ls
ls -l
ls -l
ls -a
ls -a
cat
cat hello
cp
cp file1 file2i
rm or rm-i
To delete a file
rm hello
mv
To rename a file
mv hello mytextfile
head
Head hello
tail
tail hello
wc
wc hello
nl hello
nl
23
Function
Example
pwd
cd
cd /etc , cd ..
cd ./cprograms
mkdir
rmdir
To delete a directory
rmdir hello
find
find hello
du
du prasad
df
df
24
Stdin
Stdout
Stderr
file desc. 0
file desc. 1
file desc. 2
VI EDITOR
27
STARTING VIM
28
Entering Text
Deleting Words
3dw
29
Deleting Lines
dd
Typing dd deletes the entire line containing the cursor
and places the cursor at the start of the next line.
To delete two lines, type
2dd
To delete from the cursor position to the end of the line, type
D (uppercase)
Moving around in a file
30
Moving by Searching
To move quickly by searching for text, while in
command mode:
Type / (slash).
Enter the text to search for.
Press <Return>.
31
Press <Esc>.
Type :w
Press <Return>.
Press <Esc>.
Type :q!
Press <Return>.
32