- Back to Home »
- Linux
Posted by : Unknown
Friday, July 26, 2013
LINUX
The man behind the Linux:
Linus ntorvalds the finish developer of the Linux was born
in 1969 in helsinki .
INTRODUCTION:
Why
Linux?
1. There's no single owner for Linux.
Linux is the combined effort of many a thousand programmers. But then so is Windows,
and NetWare, and Mac OS and Delphi , and VB,
and any other software that you may care to add to the list.
2. Cornerstone of the Linux effort has been the peer review, that not
only the software but the source code itself is subjected to.
3. Documentation- Linux's
documentation-the how-tos as they are called -is some of the most extensive
hands-on guide that you can get.
4. Linux is customizable like no other software.
5. Support- One of the stated plus points of commercial software is
that there's a structured support program that you can avail of. But reality is
often different. Those of you who have had occasion to ask for help would know
that often it's not from the structured support programs, but from
non-structured ones like user groups and Internet news groups that you get more
precise and faster help.
6. Linux doesn't need the latest, fastest, hardware to run on.
7. And last but not the least,
because it's free.
Red Hat Linux and Debian
Linux are not different.
Linux is essentially safe,secure
and robust.
Security: class C2 is a
rating granted by the Natinal Computer Security Center (NCSC) for software that
have been evaluated against the Defence Trusted Computer System Evaluation
Criteria (TCSEC).
C2 security class requires
individual logon with password and an audit mechanism.
LINUX
ARCHITECTURE:
Inner most layer is
kernel. This is the heart of the operating system, the part of the
implements that primtive system calls that form the basis of the system.
On top of the kernel are various libraries that implement
high level functions. These can be critical functions such as the ANSI
standad C library or a specialised
library such as one to manipulate JPEG encoded image files.
Linux applications
are typically built on top of the
functions provided by libraries.
User interface:
Linux supports many
different libraries for user interfaces. Some of the more common ones are
briefly described here.
Text mode:- Simple output of
ASCII routines such as printf. The traditional approach for simple Unix type
file commands.
Curses/temcap:- Text-based,but with yhe ability to position ythre cursor anywhere,change colours get individual key presses and generate simple line graphics. This works with various types of serial terminals as well as the linux text console and inside an xterm window.
Curses/temcap:- Text-based,but with yhe ability to position ythre cursor anywhere,change colours get individual key presses and generate simple line graphics. This works with various types of serial terminals as well as the linux text console and inside an xterm window.
Svgalib:- A library that
provides simple graphics routines (drawing pixels,lines etc) works by directly
accessing the videocard.
X11:- The standard for
portable distributed windowing applications. The low-level X libraries tend to
hard to use.
LINUX
DIRECTORIES:
/
|---bin
|---boot
|---dev
|---etc
|---home
| |-----user1
| |-----user2
| |-----user3
|
|---lib
|---lost+found
|---mnt
| |-----cdrom
| |-----floppy
| |-----zip
|---proc
|---proc
|---root
|---sbin
|---tmp
|---usr
| |------x11r6
|------bin
|-----include
|-----lib
|-----man
|-----share
| |-----bin
| |-----dict
| |-----doc
|----howto
| |-----etc
| |-----include
| |-----info
| |-----lib
| |-----local
|-----bin
|-----doc
|-----etc
|-----include
|-----lib
|-----man
|-----sbin
|-----share
|-----src|
|-----man
|-----sbin
|-----share
|-----src
|----var
| |-----log
| |-----spool
| |-----mail
File and Directory
permissions:
Linux operating system maintains
information, known as permission, for every file and directory on the system.
read, write,execute.
For each file and directory,the rwx
permission may be seperately for each of the following classes of users.
User(U) Ã user who owns the file /directory.
Group(G) Ã several users purposely lumped together so that they can share
acess to each others files.
Others(O) Ã the remainder of the authorised
users of the system.
Symbloic to octal
conversion
Symbol binary octal
- - - 0 0 0 0
- - x 0 0 1 1
- w - 0 1 0 2
- w x 0 1 1 3
r - - 1 0 0 4
r – x 1 0 1 5
r w - 1 1 0 6
r w x 1 1 1 7
RULES FOR LINUX COMMANDS:
1.
Linux commands are case
sensitive but most are lowercase.
2. Linux commands
can only be entered at the shell prompt.
3. Linux command
lines must end with a return.
4. More than one option
can be included with most of the commands.
GETTING ONLINE HELP:
Standard
on-line help facility available with Linux is electronic reference manuals
known as manpages, and you can access them with man command-name.
Special keys and control
characters:
Ctrl –u erases the entire
command line.
Ctrl –s stops the flow of
output to display.
Ctrl –w erases the last word
on the cmd line.
Ctrl –c interrupts a command or process in
progress and returns to the command line.
Ctrl –z suspends a command or process in
progress.
Ctrl –d generates an end-of file charecter.
Ctrl -\ quits a program and saves an image of
the program in a file called core for later debugging.
Setup and status commands:
logout end of linux session.
passwd change password by prompting
old and new passwords.
stty set terminal option.
date display or set the date.
finger display information about
users.
ps display information
about processes.
env display or change current
environment.
File and directory commands:
cat concatenate and display
files.
cat/etc/profile shows the default console profile for all
users.
more paginator allows u to browse
through a text file.
less a more versatile paginator
than more,lets u scroll both up
and down,either
line by line or pagewise.
mv move or rename files.
cp copy files.
rm remove files.
ls lists contents of
directories.
mkdir make directory.
rmdir remove direrctory.
cd change working directory.
pwd print working directory.
du summarize disk usage.
chmod change mode(access permission)
for a file or directory.
file determine the type of
file.
quota –v displays the current usage for
this account.
Editing tools:
pico simple text editor.
diff shows the difference
between the contents of two files.
grep search a file for a
pattern.
sort sort and collate lines of a file.
wc count lines,words and
charecters in a file.
look look up a specified words
in the system directory.
awk pattern scanning and
processing language.
emacs advanced text editor.
vi screen oriented a
display editor.
Formatting and printing commands:
lpq view printer queue.
lpr send file to printer
queue to be printed.
lprm remove job from printer to
spooling queue.
enscript converts textfiles to postscript
format for printing.
lprloc locations,names of
printers,printer costs.
pacinfo current billing info for this
account.
Program controls,pipes and filters:
Jobs lists background jobs.
Sleep suspend execution of an
interval
Kill terminate a process.
Nice run a command at low
priority.
Renice alter priority of running
process.
& run process in
background when placed at end of command line.
> redirect
the output of a command into a file.
>> redirects and append the output of a command to the end
of a file.
< redirect
the file to the input of a command.
| pipe
the output of one command into another.
NETWORK SETUP:
That’s
something Linux can handle really well. It has support for all the popular
protocols. And can even emulate an NT, Netware, and Appletalk server. TCP/IP is
native to Linux, so setting it up to access the Internet is a really simple and
quick task. In many cases, the only way to integrate a mixed environment would
be to use the Linux box as a common server.
FILE COMPRESSION:GZIP:
There are several
reasons for reducing the size of a file. The two most common are to save space
or, if we are transferring the file across a network, to save transmission
time. To compress a file, enter the
command gzip and the file name.
$ gzip
mydata
$ ls
mydata.gz
To decompose a
file, use the gzip with the –d option or the command gunzip. These commands will decompress
a compressed file with the .gz
extension and replace it with a decompressed version with the same root name,
but without the .gz extension. When
we use gunzip, we do not even have
to type in the .gz extension.
$ gunzip
mydata.gz
$ ls
mydata
Suppose we want
to display or print the contents of a compressed file without first having to
decompressed it. The command zcat
will generate a decompressed version of a file and send it to the standard
output. We can redirect this output to a printer or display a utility such as
more.
$ zcat
mydata.gz |more
We can also compress archive tar
file. This returns file extensions .tar.gz.
$ gzip
myarch.tar
$ ls
myarch.tar.gz
We can also use the compress
and uncompress
commands to create compressed files. They
generate a file that has a .Z extensions and use a different compression format than gzip.
LINUX APPLICATIONS:
Commercial: corel word perfect – word processing.
Star
office - office application suite.
Acroread
from Adobe.
Database implementations:
Mysql,db2. Jdbc drivers from open link to ensure that
there is easy access to databases from
any programming environment into linux.
Shell script languages:
Bourne
shell script.
Interpreted programming languages:
Perl,tcl,python,c.
CONCLUSION:
We can set
permissions on a file or directory to control access by other users. A file or
directory can be set for read, write,
and execute permissions. Either the
user, group, and other users can have access. The command chmod sets these
permissions, and the ls commad with the–l option lists files and
directories with the current permissions.
Different storage devices such each contain their own file system that we can
mount and access. We can access CD-ROMs, floppy disks, and hard disk
partitions. We can also mount MS-DOS
hard drive partitions anc access them directly from our Linux system. By placing an entry for a file system in the /etc/fstab
file, we can have a file system mounted automatically when we boot. If we are
on a network, mount and access file
systems on a remote server.
To transmit files or too back them up, we can archive and compress them.
The tar
command archives files, and the gzip command compress them. Most software packages
available online are both archived and compressed. They usually have files
names that end with tar.gz
waoooo nice post.join us
ReplyDeleteContent is very clear and easily explained it is very interesting as well. I hope you post again soon.
ReplyDeleteBIGDATA Training in Chennai