SlideShare a Scribd company logo
LINUX
What is Linux? •  An alternative to Microsoft Windows •  Open source •  Freely available •  Reliable •  More use seen in labs/scientific situations, but is seeing more popularity. •  Command line based interface
Linux can be used as Server Os or as stand alone Os on our PC.  As a server Os it provides different services/network resources to client.
Server Os must be:Stable,Robust,Secure,High Performance.Linux offers all of the above characteristics. So Linux can be used as:
-> On stand alone workstation/PC for word processing, graphics, software development, internet, e-mail, chatting, small personal database management system etc.
->In network environment as: *  File and Print or Application Server Share the data, Connect the expensive device like printer and share it, e-mail within the LAN/intranet etc are some of the application. Linux Server with different Client Os
(B)  Linux sever can be connected to Internet, So that PC's on intranet can share the internet/e-mail etc. You can put your web sever that run your web site or transmit the information on the internet. Linux Server can act as Proxy/Mail/WWW/Router Server etc.
Linux can also used in, Personal Work
Web Server
Software Development Workstation
Workgroup Server
In Data Center for various server activities such as FTP, Telnet, SSH, Web, Mail, Proxy, Proxy Cache Appliance etc.
Text Editor(s) Like notepad, so easy to use.
Other options: emacs, vi (much harder to use)
Non GUI: pico
Features of Linux:   1. Virtual memory, allowing the system to use disk  room the same as RAM memory.   2. Networking with TCP/IP and other protocols.   3. Multiple user capability.   4. Protected mode so programs or user's can't  access unauthorized areas.   5. Shared libraries   6. True multitasking   7. X - A graphical user interface similar to windows, but supports remote sessions over a network.
LINUX COMMANDS
Vi  :   Text Editor
users  :  List users currently logge\in
banner:   prints the specified string in large letters. Each argument may be upto 10 characters long.
Cal: Produces a calender of the current month as standard output. The month (1-12) and year (1-9999) must be specified in full numeric format .
df: used to find the number of free blocks available for all the mounted file systems.
echo:   The echo command echoes arguments on the command line.
env:   Displays the permanent environment variables associated with a user’s login id
expr command: Expr (command) command is used for numeric computation .
find:   The find command searches through directories for files that match the specified criteria. It can take full pathnames and relative pathnames on the command line. To display the output on screen the –print option must be specified
LOGNAME: displays user’s login name.
ls: Lists the files in the current directory  Some of the available options are: -l gives a long listing -a displays all file{including hidden files
Ps:   Gives information about all the active processes.
pwd: (print working directory) displays the current directory.
time:   Used to display the execution time of a program or a command. Time is reported in seconds.Time filename values
tty:   Displays the terminal pathname
umask:   Used to specify default permissions while creating files.
wc:   The wc command can be used to count the number of lines, words and characters in a fine.   wc [filename(s)] The available options are:   wc –[options] [filename]   -1   -w   -c
who:   D isplays information about all the users currently logged onto the system. The user name, terminal number and the date and time that each user logged onto the system.   The syntax of the who command is   who [options]
date :    Display or change the date & time
free :     Display memory usage
hash  :    Remember the full pathname of a name argument
history:    Display Command History
hostname:    Print or set system name
id :    Print user and group id's
rev  :    Reverse lines of a file
times :    User and system times
Top  :   List processes running on the system
Uname  :   Print system information
Whoami :   Print the current user id and name (`id -un')
Finger: Use finger to see who's on the system
exit command: Used to stop the execution of a shell script.
DIRECTORY
DIRECTORY STRUCTURE
LINUX DIRECTORIES: < / > The root directory. The starting point of your directory structure. This is where the Linux system begins.  Every other file and directory on your system is under  the root directory. Usually the root directory contains only subdirectories.  < /boot > The place where Linux keeps information that it needs when booting up.  < /bin > The /bin directory contains the most important programs that the system needs to operate, such as the shells, ls, grep, and other essential things.
< /usr/bin > /usr/bin in turn contains applications for the system's users. < /dev > The devices that are available to a Linux system.In Linux, devices are treated like files and you can read and write devices like they were files. < /etc > The configuration files for the Linux system.  Most of these files are text files and can be edited by hand. < /home > This is where users keep their personal files are allowed to write files.
< /lib > The shared libraries for programs that are dynamically linked. The shared libraries are similar to DLL's on Winblows. < /mnt > This directory is used for mount points. The different physical storage devices (like the hard disk drives, floppies, CD-ROM's) must be attached to some directory in the file system tree before they can be accessed.  This attaching is called mounting, and the directory where the device is attached is called the mount point.
< /sbin, /usr/sbin > Most system administration programs are stored in these directories. In many cases you must run these programs as the root user. < /var > This directory contains variable data that changes constantly when the system is running. Some interesting subdirectories: </var/log > A directory that contains system log files. They're updated when the system runs, and checking them out can give you valuable info about the health of your system.
</var/mail> Incoming and outgoing mail is stored in this directory. </var/spool> This directory holds files that are queued for some process, like printing. < /tmp > Programs can write their temporary files here.
< /usr > This directory contains user applications and a variety of other things for them, like their source codes, and pictures, docs, or config files they use. /usr is the largest directory on a Linux system.  </usr/share> Config files and graphics for many user apps. < /usr/local > This is where you install apps and other files for use on the local machine.
EDITORS
ed Editor   ed is a line-oriented text editor.  It is used to create, display, modify and otherwise Manipulate text files.  red is a restricted ed: it can only edit files in the current directory and cannot execute shell  commands.   Syntax: ed [-C] [-p string] [-s] [-] [-x] filename red [-C] [-p string] [-s | - ] [-x] filename
Emacs  Editor Emacs is more than &quot;just an editor&quot; -- it provides a fully integrated user environment offering the sort of facilities.* Issue shell comands. * Open a window for a shell * Read and send mail * Read news * Access the internet * Write and test programs * Maintain a calendar * Play a game!  There are two types of modes in Emacs.They are Major
Minor
ex Editor ex Editor is a line-editor mode of the vi text editor. Syntax: ex [ -| -s ] [ -l ] [ -L ] [ -R ] [ -r [file ] ] [ -t tag ] [ -v ] [ -V ] [ -x ] [ -wn ] [ -C] [+command | -c command ] file
sed COMMAND sed is a  stream editor.
It takes a file as input and prints the result on  screen or redirects the output to a specified file. SYNTAX: sed [options] '{command}' [filename] OPTIONS: n do not output the trailing newline e  enable interpretation of the backslash-escaped  characters listed below v disable interpretation of those sequences in  STRINGs
The Vi Editor This is the classic screen-based editor for UNIX.  Apart from vim, there are a number of enhanced versions of vi, including elvis, nvi, and vile.  The vi editor works in two modes,  Command
insert.  Command mode :  letters or sequence of letters interactively command vi. Commands are case sensitive. The ESC key can end a command. Insert mode :  Text is inserted. The ESC key ends insert mode and returns you to command mode. One can enter insert mode with the  &quot;i&quot;  (insert),  &quot;a&quot;  (insert after),  &quot;A&quot;  (insert at end of line),  &quot;o&quot;  (open new line after current line) or  &quot;O&quot;  (Open line above current line) commands.
vim editor Moving cursor around: Exiting from vim : let us now see how to exit from vim editor without saving changes. Vim editor has two modes: * command mode  * editing mode
Command mode  i s the one where we can instruct vim editor to exit to the command line ( shell ).  To do that we need press ESC and type : q!. Character Deletion: delete character with  x  key  Inserting Text : Press  i   or  a  in command mode and type  Saving edited file : In command mode : wq  or  SHIFT+zz
Vim Operators and Motions Deleting Words delete word with  dw  command  Delete to the end of the line delete to the end of the line with  d  operator and  $  motion Motions and count number beginning of the line 0, end of the line $, end of the 2nd word 2e beginning of the 4th word 4w Deleting multiple words to delete 3 words you would use  d3w   Deleting lines to delete single line  dd , delete n lines  ndd  Vim undo command undo changes with  u
* date    *pwd  *mkdir  *rmdir  *cat  *cp  *split  *awk  *expr  *find   *cd    *ls  * csplit  *ln    *mv    * rm  *  split  * awk  *cut     *diff  * grep  * head    *line   *sed  SCRIPTING   FILES
Cron Tab and Cron Job The  Cron, at, batch  Command is used for Scheduling Execution of Command according to requirements.

More Related Content

What's hot (20)

ODP
Linuxppt
poornima sugumaran
 
DOCX
lec1.docx
ismailaboshatra
 
PPTX
Unix OS & Commands
Mohit Belwal
 
PPTX
Unix Linux Commands Presentation 2013
Wave Digitech
 
PDF
Basic linux commands
Shakeel Shafiq
 
PPT
Unix/Linux Basic Commands and Shell Script
sbmguys
 
PPT
Linux Administration
Harish1983
 
PDF
Unix
Sudharsan S
 
PPT
Linux
Ankush Jain
 
PDF
Linux Command Line Basics
We Ihaveapc
 
PDF
Lesson 3 Working with Files in Linux
Sadia Bashir
 
PDF
Operating system lab manual
Meerut Institute of Technology
 
PDF
Unix Command Line Productivity Tips
Keith Bennett
 
ODP
Linux Introduction (Commands)
anandvaidya
 
PPT
intro unix/linux 03
duquoi
 
PDF
Useful Linux and Unix commands handbook
Wave Digitech
 
PPTX
Know the UNIX Commands
Brahma Killampalli
 
PDF
Unix practical file
Soumya Behera
 
PPT
Linux commands
Hemakumar.S
 
PPT
Linux
Rathan Raj
 
lec1.docx
ismailaboshatra
 
Unix OS & Commands
Mohit Belwal
 
Unix Linux Commands Presentation 2013
Wave Digitech
 
Basic linux commands
Shakeel Shafiq
 
Unix/Linux Basic Commands and Shell Script
sbmguys
 
Linux Administration
Harish1983
 
Linux Command Line Basics
We Ihaveapc
 
Lesson 3 Working with Files in Linux
Sadia Bashir
 
Operating system lab manual
Meerut Institute of Technology
 
Unix Command Line Productivity Tips
Keith Bennett
 
Linux Introduction (Commands)
anandvaidya
 
intro unix/linux 03
duquoi
 
Useful Linux and Unix commands handbook
Wave Digitech
 
Know the UNIX Commands
Brahma Killampalli
 
Unix practical file
Soumya Behera
 
Linux commands
Hemakumar.S
 
Linux
Rathan Raj
 

Viewers also liked (7)

PPT
Egipto
andoni98
 
PPT
Presentación Power Point .
silvia
 
PPS
Amatciems
guest8d544c0
 
ODP
Php1
rajikaa
 
PPT
3gnin getirileri
Icoult0926
 
ODP
Apache
rajikaa
 
Egipto
andoni98
 
Presentación Power Point .
silvia
 
Amatciems
guest8d544c0
 
Php1
rajikaa
 
3gnin getirileri
Icoult0926
 
Apache
rajikaa
 
Ad

Similar to Linuxs1 (20)

ODP
Lamp ppt
poornima sugumaran
 
PPTX
Linux System commands Essentialsand Basics.pptx
mba1130feb2024
 
DOC
58518522 study-aix
homeworkping3
 
ODP
Lamp1
Reka
 
ODP
Lamp
Reka
 
ODP
Lamp1
Nadhi ya
 
PDF
Linux programming - Getting self started
Emertxe Information Technologies Pvt Ltd
 
PPT
Linux
nazeer pasha
 
PPTX
Linux Basic commands and VI Editor
shanmuga rajan
 
ODP
Lamp ppt
Reka
 
PPT
Unix Basics 04sp
Dr.Ravi
 
PPTX
Linux Systems Programming: Ubuntu Installation and Configuration
RashidFaridChishti
 
PDF
MCLS 45 Lab Manual
Lokesh Singrol
 
PPT
Linux operating system by Quontra Solutions
QUONTRASOLUTIONS
 
PPT
Linux ppt
Sanmuga Nathan
 
PPT
cisco
edomaldo
 
PDF
Linux Basics
Team-VLSI-ITMU
 
PPT
workshop_1.ppt
hazhamina
 
PPT
3. intro
Harsh Shrimal
 
Linux System commands Essentialsand Basics.pptx
mba1130feb2024
 
58518522 study-aix
homeworkping3
 
Lamp1
Reka
 
Lamp
Reka
 
Lamp1
Nadhi ya
 
Linux programming - Getting self started
Emertxe Information Technologies Pvt Ltd
 
Linux Basic commands and VI Editor
shanmuga rajan
 
Lamp ppt
Reka
 
Unix Basics 04sp
Dr.Ravi
 
Linux Systems Programming: Ubuntu Installation and Configuration
RashidFaridChishti
 
MCLS 45 Lab Manual
Lokesh Singrol
 
Linux operating system by Quontra Solutions
QUONTRASOLUTIONS
 
Linux ppt
Sanmuga Nathan
 
cisco
edomaldo
 
Linux Basics
Team-VLSI-ITMU
 
workshop_1.ppt
hazhamina
 
3. intro
Harsh Shrimal
 
Ad

Linuxs1

  • 2. What is Linux? • An alternative to Microsoft Windows • Open source • Freely available • Reliable • More use seen in labs/scientific situations, but is seeing more popularity. • Command line based interface
  • 3. Linux can be used as Server Os or as stand alone Os on our PC. As a server Os it provides different services/network resources to client.
  • 4. Server Os must be:Stable,Robust,Secure,High Performance.Linux offers all of the above characteristics. So Linux can be used as:
  • 5. -> On stand alone workstation/PC for word processing, graphics, software development, internet, e-mail, chatting, small personal database management system etc.
  • 6. ->In network environment as: * File and Print or Application Server Share the data, Connect the expensive device like printer and share it, e-mail within the LAN/intranet etc are some of the application. Linux Server with different Client Os
  • 7. (B) Linux sever can be connected to Internet, So that PC's on intranet can share the internet/e-mail etc. You can put your web sever that run your web site or transmit the information on the internet. Linux Server can act as Proxy/Mail/WWW/Router Server etc.
  • 8. Linux can also used in, Personal Work
  • 12. In Data Center for various server activities such as FTP, Telnet, SSH, Web, Mail, Proxy, Proxy Cache Appliance etc.
  • 13. Text Editor(s) Like notepad, so easy to use.
  • 14. Other options: emacs, vi (much harder to use)
  • 16. Features of Linux: 1. Virtual memory, allowing the system to use disk room the same as RAM memory. 2. Networking with TCP/IP and other protocols. 3. Multiple user capability. 4. Protected mode so programs or user's can't access unauthorized areas. 5. Shared libraries 6. True multitasking 7. X - A graphical user interface similar to windows, but supports remote sessions over a network.
  • 18. Vi : Text Editor
  • 19. users : List users currently logge\in
  • 20. banner: prints the specified string in large letters. Each argument may be upto 10 characters long.
  • 21. Cal: Produces a calender of the current month as standard output. The month (1-12) and year (1-9999) must be specified in full numeric format .
  • 22. df: used to find the number of free blocks available for all the mounted file systems.
  • 23. echo: The echo command echoes arguments on the command line.
  • 24. env: Displays the permanent environment variables associated with a user’s login id
  • 25. expr command: Expr (command) command is used for numeric computation .
  • 26. find: The find command searches through directories for files that match the specified criteria. It can take full pathnames and relative pathnames on the command line. To display the output on screen the –print option must be specified
  • 28. ls: Lists the files in the current directory Some of the available options are: -l gives a long listing -a displays all file{including hidden files
  • 29. Ps: Gives information about all the active processes.
  • 30. pwd: (print working directory) displays the current directory.
  • 31. time: Used to display the execution time of a program or a command. Time is reported in seconds.Time filename values
  • 32. tty: Displays the terminal pathname
  • 33. umask: Used to specify default permissions while creating files.
  • 34. wc: The wc command can be used to count the number of lines, words and characters in a fine. wc [filename(s)] The available options are: wc –[options] [filename] -1 -w -c
  • 35. who: D isplays information about all the users currently logged onto the system. The user name, terminal number and the date and time that each user logged onto the system. The syntax of the who command is who [options]
  • 36. date : Display or change the date & time
  • 37. free : Display memory usage
  • 38. hash : Remember the full pathname of a name argument
  • 39. history: Display Command History
  • 40. hostname: Print or set system name
  • 41. id : Print user and group id's
  • 42. rev : Reverse lines of a file
  • 43. times : User and system times
  • 44. Top : List processes running on the system
  • 45. Uname : Print system information
  • 46. Whoami : Print the current user id and name (`id -un')
  • 47. Finger: Use finger to see who's on the system
  • 48. exit command: Used to stop the execution of a shell script.
  • 51. LINUX DIRECTORIES: < / > The root directory. The starting point of your directory structure. This is where the Linux system begins. Every other file and directory on your system is under the root directory. Usually the root directory contains only subdirectories. < /boot > The place where Linux keeps information that it needs when booting up. < /bin > The /bin directory contains the most important programs that the system needs to operate, such as the shells, ls, grep, and other essential things.
  • 52. < /usr/bin > /usr/bin in turn contains applications for the system's users. < /dev > The devices that are available to a Linux system.In Linux, devices are treated like files and you can read and write devices like they were files. < /etc > The configuration files for the Linux system. Most of these files are text files and can be edited by hand. < /home > This is where users keep their personal files are allowed to write files.
  • 53. < /lib > The shared libraries for programs that are dynamically linked. The shared libraries are similar to DLL's on Winblows. < /mnt > This directory is used for mount points. The different physical storage devices (like the hard disk drives, floppies, CD-ROM's) must be attached to some directory in the file system tree before they can be accessed. This attaching is called mounting, and the directory where the device is attached is called the mount point.
  • 54. < /sbin, /usr/sbin > Most system administration programs are stored in these directories. In many cases you must run these programs as the root user. < /var > This directory contains variable data that changes constantly when the system is running. Some interesting subdirectories: </var/log > A directory that contains system log files. They're updated when the system runs, and checking them out can give you valuable info about the health of your system.
  • 55. </var/mail> Incoming and outgoing mail is stored in this directory. </var/spool> This directory holds files that are queued for some process, like printing. < /tmp > Programs can write their temporary files here.
  • 56. < /usr > This directory contains user applications and a variety of other things for them, like their source codes, and pictures, docs, or config files they use. /usr is the largest directory on a Linux system. </usr/share> Config files and graphics for many user apps. < /usr/local > This is where you install apps and other files for use on the local machine.
  • 58. ed Editor ed is a line-oriented text editor. It is used to create, display, modify and otherwise Manipulate text files. red is a restricted ed: it can only edit files in the current directory and cannot execute shell commands. Syntax: ed [-C] [-p string] [-s] [-] [-x] filename red [-C] [-p string] [-s | - ] [-x] filename
  • 59. Emacs Editor Emacs is more than &quot;just an editor&quot; -- it provides a fully integrated user environment offering the sort of facilities.* Issue shell comands. * Open a window for a shell * Read and send mail * Read news * Access the internet * Write and test programs * Maintain a calendar * Play a game! There are two types of modes in Emacs.They are Major
  • 60. Minor
  • 61. ex Editor ex Editor is a line-editor mode of the vi text editor. Syntax: ex [ -| -s ] [ -l ] [ -L ] [ -R ] [ -r [file ] ] [ -t tag ] [ -v ] [ -V ] [ -x ] [ -wn ] [ -C] [+command | -c command ] file
  • 62. sed COMMAND sed is a stream editor.
  • 63. It takes a file as input and prints the result on screen or redirects the output to a specified file. SYNTAX: sed [options] '{command}' [filename] OPTIONS: n do not output the trailing newline e enable interpretation of the backslash-escaped characters listed below v disable interpretation of those sequences in STRINGs
  • 64. The Vi Editor This is the classic screen-based editor for UNIX. Apart from vim, there are a number of enhanced versions of vi, including elvis, nvi, and vile. The vi editor works in two modes, Command
  • 65. insert. Command mode : letters or sequence of letters interactively command vi. Commands are case sensitive. The ESC key can end a command. Insert mode : Text is inserted. The ESC key ends insert mode and returns you to command mode. One can enter insert mode with the &quot;i&quot; (insert), &quot;a&quot; (insert after), &quot;A&quot; (insert at end of line), &quot;o&quot; (open new line after current line) or &quot;O&quot; (Open line above current line) commands.
  • 66. vim editor Moving cursor around: Exiting from vim : let us now see how to exit from vim editor without saving changes. Vim editor has two modes: * command mode * editing mode
  • 67. Command mode i s the one where we can instruct vim editor to exit to the command line ( shell ). To do that we need press ESC and type : q!. Character Deletion: delete character with x key Inserting Text : Press i or a in command mode and type Saving edited file : In command mode : wq or SHIFT+zz
  • 68. Vim Operators and Motions Deleting Words delete word with dw command Delete to the end of the line delete to the end of the line with d operator and $ motion Motions and count number beginning of the line 0, end of the line $, end of the 2nd word 2e beginning of the 4th word 4w Deleting multiple words to delete 3 words you would use d3w Deleting lines to delete single line dd , delete n lines ndd Vim undo command undo changes with u
  • 69. * date *pwd *mkdir *rmdir *cat *cp *split *awk *expr *find *cd *ls * csplit *ln *mv * rm * split * awk *cut *diff * grep * head *line *sed SCRIPTING FILES
  • 70. Cron Tab and Cron Job The Cron, at, batch Command is used for Scheduling Execution of Command according to requirements.
  • 71. The term cron is derived from the word chronograph.
  • 72. Cron is a system deamon that keeps sleeping most of the time.
  • 73. It typically wakes up every one minute and checks it crontab file for any jobs to be executed during this minute.
  • 74. All users have a crontab file of his or her own.
  • 75. The name of this crontab file will be the user's login name.
  • 76. Scheduled jobs will be present in crontab file.
  • 77. Cron tab files will be present in the
  • 78. /var/ spool/ cron/ crontabs directory .
  • 79. A crontab may contain one or more files,each corresponding to a command that is to be executed periodically at a specific day, date and time.
  • 80. minute Command to be executed day of week month day of month hour Syntax of a crontab line
  • 81. *Every line is made up of six fields with each field seperated by a blank. *From the Fig. First field specifies the minute(0-59)
  • 82. Second field specifies the hour(24-h format)
  • 83. Third field specifies the day of the month(1-31)
  • 84. Fourth field specifies the month(1-12)
  • 85. Fifth field specifies the day of the week(0-6),
  • 87. Sixth field contains the command to be executed.
  • 88. In crontab line, an asterisk (*) represents all possible values.
  • 89. For example, if a * character appears in the fifth field, then the command mentioned in the line will be executed on all days of the week at the specified time.
  • 90. No spaces will be allowed within a field.
  • 91. If neccessary group of numbers can be specified within a single field seperated by commas.
  • 92. Below are two typical crontab lines. 1. 0 0 * * * backup.sh When executed, the above line runs the backup.sh script at midnight everyday . 2. 00,30 09-17 * * 1-5 mail.sh When execute, the above lines runs the mail.sh script on all weekdays-Monday to Friday every half hour between 9 and 17 hours
  • 93. When more than one command is executed,
  • 94. every cmd has to be written in a seperate line having the above format in a seperate file.
  • 95. Then it is submitted to crontab command, as shown below, where cmdfile is the name of the file executed periodically. $crontab cmdfile
  • 96. Who can use cron facilities: Only System administrators are permitted to use.
  • 97. However, in certain cases,certain users are permitted to use.
  • 98. The username of those users will be in a file named cron.allow.
  • 99. And cron.deny -contains name of user to whom respective facilities are denied.
  • 100. Obviously system administrator maintains all these files.

Editor's Notes