Difference between revisions of "BOSS-Linux/C2/Basic-Commands/English-timed"

From Script | Spoken-Tutorial
Jump to: navigation, search
Line 4: Line 4:
 
|-
 
|-
 
|00:00
 
|00:00
|Dear friends, welcome to a spoken tutorial on the Linux Operating System.  
+
|Dear friends, welcome to a spoken tutorial on the '''Linux Operating System. '''
 
|-
 
|-
 
|00:05
 
|00:05
Line 10: Line 10:
 
|-
 
|-
 
|00:10
 
|00:10
|I am using Ubuntu 10.04.
+
|I am using '''Linux Operating System'''
 
|-
 
|-
 
|00:12
 
|00:12
Line 22: Line 22:
 
|-
 
|-
 
|00:33
 
|00:33
|Then we will learn about how to find help in Linux using the man command.  
+
|Then we will learn about how to find help in Linux using the '''man''' command.  
 
|-
 
|-
 
|00:39
 
|00:39
Line 30: Line 30:
 
|In simplest terms we can say that Linux commands are words that when keyed in cause some actions to take place.
 
|In simplest terms we can say that Linux commands are words that when keyed in cause some actions to take place.
 
|-
 
|-
|00:52
+
|00:51
|Linux commands are seldom more than four character in length like ls, who, ps etc.  
+
|Linux commands are seldom more than four character in length like ''' ls, who, ps''' etc.  
 
|-
 
|-
 
|00:59
 
|00:59
Line 37: Line 37:
 
|-
 
|-
 
|01:05
 
|01:05
|Go to the applications menu.  
+
|Go to the '''Applications''' menu.  
 
|-
 
|-
 
|01:08
 
|01:08
|Select accessories and then click on terminal from the available options  
+
|Select '''Accessories''' and then click on terminal from the available options  
 
|-
 
|-
 
|01:14
 
|01:14
|or press ctrl alt t on your keyboard to open a terminal window.
 
|-
 
|01:20
 
 
|Now we can see a prompt ($) and a cursor blinking next to it. This is where we need to type in a command.   
 
|Now we can see a prompt ($) and a cursor blinking next to it. This is where we need to type in a command.   
 
|-
 
|-
|01:29
+
|01:22
|Type in the words who and press enter.  
+
|Type in the words '''who''' and press enter.  
 
|-
 
|-
|01:34
+
|01:28
|We can see the name of the users logged in. Actually we have just executed a command called who which shows who are logged into the system.  
+
|We can see the name of the users logged in. Actually we have just executed a command called '''who''' which shows who are logged into the system.  
 
|-
 
|-
|01:47
+
|01:41
 
|But which entity is converting these commands which are nothing more than a few letters into actions?  
 
|But which entity is converting these commands which are nothing more than a few letters into actions?  
 
|-
 
|-
|01:54
+
|01:47
 
|This is the job of the Command Interpreter, also called the shell.  
 
|This is the job of the Command Interpreter, also called the shell.  
 
|-
 
|-
|01:59
+
|01:53
 
|We can define a shell as a program that acts as the interface between us and the Linux system,  
 
|We can define a shell as a program that acts as the interface between us and the Linux system,  
 
|-
 
|-
|02:08
+
|02:02
 
|allowing us to enter commands for the operating system to execute.  
 
|allowing us to enter commands for the operating system to execute.  
 
|-
 
|-
|02:13
+
|02:07
 
|On Linux it’s quite feasible to have multiple shells installed, with different users able to pick the one they prefer.  
 
|On Linux it’s quite feasible to have multiple shells installed, with different users able to pick the one they prefer.  
 
|-
 
|-
|02:22
+
|02:16
|On Linux, the standard shell that is always installed as /bin/sh is called bash, the GNU Bourne-Again SHell, from the GNU suite of tools.  
+
|On Linux, the standard shell that is always installed as '''bin/sh''' is called bash, the '''GNU Bourne-Again Shell''', from the '''GNU''' suite of tools.  
 
|-
 
|-
|02:35
+
|02:29
 
|The commands we would be covering in this tutorial are generic and can run on most of the Linux shells with slight variations.  
 
|The commands we would be covering in this tutorial are generic and can run on most of the Linux shells with slight variations.  
 
|-
 
