1 00:00:00,660 --> 00:00:01,770 Hello, everyone. 2 00:00:01,950 --> 00:00:08,310 In this demo, I'm going to show you how to use PWD command and CD Command. 3 00:00:08,970 --> 00:00:14,390 The BWP command is used to print the name of the current working directory. 4 00:00:14,400 --> 00:00:18,370 For example, I'm going to type PWD and hit enter. 5 00:00:18,390 --> 00:00:24,200 As we can see here, WD prints the name of the current working directory. 6 00:00:24,210 --> 00:00:28,590 So the current working directory we are in slash home slash student. 7 00:00:29,380 --> 00:00:29,700 Okay. 8 00:00:29,700 --> 00:00:32,100 Now let's move on to the next command. 9 00:00:32,130 --> 00:00:33,570 The CD command. 10 00:00:33,840 --> 00:00:38,070 The command is used to change the current working directory. 11 00:00:38,100 --> 00:00:39,030 For example. 12 00:00:39,810 --> 00:00:48,300 I'm going to type CD and I already created a directory called Directory one and I hit enter. 13 00:00:48,300 --> 00:00:49,980 So CD space. 14 00:00:49,980 --> 00:00:51,490 Then the name of the directory. 15 00:00:51,510 --> 00:00:55,440 I hit enter and I'm going to type CD to print. 16 00:00:56,610 --> 00:00:59,580 The name of the current working directory. 17 00:00:59,580 --> 00:01:07,440 As we can see here, we moved down from the previous directory or the working directory to the new working 18 00:01:07,440 --> 00:01:07,980 directory. 19 00:01:07,980 --> 00:01:10,200 So we are right now in directory. 20 00:01:10,980 --> 00:01:15,000 What if I would like to change the current? 21 00:01:15,930 --> 00:01:20,280 Their history and go back to the home directory of this current user. 22 00:01:20,580 --> 00:01:22,650 I'm going to type CD. 23 00:01:23,600 --> 00:01:26,030 Then I hit enter. 24 00:01:26,550 --> 00:01:35,120 Type P.w.d. just to make sure that we went back to the previous directory. 25 00:01:37,020 --> 00:01:39,480 So what is this directory? 26 00:01:39,510 --> 00:01:41,430 It's slash home slash student. 27 00:01:41,430 --> 00:01:43,020 And what is the previous one? 28 00:01:43,680 --> 00:01:45,300 So this one is the current one? 29 00:01:45,330 --> 00:01:50,730 The previous one we were on slash home slash student slash directory one. 30 00:01:52,380 --> 00:01:54,720 If I would like to move on. 31 00:01:55,510 --> 00:02:01,120 Two steps, not just only to the next directory, the directory after. 32 00:02:01,120 --> 00:02:07,240 So I'm going to type CD, then the name of the CD, CD, then space, then the name of the directory 33 00:02:07,240 --> 00:02:08,050 directory one. 34 00:02:08,169 --> 00:02:13,570 Then the name of the next directory directory two then I hit enter. 35 00:02:15,580 --> 00:02:18,370 And p.w.d and hit enter. 36 00:02:18,940 --> 00:02:25,120 As we can see here, we moved on to steps to directory. 37 00:02:25,970 --> 00:02:26,570 To. 38 00:02:28,590 --> 00:02:36,990 Now, if I would like to change and or switch back to the directory that we were working before, also 39 00:02:36,990 --> 00:02:45,420 to print the current working directory, I type the command CD, then space dash, then I hit enter. 40 00:02:46,530 --> 00:02:47,700 As you can see here. 41 00:02:49,180 --> 00:02:57,550 With this command prints, the the working directory that we were working before. 42 00:02:57,550 --> 00:02:58,510 And also. 43 00:02:59,250 --> 00:03:01,590 Prints the current working directory. 44 00:03:02,250 --> 00:03:06,570 Now let's move on to change to the. 45 00:03:06,600 --> 00:03:08,280 Okay, let's try PWD. 46 00:03:08,370 --> 00:03:12,720 Now, just to make sure we are here in this working directory. 47 00:03:12,870 --> 00:03:18,480 Now, if I hit CD, then dot is not going to change anything. 48 00:03:18,480 --> 00:03:23,910 Just it's going just to change the working directory to the current working directory. 49 00:03:24,330 --> 00:03:32,100 Now, if I would like to go back to the and move on next to like two more steps. 50 00:03:32,400 --> 00:03:35,250 So directory one and directory two. 51 00:03:35,280 --> 00:03:38,550 So CD space directory one slash directory two. 52 00:03:38,550 --> 00:03:39,780 And then I hit enter. 53 00:03:40,260 --> 00:03:42,030 WD Perfect. 54 00:03:42,030 --> 00:03:43,930 So we move down two more steps. 55 00:03:43,950 --> 00:03:46,200 Now, if I would like to change. 56 00:03:46,830 --> 00:03:50,390 The directory and go back to the home directory of the current user. 57 00:03:50,400 --> 00:03:59,520 There is another command CD, then Tilde Space Delta and I hit Enter and we can see over here that we 58 00:03:59,520 --> 00:04:04,830 went back to the home directory of the current user. 59 00:04:05,840 --> 00:04:11,010 Let's move on to the if I want to move on to the next directory. 60 00:04:11,030 --> 00:04:13,460 CD directory one and I hit enter. 61 00:04:14,350 --> 00:04:20,890 Now, if I would like to change the directory and go back one more step to the previous directory, 62 00:04:20,890 --> 00:04:23,260 I can type the command CD then. 63 00:04:23,260 --> 00:04:24,460 Dot dot. 64 00:04:25,890 --> 00:04:32,940 And I hit enter and we can see over here we went back to the home directory. 65 00:04:35,780 --> 00:04:37,220 Of the current user. 66 00:04:37,370 --> 00:04:44,450 If I want to go back right now, lest I want to move on right now to the directory one and directory 67 00:04:44,450 --> 00:04:45,080 two also. 68 00:04:45,080 --> 00:04:47,210 So two more steps then I hit enter. 69 00:04:48,060 --> 00:04:49,890 Then what I'm going to do right now. 70 00:04:51,300 --> 00:04:57,400 Um, I would like to change and go back one more step to the previous directory also so I can do CD 71 00:04:57,760 --> 00:05:01,300 then dot dot, then slash. 72 00:05:02,490 --> 00:05:03,660 And had entered. 73 00:05:04,750 --> 00:05:05,520 D.w.d. 74 00:05:06,460 --> 00:05:11,890 You can see here, we went back one more step to the previous directory. 75 00:05:12,670 --> 00:05:18,620 Now, if I would like to move on, let's move on to the next one directory to P.w.d.. 76 00:05:19,120 --> 00:05:21,670 You can see here this is the working directory right now. 77 00:05:22,420 --> 00:05:24,850 We moved on to the directory two. 78 00:05:25,030 --> 00:05:31,870 Now if I would like to go back from directory two to this, two more steps. 79 00:05:31,870 --> 00:05:38,230 If I would like to go back two more steps from the current directory here to the home directory of the 80 00:05:38,230 --> 00:05:46,020 user here to this one there is another command we can type CD then dot, dot slash dot dot slash. 81 00:05:46,030 --> 00:05:48,220 It means that two more steps back. 82 00:05:48,430 --> 00:05:49,810 Then I hit enter it. 83 00:05:50,770 --> 00:05:53,150 Can be wd and I hit enter. 84 00:05:53,170 --> 00:05:53,920 Okay. 85 00:05:53,920 --> 00:05:54,910 You can see over here. 86 00:05:54,910 --> 00:06:04,660 We went back to that from from we went back two more steps from the current working directory to the 87 00:06:04,660 --> 00:06:06,820 home directory of this current user. 88 00:06:07,360 --> 00:06:14,050 If you would like to get more information about these two commands, we can just type man then p wd. 89 00:06:15,610 --> 00:06:17,080 Man space food. 90 00:06:17,320 --> 00:06:18,550 Then we hit enter. 91 00:06:18,640 --> 00:06:21,780 So then we can find more information about this command. 92 00:06:21,790 --> 00:06:28,260 So we hit Q to go back to the Q to quit, to go back to the, to the main page. 93 00:06:28,270 --> 00:06:29,830 So now we're here. 94 00:06:29,830 --> 00:06:34,390 We type also man CD space, CD and hit enter. 95 00:06:35,120 --> 00:06:36,430 When I hit enter. 96 00:06:36,440 --> 00:06:40,400 So you can see here more information about CD Q to go back. 97 00:06:41,370 --> 00:06:41,700 Yup. 98 00:06:41,940 --> 00:06:43,340 That's it for this session. 99 00:06:43,350 --> 00:06:45,510 Thank you and see you in the next lesson.