Difference between revisions of "BOSS-Linux/C2/Basics-of-System-Administration/English-timed"
From Script | Spoken-Tutorial
PoojaMoolya (Talk | contribs) |
Sandhya.np14 (Talk | contribs) |
||
Line 5: | Line 5: | ||
|- | |- | ||
| 00:02 | | 00:02 | ||
− | | Hello and welcome to the Spoken Tutorial on Basics of System Administration in Linux. | + | | Hello and welcome to the '''Spoken Tutorial''' on '''Basics of System Administration''' in '''Linux'''. |
|- | |- | ||
| 00:09 | | 00:09 | ||
− | | In this tutorial we will learn the | + | | In this tutorial, we will learn the following- |
|- | |- | ||
| 00:13 | | 00:13 | ||
− | | | + | |* '''adduser''' |
|- | |- | ||
| 00:14 | | 00:14 | ||
− | | | + | |* '''su''' |
|- | |- | ||
| 00:16 | | 00:16 | ||
− | | | + | |* '''usermod''' |
|- | |- | ||
| 00:17 | | 00:17 | ||
− | | | + | |* '''userdel''' |
|- | |- | ||
| 00:18 | | 00:18 | ||
− | | | + | |* '''id''' |
|- | |- | ||
| 00:19 | | 00:19 | ||
− | | | + | |* '''du''' |
|- | |- | ||
| 00:20 | | 00:20 | ||
− | | | + | |* '''df''' |
|- | |- | ||
| 00:22 | | 00:22 | ||
− | | I am using Linux | + | | I am using '''Linux''' for this tutorial. |
|- | |- | ||
| 00:27 | | 00:27 | ||
− | | As a prerequisite please go through the spoken tutorial on '''General Purpose Utilities in Linux''' which is available on this website | + | | As a prerequisite, please go through the spoken tutorial on '''General Purpose Utilities in Linux''' which is available on this website. |
|- | |- | ||
| 00:39 | | 00:39 | ||
− | | One must have admin access in order to execute the | + | | One must have '''admin''' access in order to execute the '''command'''s shown. |
|- | |- | ||
Line 69: | Line 69: | ||
|- | |- | ||
| 01:11 | | 01:11 | ||
− | | | + | |'''Sudo''' command allows the administrative user to execute a command as a '''super''' user. |
|- | |- | ||
Line 77: | Line 77: | ||
|- | |- | ||
| 01:27 | | 01:27 | ||
− | | | + | | Let's now learn how to create a '''New User'''. |
|- | |- | ||
Line 85: | Line 85: | ||
|- | |- | ||
| 01:36 | | 01:36 | ||
− | | Here type the command '''sudo space adduser''' and press Enter. | + | | Here, type the command: '''sudo space adduser''' and press Enter. |
|- | |- | ||
Line 97: | Line 97: | ||
|- | |- | ||
| 01:54 | | 01:54 | ||
− | | The typed password on the terminal | + | | The typed password on the terminal is not visible. |
|- | |- | ||
| 01:58 | | 01:58 | ||
− | | So we have to type the password carefully. | + | | So, we have to type the password carefully. |
|- | |- | ||
| 02:03 | | 02:03 | ||
− | | Once done, a message ''' adduser : Only one or two names allowed''' is displayed. | + | | Once done, a message ''' "adduser : Only one or two names allowed"''' is displayed. |
|- | |- | ||
| 02:14 | | 02:14 | ||
− | | So let us create a new user account named '''duck'''. | + | | So, let us create a new user account named '''duck'''. |
|- | |- | ||
Line 117: | Line 117: | ||
|- | |- | ||
| 02:23 | | 02:23 | ||
− | | '''sudo space adduser space duck''' | + | | '''sudo space adduser space duck''' and press Enter. |
|- | |- | ||
| 02:33 | | 02:33 | ||
− | | We have created a new user called | + | | We have created a new user called "duck". |
|- | |- | ||
| 02:36 | | 02:36 | ||
− | | In the process of creating a new user, a | + | | In the process of creating a new user, a separate '''home''' directory for that user has also been created. |
|- | |- | ||
Line 133: | Line 133: | ||
|- | |- | ||
| 02:52 | | 02:52 | ||
− | | Type the password of your choice, in my case | + | | Type the password of your choice, in my case I am going to type "duck" as the password and press Enter. |
|- | |- | ||
Line 153: | Line 153: | ||
|- | |- | ||
| 03:22 | | 03:22 | ||
− | | But for the time being, I will enter only the '''Full Name''' as | + | | But for the time being, I will enter only the '''Full Name''' as "duck" and leave the rest of the details blank by pressing the Enter key. |
|- | |- | ||
Line 173: | Line 173: | ||
|- | |- | ||
| 03:48 | | 03:48 | ||
− | | To do this, please type | + | | To do this, please type at the command prompt: |
|- | |- | ||
Line 185: | Line 185: | ||
|- | |- | ||
| 03:58 | | 03:58 | ||
− | | To show the list of users in the home folder this command is used. | + | | To show the list of users in the '''home''' folder this command is used. |
|- | |- | ||
| 04:05 | | 04:05 | ||
− | | And here is our newly created user named | + | | And, here is our newly created user named "duck". |
|- | |- | ||
Line 197: | Line 197: | ||
|- | |- | ||
| 04:13 | | 04:13 | ||
− | | Now the next command is the '''su''' command | + | | Now the next command is the '''su''' command. |
|- | |- | ||
Line 213: | Line 213: | ||
|- | |- | ||
| 04:30 | | 04:30 | ||
− | | Enter the command '''su space hyphen space duck''' on the '''terminal''' and press Enter. | + | | Enter the command: '''su space hyphen space duck''' on the '''terminal''' and press Enter. |
|- | |- | ||
Line 221: | Line 221: | ||
|- | |- | ||
| 04:44 | | 04:44 | ||
− | | I shall type the user '''duck''' password here please recall that it was '''duck''' itself. | + | | I shall type the user '''duck''' password here, please recall that it was '''duck''' itself. |
|- | |- | ||
| 04:51 | | 04:51 | ||
− | | Please notice that, the Terminal switches from the previous user to the new user | + | | Please notice that, the Terminal switches from the previous user to the new user which is “duck” in our case. |
|- | |- | ||
Line 233: | Line 233: | ||
|- | |- | ||
| 05:10 | | 05:10 | ||
− | | Now the terminal logs out from the current user '''duck''' and comes back to the previous user account | + | | Now the terminal logs out from the current user '''duck''' and comes back to the previous user account which is '''vinhai''' in our case. |
|- | |- | ||
Line 241: | Line 241: | ||
|- | |- | ||
| 05:23 | | 05:23 | ||
− | | The '''usermod''' command | + | | The '''usermod''' command- |
|- | |- | ||
| 05:24 | | 05:24 | ||
− | | Enables a super user or root user to modify the settings of other user accounts such as | + | | Enables a '''super''' user or '''root''' user to modify the settings of other user accounts such as: |
|- | |- | ||
Line 269: | Line 269: | ||
|- | |- | ||
| 05:52 | | 05:52 | ||
− | | Here at the command prompt type | + | | Here at the command prompt, type: |
|- | |- | ||
Line 293: | Line 293: | ||
|- | |- | ||
| 06:45 | | 06:45 | ||
− | | '''id – command''' is used to check the identities of all the users and | + | | '''id – command''' is used to check the identities of all the '''users''' and '''group'''s. |
|- | |- | ||
| 06:51 | | 06:51 | ||
− | | To know about the identity of the user, we use '''id space -(hyphen)u'''. | + | | To know about the identity of the '''user''', we use '''id space -(hyphen)u'''. |
|- | |- | ||
| 07:00 | | 07:00 | ||
− | | To know about the identity of the group users, it is '''id space -(hyphen)g''' | + | | To know about the identity of the '''group users''', it is '''id space -(hyphen)g'''. |
|- | |- | ||
| 07:08 | | 07:08 | ||
− | | Now | + | | Now let's work on this. |
|- | |- | ||
Line 313: | Line 313: | ||
|- | |- | ||
| 07:17 | | 07:17 | ||
− | | Now we can see the User IDs and Group IDs on the system that we are using | + | | Now we can see the '''User IDs''' and '''Group IDs''' on the system that we are using. |
|- | |- | ||
| 07:25 | | 07:25 | ||
− | | To get only the user id, we use “-(hyphen) | + | | To get only the user-id, we use “-u" (hyphen u) option. |
|- | |- | ||
| 07:30 | | 07:30 | ||
− | | Let us type the command | + | | Let us type the command: '''id space -(hyphen) u''' |
|- | |- | ||
Line 329: | Line 329: | ||
|- | |- | ||
| 07:38 | | 07:38 | ||
− | | Now we can see only the | + | | Now we can see only the 'id's of the users. |
|- | |- | ||
Line 337: | Line 337: | ||
|- | |- | ||
| 07:47 | | 07:47 | ||
− | | To find that out, we will type | + | | To find that out, we will type: |
|- | |- | ||
| 07:50 | | 07:50 | ||
− | | ''' id space -(hyphen)n space -(hyphen)u''' on the terminal here and press Enter. | + | | ''' id space -(hyphen) n space -(hyphen) u''' on the terminal here and press Enter. |
|- | |- | ||
| 08:00 | | 08:00 | ||
− | | Now we can see the names of the users instead of their | + | | Now, we can see the names of the users instead of their 'id's. |
|- | |- | ||
| 08:08 | | 08:08 | ||
− | | Let us now learn the commands for Group IDs. | + | | Let us now learn the commands for '''Group IDs'''. |
|- | |- | ||
| 08:12 | | 08:12 | ||
− | | | + | | Let's type: ''' id space -(hyphen)g'''. |
|- | |- | ||
| 08:17 | | 08:17 | ||
− | | Here we can see the group ids. | + | | Here we can see the '''group ids'''. |
|- | |- | ||
| 08:20 | | 08:20 | ||
− | | If we want to view all the current user's group IDs, type | + | | If we want to view all the current user's group IDs, type: |
|- | |- | ||
Line 369: | Line 369: | ||
|- | |- | ||
| 08:32 | | 08:32 | ||
− | | Please notice that I have typed G in capital letter. | + | | Please notice that I have typed 'G' in capital letter. |
|- | |- | ||
Line 377: | Line 377: | ||
|- | |- | ||
| 08:40 | | 08:40 | ||
− | | Now let us learn how to delete a user account. | + | | Now, let us learn how to delete a user account. |
|- | |- | ||
| 08:44 | | 08:44 | ||
− | | For this we use '''userdel''' command. | + | | For this, we use '''userdel''' command. |
|- | |- | ||
Line 389: | Line 389: | ||
|- | |- | ||
| 08:54 | | 08:54 | ||
− | | | + | | Let's try this on the '''terminal'''. |
|- | |- | ||
| 08:56 | | 08:56 | ||
− | | Here type '''sudo space userdel space -(hyphen)r space duck'''. | + | | Here, type: '''sudo space userdel space -(hyphen)r space duck'''. |
|- | |- | ||
| 09:09 | | 09:09 | ||
− | | I have used the -(hyphen)r option. | + | | I have used the '-(hyphen)r' option. |
|- | |- | ||
| 09:12 | | 09:12 | ||
− | | This is to remove the user along with his home directory. | + | | This is to remove the user along with his '''home''' directory. |
|- | |- | ||
Line 413: | Line 413: | ||
|- | |- | ||
| 09:25 | | 09:25 | ||
− | | Check this by typing | + | | Check this by typing: |
|- | |- | ||
| 09:28 | | 09:28 | ||
− | | '''ls space /(slash)home''' and press | + | | '''ls space /(slash)home''' and press Enter. |
|- | |- | ||
Line 429: | Line 429: | ||
|- | |- | ||
| 09:43 | | 09:43 | ||
− | | Some of the useful commands in Linux System Administration are “df” and “du” | + | | Some of the useful commands in '''Linux System Administration''' are “df” and “du”. |
|- | |- | ||
Line 445: | Line 445: | ||
|- | |- | ||
| 10:06 | | 10:06 | ||
− | | Let us shift to the terminal | + | | Let us shift to the terminal. I shall show you a few useful options used with the “df” command. |
|- | |- | ||
| 10:13 | | 10:13 | ||
− | | Please type df space -(hyphen)h and press Enter. | + | | Please type: df space -(hyphen)h and press Enter. |
|- | |- | ||
| 10:20 | | 10:20 | ||
− | | Here it shows the size of the File system | + | | Here, it shows the size of the '''File system''' and the space used. |
|- | |- | ||
| 10:25 | | 10:25 | ||
− | | It also shows the space mounted on in a human readable format. | + | | It also shows the space mounted on, in a human readable format. |
|- | |- | ||
| 10:34 | | 10:34 | ||
− | | Let us now try some options with the “du” command | + | | Let us now try some options with the “du” command. |
|- | |- | ||
| 10:37 | | 10:37 | ||
− | | At this point | + | | At this point, I assume that you have created some text files in your '''home''' folder. |
|- | |- | ||
| 10:44 | | 10:44 | ||
− | | If not please refer to the tutorial on '''General Purpose Utilities in Linux''' | + | | If not, please refer to the tutorial on '''General Purpose Utilities in Linux'''. |
|- | |- | ||
| 10:51 | | 10:51 | ||
− | | I have already created some text files in my home directory to execute the commands. | + | | I have already created some text files in my '''home directory''' to execute the commands. |
|- | |- | ||
| 10:58 | | 10:58 | ||
− | | | + | | Go to '''home folder''' on the terminal by typing: |
|- | |- | ||
Line 485: | Line 485: | ||
|- | |- | ||
| 11:07 | | 11:07 | ||
− | | Then type '''du space -(hyphen)s space *. ( | + | | Then, type: '''du space -(hyphen)s space *. (asterisk dot) txt''' and press Enter. |
|- | |- | ||
| 11:21 | | 11:21 | ||
− | | This command will give you a report on the txt | + | | This command will give you a report on the '''txt file'''s available in the directory along with its file sizes. |
|- | |- | ||
| 11:30 | | 11:30 | ||
− | | As an assignment, at the command prompt type | + | | As an assignment, at the command prompt type: |
|- | |- | ||
| 11:35 | | 11:35 | ||
− | | '''du space -(hyphen)ch space *.( | + | | '''du space -(hyphen)ch space *.(asterisk dot) txt''' and see what happens. |
|- | |- | ||
Line 505: | Line 505: | ||
|- | |- | ||
| 11:48 | | 11:48 | ||
− | | To | + | | To summarize, we have learnt: |
|- | |- | ||
| 11:51 | | 11:51 | ||
− | | | + | |* "adduser" command to create a new user. |
|- | |- | ||
| 11:53 | | 11:53 | ||
− | | | + | |* “su” command to switch from one user to another user. |
|- | |- | ||
| 11:56 | | 11:56 | ||
− | | | + | |* “usermod” command to change the user account settings. |
|- | |- | ||
| 12:00 | | 12:00 | ||
− | | | + | |* “userdel” command to delete the user account. |
|- | |- | ||
| 12:03 | | 12:03 | ||
− | | | + | |* "id" command to know the information about '''user ids''' and '''group ids'''. |
|- | |- | ||
| 12:07 | | 12:07 | ||
− | | “df” command to check the file system size and its availability. | + | |* “df” command to check the file system size and its availability. |
|- | |- | ||
| 12:11 | | 12:11 | ||
− | | “du” command to check the space occupied by a file. | + | |* “du” command to check the space occupied by a file. |
|- | |- | ||
| 12:15 | | 12:15 | ||
− | | This brings us to the end of this tutorial on “Basics of system administration” | + | | This brings us to the end of this tutorial on “Basics of system administration”. |
|- | |- | ||
Line 545: | Line 545: | ||
|- | |- | ||
| 12:24 | | 12:24 | ||
− | | | + | | Summarizes the '''Spoken Tutorial''' project. |
|- | |- | ||
Line 557: | Line 557: | ||
|- | |- | ||
| 12:41 | | 12:41 | ||
− | | Spoken Tutorial is a part of the “Talk to a Teacher” project | + | | Spoken Tutorial is a part of the “Talk to a Teacher” project, supported by the National Mission on Education through ICT (NMEICT), MHRD, Government of India. |
− | + | ||
− | + | ||
|- | |- | ||
| 12:50 | | 12:50 | ||
− | | More information is available on this url | + | | More information is available on this url. |
|- | |- | ||
| 12:55 | | 12:55 | ||
− | | | + | | The script for this tutorial has been contributed by Praveen and this is Namita from IIT Bombay, signing off. Thank you for joining. |
Revision as of 15:33, 12 August 2015
Time | Narration |
00:02 | Hello and welcome to the Spoken Tutorial on Basics of System Administration in Linux. |
00:09 | In this tutorial, we will learn the following- |
00:13 | * adduser |
00:14 | * su |
00:16 | * usermod |
00:17 | * userdel |
00:18 | * id |
00:19 | * du |
00:20 | * df |
00:22 | I am using Linux for this tutorial. |
00:27 | As a prerequisite, please go through the spoken tutorial on General Purpose Utilities in Linux which is available on this website. |
00:39 | One must have admin access in order to execute the commands shown. |
00:47 | Let us first learn how to create a new user. |
00:53 | The adduser command will create a new user login for us along with authentication. |
01:01 | We can add any user account with the help of sudo command. |
01:06 | Let me give you a brief explanation about the sudo command. |
01:11 | Sudo command allows the administrative user to execute a command as a super user. |
01:19 | The sudo command has many options. We will learn about the options as we go further in this tutorial. |
01:27 | Let's now learn how to create a New User. |
01:32 | I have already invoked the Terminal here. |
01:36 | Here, type the command: sudo space adduser and press Enter. |
01:45 | You will be prompted for a password. |
01:48 | I will give the Admin password here and Enter. |
01:54 | The typed password on the terminal is not visible. |
01:58 | So, we have to type the password carefully. |
02:03 | Once done, a message "adduser : Only one or two names allowed" is displayed. |
02:14 | So, let us create a new user account named duck. |
02:21 | Type the command : |
02:23 | sudo space adduser space duck and press Enter. |
02:33 | We have created a new user called "duck". |
02:36 | In the process of creating a new user, a separate home directory for that user has also been created. |
02:46 | Please note that we will be prompted for a new password for the user duck. |
02:52 | Type the password of your choice, in my case I am going to type "duck" as the password and press Enter. |
03:04 | Please type the new password again. |
03:07 | The password is asked twice for security reasons and for confirmation. |
03:13 | Now our password for the new user is updated. |
03:18 | We will be asked for other details too. |
03:22 | But for the time being, I will enter only the Full Name as "duck" and leave the rest of the details blank by pressing the Enter key. |
03:33 | Enter. |
03:34 | I will confirm this by entering “y”. |
03:39 | This is to confirm that all the information is correct. |
03:43 | Let us now check, if the user account has been created. |
03:48 | To do this, please type at the command prompt: |
03:51 | ls /(slash) home |
03:56 | and press Enter. |
03:58 | To show the list of users in the home folder this command is used. |
04:05 | And, here is our newly created user named "duck". |
04:10 | Let me switch back to the slides. |
04:13 | Now the next command is the su command. |
04:18 | su stands for Switch User. |
04:21 | This command is useful for switching from the current user to another user. |
04:26 | Let us go to the Terminal now. |
04:30 | Enter the command: su space hyphen space duck on the terminal and press Enter. |
04:41 | You will be prompted for a password. |
04:44 | I shall type the user duck password here, please recall that it was duck itself. |
04:51 | Please notice that, the Terminal switches from the previous user to the new user which is “duck” in our case. |
05:02 | To logout from this user, type logout and hit Enter. |
05:10 | Now the terminal logs out from the current user duck and comes back to the previous user account which is vinhai in our case. |
05:18 | Let us learn about the usermod command. |
05:23 | The usermod command- |
05:24 | Enables a super user or root user to modify the settings of other user accounts such as: |
05:33 | Change the password to no password or empty password. |
05:37 | Show the date on which the user account will be disabled. |
05:42 | Let us try this command and see. |
05:44 | Let me switch to the terminal now. |
05:46 | Let me show you how to set a date of expiry for the user account duck. |
05:52 | Here at the command prompt, type: |
05:56 | sudo space usermod space -(hyphen)e space 2012-(hyphen)12-(hyphen)27 space duck |
06:21 | and press Enter. |
06:25 | The user account expiry date is set as mentioned in the command here with the help of the option “-e”. |
06:34 | Now you have set an expiry date for the user account duck. |
06:39 | Let us now talk about the uid and gid commands. |
06:45 | id – command is used to check the identities of all the users and groups. |
06:51 | To know about the identity of the user, we use id space -(hyphen)u. |
07:00 | To know about the identity of the group users, it is id space -(hyphen)g. |
07:08 | Now let's work on this. |
07:10 | At the terminal, let us type id and press Enter. |
07:17 | Now we can see the User IDs and Group IDs on the system that we are using. |
07:25 | To get only the user-id, we use “-u" (hyphen u) option. |
07:30 | Let us type the command: id space -(hyphen) u |
07:36 | and press enter. |
07:38 | Now we can see only the 'id's of the users. |
07:42 | But what if we need to know the names of the users? |
07:47 | To find that out, we will type: |
07:50 | id space -(hyphen) n space -(hyphen) u on the terminal here and press Enter. |
08:00 | Now, we can see the names of the users instead of their 'id's. |
08:08 | Let us now learn the commands for Group IDs. |
08:12 | Let's type: id space -(hyphen)g. |
08:17 | Here we can see the group ids. |
08:20 | If we want to view all the current user's group IDs, type: |
08:26 | id space -(hyphen) (capital)G and press Enter. |
08:32 | Please notice that I have typed 'G' in capital letter. |
08:38 | See the result for yourself. |
08:40 | Now, let us learn how to delete a user account. |
08:44 | For this, we use userdel command. |
08:48 | We can delete an user account permanently with the help of the userdel command. |
08:54 | Let's try this on the terminal. |
08:56 | Here, type: sudo space userdel space -(hyphen)r space duck. |
09:09 | I have used the '-(hyphen)r' option. |
09:12 | This is to remove the user along with his home directory. |
09:17 | Let us press Enter and see what happens. |
09:21 | Now the user duck has been deleted. |
09:25 | Check this by typing: |
09:28 | ls space /(slash)home and press Enter. |
09:35 | We will find that, the user account duck has been deleted. |
09:40 | Let me go back to the slides now. |
09:43 | Some of the useful commands in Linux System Administration are “df” and “du”. |
09:50 | The df command gives a report on the free space available on the disk. |
09:55 | And the du command gives a report on how much space a file has occupied. |
10:00 | Please try these two commands and find the output for yourself as an assignment. |
10:06 | Let us shift to the terminal. I shall show you a few useful options used with the “df” command. |
10:13 | Please type: df space -(hyphen)h and press Enter. |
10:20 | Here, it shows the size of the File system and the space used. |
10:25 | It also shows the space mounted on, in a human readable format. |
10:34 | Let us now try some options with the “du” command. |
10:37 | At this point, I assume that you have created some text files in your home folder. |
10:44 | If not, please refer to the tutorial on General Purpose Utilities in Linux. |
10:51 | I have already created some text files in my home directory to execute the commands. |
10:58 | Go to home folder on the terminal by typing: |
11:03 | cd space /(slash) home and press Enter. |
11:07 | Then, type: du space -(hyphen)s space *. (asterisk dot) txt and press Enter. |
11:21 | This command will give you a report on the txt files available in the directory along with its file sizes. |
11:30 | As an assignment, at the command prompt type: |
11:35 | du space -(hyphen)ch space *.(asterisk dot) txt and see what happens. |
11:46 | Let me go back to the slides. |
11:48 | To summarize, we have learnt: |
11:51 | * "adduser" command to create a new user. |
11:53 | * “su” command to switch from one user to another user. |
11:56 | * “usermod” command to change the user account settings. |
12:00 | * “userdel” command to delete the user account. |
12:03 | * "id" command to know the information about user ids and group ids. |
12:07 | * “df” command to check the file system size and its availability. |
12:11 | * “du” command to check the space occupied by a file. |
12:15 | This brings us to the end of this tutorial on “Basics of system administration”. |
12.20 | The video available at this url, |
12:24 | Summarizes the Spoken Tutorial project. |
12:27 | If you do not have good bandwidth, you can download and watch it. |
12:31 | We conduct workshops using spoken tutorials. We also give certificates to those who pass an online test. Please contact us for more details. |
12:41 | Spoken Tutorial is a part of the “Talk to a Teacher” project, supported by the National Mission on Education through ICT (NMEICT), MHRD, Government of India. |
12:50 | More information is available on this url. |
12:55 | The script for this tutorial has been contributed by Praveen and this is Namita from IIT Bombay, signing off. Thank you for joining. |