|-
|02:44
+
|02:38
 
|Nevertheless, we would be using the bash as the shell for demonstration in this tutorial.
 
|Nevertheless, we would be using the bash as the shell for demonstration in this tutorial.
 
|-
 
|-
|02:51
+
|02:44
|It is because bash is the most popular shell and portable to almost all UNIX.
+
|It is because bash is the most popular shell and portable to almost all '''UNIX.'''
 
|-
 
|-
|02:58
+
|02:52
|Other shells include the Bourne shell which is the original Unix shell, C Shell and Korn shell
+
|Other shells include the '''Bourne shell''' which is the original ''' Unix shell, C Shell''' and '''Korn shell'''
 
|-
 
|-
|03:08
+
|03:02
|To see which shell we are using  
+
|To see which shell we are using, go to the terminal
 
|-
 
|-
|03:11
+
|03:08
|go to the terminal and type the command echo space dollar in capital SHELL and press enter
+
|and type the command ''' echo space dollar''' in capital '''SHELL''' and press enter
 
|-
 
|-
|03:27
+
|03:21
|Normally the output is /bin/bash which gives us the bash shell.  
+
|Normally the output is '''/bin/bash''' which gives us the bash shell.  
 
|-
 
|-
|03:34
+
|03:28
 
|There are ways by which we can activate different shells. Those will be covered in an advanced tutorial.  
 
|There are ways by which we can activate different shells. Those will be covered in an advanced tutorial.  
 
|-
 
|-
|03:42
+
|03:36
 
|Commands are actually files containing programs, often written in C.  
 
|Commands are actually files containing programs, often written in C.  
 
|-
 
|-
|03:47
+
|03:41
|These files are contained in directories. To find out where a command is stored, we can use the type command.  
+
|These files are contained in directories. To find out where a command is stored, we can use the '''type''' command.  
 
|-
 
|-
|03:55
+
|03:48
| Type at the command prompt. Type--space-- ps and press enter.
+
| Type at the command prompt, ''' type space ps''' and press enter.
 
|-
 
|-
|04:03
+
|03:58
|This shows that ps is actually a file stored in the /bin directory.  
+
|This shows that '''ps''' is actually a file stored in the '''/bin''' directory.  
 
|-
 
|-
|04:09
+
|04:03
 
|When we key in a command at the command prompt, the shell searches for a file matching the command name in a list of directories.
 
|When we key in a command at the command prompt, the shell searches for a file matching the command name in a list of directories.
 
|-
 
|-
|04:18
+
|04:12
 
|If it is found, then the program corresponding to that file is executed, else a “command not found” error is given.  
 
|If it is found, then the program corresponding to that file is executed, else a “command not found” error is given.  
 
|-
 
|-
|04:27
+
|04:21
|The list of directories searched is specified by the PATH variable, as we will see later.  
+
|The list of directories searched is specified by the '''PATH''' variable, as we will see later.  
 
|-
 
|-
  |04:34
+
  |04:28
|For now, if we want to see this list, just type the command echo space dollar PATH  
+
|For now, if we want to see this list, just type the command '''echo space dollar PATH ''' in capital
 
|-
 
|-
|04:44
+
|04:40
|in capital and press enter  
+
|and press enter  
 
|-
 
|-
|04:52
+
|04:45
 
|Talking of commands, there is one important thing that we need to know.  
 
|Talking of commands, there is one important thing that we need to know.  
 
|-
 
|-
|04:57
+
|04:51
|Linux commands are of two types: External commands and internal commands.  
+
|Linux commands are of two types: '''External commands''' and '''internal commands.'''
 
|-
 
|-
|05:02
+
|04:56
|Now external commands are those which exist as separate files/programs.  
+
|Now '''external commands''' are those which exist as separate files/programs.  
 
|-
 
|-
|05:07
+
|05:00
 
|Most commands in Linux are of this nature. But there are some commands whose implementation is written within the shell and they do not exist as separate files.  
 
|Most commands in Linux are of this nature. But there are some commands whose implementation is written within the shell and they do not exist as separate files.  
 
|-
 
|-
|05:18
+
|05:12
|These are internal commands.  
+
|These are '''internal commands. '''
 
|-
 
