SlideShare uma empresa Scribd logo
1 de 57
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
Text Editor(s) ,[object Object]
Other options: emacs, vi (much harder to use)
Non GUI: pico
[object Object]
LINUX COMMANDS
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
exit command: Used to stop the execution of a shell script.
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:   displays 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
users  :  List users currently loggen
Vi  :   Text Editor
Whoami :   Print the current user id and name (`id -un')
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.
 
An editor is a programs that allows you to change the contents of a file.There are different editors in Linux, many of them inherited from UNIX.Some of them are.  ed Original UNIX line-based editor, useful in scripts emacs GNU editor and fully integrated user environment ex Powerful line-based editor (integrated with vi) gawk GNU awk, powerful text editor for records containing fields sed Stream-oriented (non-interactive) line-based editor vi Classic screen-based editor for UNIX vim Vi IMproved, enhanced support for programmers EDITORS DESCRIPTION
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 ,[object Object]
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 ,[object Object]
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,  ,[object Object]
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

Mais conteúdo relacionado

Mais procurados

Unix Command Line Productivity Tips
Unix Command Line Productivity TipsUnix Command Line Productivity Tips
Unix Command Line Productivity TipsKeith Bennett
 
Unix/Linux Basic Commands and Shell Script
Unix/Linux Basic Commands and Shell ScriptUnix/Linux Basic Commands and Shell Script
Unix/Linux Basic Commands and Shell Scriptsbmguys
 
Linux powerpoint
Linux powerpointLinux powerpoint
Linux powerpointbijanshr
 
Linux command for beginners
Linux command for beginnersLinux command for beginners
Linux command for beginnersSuKyeong Jang
 
Unix command line concepts
Unix command line conceptsUnix command line concepts
Unix command line conceptsArtem Nagornyi
 
Unix OS & Commands
Unix OS & CommandsUnix OS & Commands
Unix OS & CommandsMohit Belwal
 
Useful Linux and Unix commands handbook
Useful Linux and Unix commands handbookUseful Linux and Unix commands handbook
Useful Linux and Unix commands handbookWave Digitech
 
Unix(introduction)
Unix(introduction)Unix(introduction)
Unix(introduction)meashi
 
101 3.2 process text streams using filters
101 3.2 process text streams using filters101 3.2 process text streams using filters
101 3.2 process text streams using filtersAcácio Oliveira
 

Mais procurados (20)

Unix Command Line Productivity Tips
Unix Command Line Productivity TipsUnix Command Line Productivity Tips
Unix Command Line Productivity Tips
 
Unix
UnixUnix
Unix
 
Know the UNIX Commands
Know the UNIX CommandsKnow the UNIX Commands
Know the UNIX Commands
 
Linux Commands
Linux CommandsLinux Commands
Linux Commands
 
lec1.docx
lec1.docxlec1.docx
lec1.docx
 
Unix practical file
Unix practical fileUnix practical file
Unix practical file
 
Unix/Linux Basic Commands and Shell Script
Unix/Linux Basic Commands and Shell ScriptUnix/Linux Basic Commands and Shell Script
Unix/Linux Basic Commands and Shell Script
 
Linux commands
Linux commandsLinux commands
Linux commands
 
Vi Editor
Vi EditorVi Editor
Vi Editor
 
Linux powerpoint
Linux powerpointLinux powerpoint
Linux powerpoint
 
Piping into-php
Piping into-phpPiping into-php
Piping into-php
 
Linux command for beginners
Linux command for beginnersLinux command for beginners
Linux command for beginners
 
58518522 study-aix
58518522 study-aix58518522 study-aix
58518522 study-aix
 
Unix command line concepts
Unix command line conceptsUnix command line concepts
Unix command line concepts
 
Unix OS & Commands
Unix OS & CommandsUnix OS & Commands
Unix OS & Commands
 
Useful Linux and Unix commands handbook
Useful Linux and Unix commands handbookUseful Linux and Unix commands handbook
Useful Linux and Unix commands handbook
 
Basic 50 linus command
Basic 50 linus commandBasic 50 linus command
Basic 50 linus command
 
Unix(introduction)
Unix(introduction)Unix(introduction)
Unix(introduction)
 
101 3.2 process text streams using filters
101 3.2 process text streams using filters101 3.2 process text streams using filters
101 3.2 process text streams using filters
 
Linux
LinuxLinux
Linux
 

Destaque

นำเสนอ
นำเสนอนำเสนอ
นำเสนอGame33
 
นำเสนอเกมส์เสดแล้ววว
นำเสนอเกมส์เสดแล้วววนำเสนอเกมส์เสดแล้ววว
นำเสนอเกมส์เสดแล้วววGame33
 
Test Abel Rodriguez
Test Abel RodriguezTest Abel Rodriguez
Test Abel Rodriguezguestdea4e6f
 
Vuorovaikutukseen perustuvan digistrategian ja organisaation luominen
Vuorovaikutukseen perustuvan digistrategian ja organisaation luominenVuorovaikutukseen perustuvan digistrategian ja organisaation luominen
Vuorovaikutukseen perustuvan digistrategian ja organisaation luominenvesailmarinen
 
Nuevo presentación de microsoft office power point
Nuevo presentación de microsoft office power pointNuevo presentación de microsoft office power point
Nuevo presentación de microsoft office power pointmatthewalen
 

Destaque (9)

นำเสนอ
นำเสนอนำเสนอ
นำเสนอ
 
นำเสนอเกมส์เสดแล้ววว
นำเสนอเกมส์เสดแล้วววนำเสนอเกมส์เสดแล้ววว
นำเสนอเกมส์เสดแล้ววว
 
Getxoko kirol plana
Getxoko kirol planaGetxoko kirol plana
Getxoko kirol plana
 
Test Abel Rodriguez
Test Abel RodriguezTest Abel Rodriguez
Test Abel Rodriguez
 
Vuorovaikutukseen perustuvan digistrategian ja organisaation luominen
Vuorovaikutukseen perustuvan digistrategian ja organisaation luominenVuorovaikutukseen perustuvan digistrategian ja organisaation luominen
Vuorovaikutukseen perustuvan digistrategian ja organisaation luominen
 
Slide share
Slide shareSlide share
Slide share
 
Nuevo presentación de microsoft office power point
Nuevo presentación de microsoft office power pointNuevo presentación de microsoft office power point
Nuevo presentación de microsoft office power point
 
potencies
potenciespotencies
potencies
 
Eindopdrachtflo
EindopdrachtfloEindopdrachtflo
Eindopdrachtflo
 

Semelhante a Nithi

Linux Cheat Sheet.pdf
Linux Cheat Sheet.pdfLinux Cheat Sheet.pdf
Linux Cheat Sheet.pdfroschahacker
 
Unix_Introduction_BCA.pptx the very basi
Unix_Introduction_BCA.pptx the very basiUnix_Introduction_BCA.pptx the very basi
Unix_Introduction_BCA.pptx the very basiPriyadarshini648418
 
Linux Command Suumary
Linux Command SuumaryLinux Command Suumary
Linux Command Suumarymentorsnet
 
Lamp ppt
Lamp pptLamp ppt
Lamp pptReka
 
Linux for beginners
Linux for beginnersLinux for beginners
Linux for beginnersNitesh Nayal
 
Operating System Laboratory presentation .ppt
Operating System Laboratory presentation .pptOperating System Laboratory presentation .ppt
Operating System Laboratory presentation .pptPDhivyabharathi2
 
Basics of Linux Commands, Git and Github
Basics of Linux Commands, Git and GithubBasics of Linux Commands, Git and Github
Basics of Linux Commands, Git and GithubDevang Garach
 
Introduction to Linux
Introduction to Linux Introduction to Linux
Introduction to Linux Harish R
 
84640411 study-of-unix-os
84640411 study-of-unix-os84640411 study-of-unix-os
84640411 study-of-unix-oshomeworkping3
 
Unix Basics 04sp
Unix Basics 04spUnix Basics 04sp
Unix Basics 04spDr.Ravi
 
Linux administration training
Linux administration trainingLinux administration training
Linux administration trainingiman darabi
 

Semelhante a Nithi (20)

Linux
LinuxLinux
Linux
 
60761 linux
60761 linux60761 linux
60761 linux
 
Linux programming - Getting self started
Linux programming - Getting self started Linux programming - Getting self started
Linux programming - Getting self started
 
Linux
LinuxLinux
Linux
 
Linux Cheat Sheet.pdf
Linux Cheat Sheet.pdfLinux Cheat Sheet.pdf
Linux Cheat Sheet.pdf
 
Unix_Introduction_BCA.pptx the very basi
Unix_Introduction_BCA.pptx the very basiUnix_Introduction_BCA.pptx the very basi
Unix_Introduction_BCA.pptx the very basi
 
Linux Command Suumary
Linux Command SuumaryLinux Command Suumary
Linux Command Suumary
 
Linux Basics.pptx
Linux Basics.pptxLinux Basics.pptx
Linux Basics.pptx
 
Lamp ppt
Lamp pptLamp ppt
Lamp ppt
 
Linux for beginners
Linux for beginnersLinux for beginners
Linux for beginners
 
Operating System Laboratory presentation .ppt
Operating System Laboratory presentation .pptOperating System Laboratory presentation .ppt
Operating System Laboratory presentation .ppt
 
Basics of Linux Commands, Git and Github
Basics of Linux Commands, Git and GithubBasics of Linux Commands, Git and Github
Basics of Linux Commands, Git and Github
 
Linux commands
Linux commandsLinux commands
Linux commands
 
Linux commands
Linux commandsLinux commands
Linux commands
 
Linux commands
Linux commandsLinux commands
Linux commands
 
Introduction to Linux
Introduction to Linux Introduction to Linux
Introduction to Linux
 
84640411 study-of-unix-os
84640411 study-of-unix-os84640411 study-of-unix-os
84640411 study-of-unix-os
 
Unix Basics 04sp
Unix Basics 04spUnix Basics 04sp
Unix Basics 04sp
 
Linux administration training
Linux administration trainingLinux administration training
Linux administration training
 
Group13
Group13Group13
Group13
 

Nithi

  • 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.
  • 4. Other options: emacs, vi (much harder to use)
  • 6.
  • 8. banner: prints the specified string in large letters. Each argument may be upto 10 characters long.
  • 9. 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 .
  • 10. df: used to find the number of free blocks available for all the mounted file systems.
  • 11. echo: The echo command echoes arguments on the command line.
  • 12. env: Displays the permanent environment variables associated with a user’s login id
  • 13. exit command: Used to stop the execution of a shell script.
  • 14. expr command: Expr (command) command is used for numeric computation .
  • 15. 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
  • 17. 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
  • 18. Ps: Gives information about all the active processes.
  • 19. pwd: (print working directory) displays the current directory.
  • 20. time: Used to display the execution time of a program or a command. Time is reported in seconds.Time filename values
  • 21. tty: Displays the terminal pathname
  • 22. umask: Used to specify default permissions while creating files.
  • 23. 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
  • 24. who: displays 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]
  • 25. date : Display or change the date & time
  • 26. free : Display memory usage
  • 27. hash : Remember the full pathname of a name argument
  • 28. history: Display Command History
  • 29. hostname: Print or set system name
  • 30. id : Print user and group id's
  • 31. rev : Reverse lines of a file
  • 32. times : User and system times
  • 33. Top : List processes running on the system
  • 34. Uname : Print system information
  • 35. users : List users currently loggen
  • 36. Vi : Text Editor
  • 37. Whoami : Print the current user id and name (`id -un')
  • 40. 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.
  • 41. < /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.
  • 42. < /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.
  • 43. < /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.
  • 44. < /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.
  • 45.  
  • 46. An editor is a programs that allows you to change the contents of a file.There are different editors in Linux, many of them inherited from UNIX.Some of them are. ed Original UNIX line-based editor, useful in scripts emacs GNU editor and fully integrated user environment ex Powerful line-based editor (integrated with vi) gawk GNU awk, powerful text editor for records containing fields sed Stream-oriented (non-interactive) line-based editor vi Classic screen-based editor for UNIX vim Vi IMproved, enhanced support for programmers EDITORS DESCRIPTION
  • 47. 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
  • 48.
  • 49. Minor
  • 50. 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
  • 51.
  • 52. 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
  • 53.
  • 55. 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.
  • 56. 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
  • 57. 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
  • 58. 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
  • 59. 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
  • 60. Commonly used Programs in Linux Script files Some programs supporting script programming: date expr find cd ls pwd mkdir rmdir cat cp csplit
  • 61. Conitnued... tail uniq ln mv rm split awk cut diff grep head line sed

Notas do Editor

  1. EDITORS