|-
|05:20
+
|05:14
|The echo command, which we will see later, is in fact an internal command.  
+
|The '''echo''' command, which we will see later, is in fact an '''internal command.'''
 
|-
 
|-
|05:25
+
|05:18
 
|Go to the terminal and type at the command,  
 
|Go to the terminal and type at the command,  
 
|-
 
|-
|05:33
+
|05:26
|type space echo and press enter.
+
|'''type space echo''' and press enter.
 
|-
 
|-
|05:40
+
|05:34
|The output shows echo as a shell built-in.  
+
|The output shows '''echo as a shell built-in.'''
 
|-
 
|-
 
|05:43
 
|05:43
|So instead of giving a file name it shows that the echo command's implementation is internal to the shell. So it is called internal command.
+
|So instead of giving a file name it shows that the '''echo''' command's implementation is internal to the shell. So it is called '''internal command.'''
 
|-
 
|-
|05:56
+
|05:50
 
|Another important thing which we need to understand is the structure of commands.
 
|Another important thing which we need to understand is the structure of commands.
 
|-
 
|-
|06:01
+
|05:55
 
|Commands can be of one word or multiple words, separated by white spaces.  
 
|Commands can be of one word or multiple words, separated by white spaces.  
 
|-
 
|-
|06:08
+
|06:02
|In the second case the first word is the actual name of the command while the other words are the arguments.
+
|In the second case the first word is the actual name of the command while the other words are the '''arguments.'''
 
|-
 
|-
|06:16
+
|06:09
|Arguments can be options or expressions or file names.  
+
|'''Arguments''' can be options or expressions or file names.  
 
|-
 
|-
|06:20
+
|06:14
 
|A command can perform different tasks depending on the option specified.  
 
|A command can perform different tasks depending on the option specified.  
 
|-
 
|-
|06:26
+
|06:20
|They are generally preceded by a single or double minus sign(-), called short and long option, respectively.  
+
|They are generally preceded by a single or double minus sign, called short and long option, respectively.  
 
|-
 
|-
|06:35
+
|06:28
 
|Go to the terminal window and type the commands and see their outputs.  
 
|Go to the terminal window and type the commands and see their outputs.  
 
|-
 
|-
|06:40
+
|06:34
|Type clear to clear the terminal window
+
|Type '''clear''' to clear the terminal window
 +
|-
 +
|06:37
 +
|Then type '''ls''' and press enter
 
|-
 
|-
|06:44
+
|06:43
|Then type ls and press enter
+
|Again, type '''clear''' and press enter
 
|-
 
|-
 
|06:49
 
|06:49
|Again, type clear and press enter
+
|Type '''ls space minus a''' and enter.
 
|-
 
|-
|06:55
+
|06:58
|Type ls space minus a and enter.
+
|Type '''clear''' to clear the terminal window
 
|-
 
|-
 
|07:04
 
|07:04
|Type clear to clear the terminal window
+
|Now type '''ls space minus minus all''' and press enter.
 
|-
 
|-
|07:11
+
|07:13
|Now type ls space minus minus all and press enter.
+
|Again, type '''clear''' to clear the terminal .
 
|-
 
|-
|07:19
+
|07:18
|Again, type clear to clear the terminal .
+
|Now type '''ls space minus d''' and press enter.
 
|-
 
|-
|07:23
+
|07:26
|Now type ls space minus d and press enter.
+
|-
+
|07:32
+
 
|At this point it is enough to understand how the command's behavior changes with change of options
 
|At this point it is enough to understand how the command's behavior changes with change of options
 
|-
 
|-
|07:40
+
|07:33
 
|In Linux we have a larger number of commands,  
 
|In Linux we have a larger number of commands,  
 
|-
 
|-
|07:45
+
|07:39
 
|each of which have many different options.  
 
|each of which have many different options.  
 
|-
 
|-
|07:48
+
|07:42
 
|Commands can also be combined together as we will see later. So how do we keep so much in mind?  
 
|Commands can also be combined together as we will see later. So how do we keep so much in mind?  
 
|-
 
|-
|07:55
+
|07:48
 
|In reality you don't have to. This is because of the excellent online help facility available in Linux.
 
|In reality you don't have to. This is because of the excellent online help facility available in Linux.
 +
|-
 +
|07:55
 +
|The '''man''' command provides documentation on just about every available command on the system.
 
|-
 
|-
 
|08:01
 
|08:01
|The man command provides documentation on just about every available command on the system.
+
|For instance, to know about say, the '''ls''' command, all you have to do is to go to the terminal
 
|-
 
|-
|08:08
+
|08:09
|For instance, to know about say, the ls command, all you have to do is to go to the terminal
+
|and type '''man''' command with '''ls''' as argument that is type '''man space ls''' and press enter
 +
 
 
|-
 
|-
|08:16
+
|08:23
|and type man command with ls as argument that is type man space ls and press enter
+
|Press '''q''' to come out.
 
|-
 
|-
|08:30
+
|08:29
|Press q to come out.
+
|'''man''' is the system’s manual pager. Each argument given to man is normally the name of a program, utility or function.
 
|-
 
|-
|08:35
+
|08:37
|man is the system’s manual pager. Each argument given to man is normally the name of a program, utility or function.
+
|The manual page associated with each of these arguments is then found and displayed.  
 
|-
 
|-
 
|08:43
 
|08:43
|The manual page associated with each of these arguments is then found and displayed.  
+
|A section, if provided, will direct man to look only in that section of the manual.
 
|-
 
|-
 
|08:49
 
|08:49
|A section, if provided, will direct man to look only in that section of the manual.
 
|-
 
|08:55
 
 
|The default is to search in all of the available sections, following a pre-defined order and to show only the first page found, even if page exists in several sections.  
 
|The default is to search in all of the available sections, following a pre-defined order and to show only the first page found, even if page exists in several sections.  
 +
|-
 +
|09:00
 +
|You can use '''man''' command to know more about the command '''man''' itself.
 
|-
 
|-
 
|09:07
 
|09:07
|You can use man command to know more about the command man itself.  
+
|Go to the terminal and type '''man space man''' and press enter.
 
|-
 
|-
|09:14
+
|09:16
|Go to the terminal and type man space man and press enter.
+
|Press '''q''' to come out of it.
 +
|-
 +
|09:20
 +
|'''man''' command has many options.
 
|-
 
|-
 
|09:23
 
|09:23
|Press q to come out of it.
 
|-
 
|09:26
 
|man command has many options.
 
|-
 
|09:30
 
 
|Here let me tell the most useful ones. Sometimes we know what we want to do but do not know the exact command. Then what can we do?  
 
|Here let me tell the most useful ones. Sometimes we know what we want to do but do not know the exact command. Then what can we do?  
 
|-
 
|-
|09:41
+
|09:35
|man provides the -k option which takes a keyword and return a list of commands and their brief purpose.  
+
|'''man''' provides the '''-k''' option which takes a keyword and return a list of commands and their brief purpose.  
 
|-
 
|-
|09:50
+
|09:44
 
|For example, create a directory, we may not know the exact command,
 
|For example, create a directory, we may not know the exact command,
 
|-
 
|-
|09:56
+
|09:50
| so we can go to the command prompt and type man space minus k space directories and press enter.  
+
| so we can go to the command prompt and type '''man space minus k space directories''' and press enter.  
 
|-
 
|-
|10:12
+
|10:06
 
|Now we can search each of these commands to see what we actually need.
 
|Now we can search each of these commands to see what we actually need.
 
|-
 
|-
|10:17
+
|10:11
|The same thing can be achieved using apropos command.  
+
|The same thing can be achieved using '''apropos''' command.  
 
|-
 
|-
|10:21
+
|10:15
|Type at the command prompt apropos space directories and press enter to see the output.
+
|Type at the command prompt '''apropos space directories''' and press enter to see the output.
 
|-
 
|-
|10:36
+
|10:29
 
|Some times we do not need too much details. We only need to know what a command does.  
 
|Some times we do not need too much details. We only need to know what a command does.  
 
|-
 
|-
|10:40
+
|10:35
|In that case we can use the whatis command or man -f. Both give one line description about the command.  
+
|In that case we can use the '''whatis''' command or '''man -f.''' Both give one line description about the command.  
 
|-
 
|-
|10:52
+
|10:45
|Go to the terminal type clear to clear the terminal window
+
|Go to the terminal, type '''clear''' to clear the terminal window
 
|-
 
|-
|10:58
+
|10:51
|now type whatis space ls and press enter  
+
|now type '''whatis space ls''' and press enter  
 
|-
 
|-
|11:06
+
|10:59
 
|Some commands have many options. We may want to obtain a list of the different options that a command has.  
 
|Some commands have many options. We may want to obtain a list of the different options that a command has.  
 
|-
 
|-
|11:13
+
|11:07
|Then we use the minus help option.  
+
|Then we use the ''' - - (minus minus) help'''  option.  
 
|-
 
|-
|11:18
+
|11:12
|Go to the command prompt and type ls space minus minus help and press enter
+
|Go to the command prompt and type '''ls space - -(minus minus) help'''  and press enter
 
|-
 
|-
|11:29
+
|11:23
|I will scroll up so that u can see all the options on this manual page  
+
|I will scroll up so that you can see all the options on this manual page  
 
|-
 
|-
|11:45
+
|11:38
 
|Thats it for this part of the Linux Spoken tutorial. Spoken Tutorials are a part of the Talk to a Teacher project, supported by the National Mission on Education through ICT.  
 
|Thats it for this part of the Linux Spoken tutorial. Spoken Tutorials are a part of the Talk to a Teacher project, supported by the National Mission on Education through ICT.  
 
|-
 
|-
|11:56
+
|11:49
 
|More information on the same is available at the following link .
 
|More information on the same is available at the following link .
 
|-
 
|-
|12:00
+
|11:54
|  This script has been contributed by ----------------------(name of the translator) and this is -----------------------(name of the recorder) from --------------------------(name of the place)signing off. Good bye
+
Thanks for joining us. This is Anuradha Amrutkar signing off. Good Bye.
  
 
|}
 
|}

Revision as of 12:28, 4 December 2014

Time Narration
00:00 Dear friends, welcome to a spoken tutorial on the Linux Operating System.
00:05 In this tutorial, we will study some basic commands.
00:10 I am using Linux Operating System
00:12 We assume that you know how to get started with the Linux operating system.
00:17 If you are interested, it is available through another spoken tutorial, on the website http://spoken-tutorial.org.
00:26 In this tutorial, we will see what are commands and what is a command interpreter.
00:33 Then we will learn about how to find help in Linux using the man command.
00:39 Now the first question is, "what are commands?".
00:43 In simplest terms we can say that Linux commands are words that when keyed in cause some actions to take place.
00:51 Linux commands are seldom more than four character in length like ls, who, ps etc.
00:59 The commands are in lower case and they are case sensitive. Let us see an example .
01:05 Go to the Applications menu.
01:08 Select Accessories and then click on terminal from the available options
01:14 Now we can see a prompt ($) and a cursor blinking next to it. This is where we need to type in a command.
01:22 Type in the words who and press enter.
01:28 We can see the name of the users logged in. Actually we have just executed a command called who which shows who are logged into the system.
01:41 But which entity is converting these commands which are nothing more than a few letters into actions?
01:47 This is the job of the Command Interpreter, also called the shell.
01:53 We can define a shell as a program that acts as the interface between us and the Linux system,
02:02 allowing us to enter commands for the operating system to execute.
02:07 On Linux it’s quite feasible to have multiple shells installed, with different users able to pick the one they prefer.
02:16 On Linux, the standard shell that is always installed as bin/sh is called bash, the GNU Bourne-Again Shell, from the GNU suite of tools.
02:29 The commands we would be covering in this tutorial are generic and can run on most of the Linux shells with slight variations.
02:38 Nevertheless, we would be using the bash as the shell for demonstration in this tutorial.
02:44 It is because bash is the most popular shell and portable to almost all UNIX.
02:52 Other shells include the Bourne shell which is the original Unix shell, C Shell and Korn shell
03:02 To see which shell we are using, go to the terminal
03:08 and type the command echo space dollar in capital SHELL and press enter
03:21 Normally the output is /bin/bash which gives us the bash shell.
03:28 There are ways by which we can activate different shells. Those will be covered in an advanced tutorial.
03:36 Commands are actually files containing programs, often written in C.
03:41 These files are contained in directories. To find out where a command is stored, we can use the type command.
03:48 Type at the command prompt, type space ps and press enter.
03:58 This shows that ps is actually a file stored in the /bin directory.
04:03 When we key in a command at the command prompt, the shell searches for a file matching the command name in a list of directories.
04:12 If it is found, then the program corresponding to that file is executed, else a “command not found” error is given.
04:21 The list of directories searched is specified by the PATH variable, as we will see later.
04:28 For now, if we want to see this list, just type the command echo space dollar PATH in capital
04:40 and press enter
04:45 Talking of commands, there is one important thing that we need to know.
04:51 Linux commands are of two types: External commands and internal commands.
04:56 Now external commands are those which exist as separate files/programs.
05:00 Most commands in Linux are of this nature. But there are some commands whose implementation is written within the shell and they do not exist as separate files.
05:12 These are internal commands.
05:14 The echo command, which we will see later, is in fact an internal command.
05:18 Go to the terminal and type at the command,
05:26 type space echo and press enter.
05:34 The output shows echo as a shell built-in.
05:43 So instead of giving a file name it shows that the echo command's implementation is internal to the shell. So it is called internal command.
05:50 Another important thing which we need to understand is the structure of commands.
05:55 Commands can be of one word or multiple words, separated by white spaces.
06:02 In the second case the first word is the actual name of the command while the other words are the arguments.
06:09 Arguments can be options or expressions or file names.
06:14 A command can perform different tasks depending on the option specified.
06:20 They are generally preceded by a single or double minus sign, called short and long option, respectively.
06:28 Go to the terminal window and type the commands and see their outputs.
06:34 Type clear to clear the terminal window
06:37 Then type ls and press enter
06:43 Again, type clear and press enter
06:49 Type ls space minus a and enter.
06:58 Type clear to clear the terminal window
07:04 Now type ls space minus minus all and press enter.
07:13 Again, type clear to clear the terminal .
07:18 Now type ls space minus d and press enter.
07:26 At this point it is enough to understand how the command's behavior changes with change of options
07:33 In Linux we have a larger number of commands,
07:39 each of which have many different options.
07:42 Commands can also be combined together as we will see later. So how do we keep so much in mind?
07:48 In reality you don't have to. This is because of the excellent online help facility available in Linux.
07:55 The man command provides documentation on just about every available command on the system.
08:01 For instance, to know about say, the ls command, all you have to do is to go to the terminal
08:09 and type man command with ls as argument that is type man space ls and press enter
08:23 Press q to come out.
08:29 man is the system’s manual pager. Each argument given to man is normally the name of a program, utility or function.
08:37 The manual page associated with each of these arguments is then found and displayed.
08:43 A section, if provided, will direct man to look only in that section of the manual.
08:49 The default is to search in all of the available sections, following a pre-defined order and to show only the first page found, even if page exists in several sections.
09:00 You can use man command to know more about the command man itself.
09:07 Go to the terminal and type man space man and press enter.
09:16 Press q to come out of it.
09:20 man command has many options.
09:23 Here let me tell the most useful ones. Sometimes we know what we want to do but do not know the exact command. Then what can we do?
09:35 man provides the -k option which takes a keyword and return a list of commands and their brief purpose.
09:44 For example, create a directory, we may not know the exact command,
09:50 so we can go to the command prompt and type man space minus k space directories and press enter.
10:06 Now we can search each of these commands to see what we actually need.
10:11 The same thing can be achieved using apropos command.
10:15 Type at the command prompt apropos space directories and press enter to see the output.
10:29 Some times we do not need too much details. We only need to know what a command does.
10:35 In that case we can use the whatis command or man -f. Both give one line description about the command.
10:45 Go to the terminal, type clear to clear the terminal window
10:51 now type whatis space ls and press enter
10:59 Some commands have many options. We may want to obtain a list of the different options that a command has.
11:07 Then we use the - - (minus minus) help option.
11:12 Go to the command prompt and type ls space - -(minus minus) help and press enter
11:23 I will scroll up so that you can see all the options on this manual page
11:38 Thats it for this part of the Linux Spoken tutorial. Spoken Tutorials are a part of the Talk to a Teacher project, supported by the National Mission on Education through ICT.
11:49 More information on the same is available at the following link .
11:54 Thanks for joining us. This is Anuradha Amrutkar signing off. Good Bye.

Contributors and Content Editors

PoojaMoolya, Sandhya.np14