All language subtitles for 030 Linux Command-Line Interface (CLI) basics_-subtitle-en

af Afrikaans
sq Albanian
am Amharic
ar Arabic Download
hy Armenian
az Azerbaijani
eu Basque
be Belarusian
bn Bengali
bs Bosnian
bg Bulgarian
ca Catalan
ceb Cebuano
ny Chichewa
zh-CN Chinese (Simplified)
zh-TW Chinese (Traditional)
co Corsican
hr Croatian
cs Czech
da Danish
nl Dutch
en English
eo Esperanto
et Estonian
tl Filipino
fi Finnish
fr French
fy Frisian
gl Galician
ka Georgian
de German
el Greek
gu Gujarati
ht Haitian Creole
ha Hausa
haw Hawaiian
iw Hebrew
hi Hindi
hmn Hmong
hu Hungarian
is Icelandic
ig Igbo
id Indonesian
ga Irish
it Italian
ja Japanese
jw Javanese
kn Kannada
kk Kazakh
km Khmer
ko Korean
ku Kurdish (Kurmanji)
ky Kyrgyz
lo Lao
la Latin
lv Latvian
lt Lithuanian
lb Luxembourgish
mk Macedonian
mg Malagasy
ms Malay
ml Malayalam
mt Maltese
mi Maori
mr Marathi
mn Mongolian
my Myanmar (Burmese)
ne Nepali
no Norwegian
ps Pashto
fa Persian
pl Polish
pt Portuguese
pa Punjabi
ro Romanian
ru Russian
sm Samoan
gd Scots Gaelic
sr Serbian
st Sesotho
sn Shona
sd Sindhi
si Sinhala
sk Slovak
sl Slovenian
so Somali
es Spanish
su Sundanese
sw Swahili
sv Swedish
tg Tajik
ta Tamil
te Telugu
th Thai
tr Turkish
uk Ukrainian
ur Urdu
uz Uzbek
vi Vietnamese
cy Welsh
xh Xhosa
yi Yiddish
yo Yoruba
zu Zulu
or Odia (Oriya)
rw Kinyarwanda
tk Turkmen
tt Tatar
ug Uyghur
Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated: 1 00:00:00,599 --> 00:00:06,750 Hello everybody and welcome to this tutorial. Today, I will go over a few basic commands 2 00:00:06,750 --> 00:00:11,790 you will need in order to follow this course through. There are four basic commands that 3 00:00:11,790 --> 00:00:19,110 are used in order to navigate within the terminal, or through the file system, to figure out 4 00:00:19,110 --> 00:00:25,490 where you are at the moment, to copy things, move things, get listings of files, folders, 5 00:00:25,490 --> 00:00:31,340 see the contents, remove them, change the ownership of files or change the modes of 6 00:00:31,340 --> 00:00:37,719 files. You will see shortly what I mean. First off, we have "cd" which is change directories. 7 00:00:37,719 --> 00:00:45,670 If I just type in cd/home, I am going to navigate over to my home directory. So, "cd" stands 8 00:00:45,670 --> 00:00:52,079 for change directory. As I said before, you are literally changing your working directory. 9 00:00:52,079 --> 00:01:01,969 If you type in "cd.." you will always go one step back. So ".." is always the previous 10 00:01:01,969 --> 00:01:10,100 folder. It's a shortcut you will use fairly often. Next up, we have "ls." "Ls" shows you 11 00:01:10,100 --> 00:01:17,820 the listing off the current folder contents. You can also use, for example, "ls /home/" 12 00:01:17,820 --> 00:01:24,560 and you get the listing of a specified folder as well. Typing "ls" in and of its own give 13 00:01:24,560 --> 00:01:29,799 you the listing of the current folder, as opposed to typing "ls" and then a path to 14 00:01:29,799 --> 00:01:35,039 a folder, which will give you a listing for a specified folder. In addition to that, you 15 00:01:35,039 --> 00:01:41,450 also have "ls - l" which will give you a long listing. That will tell you who the owners 16 00:01:41,450 --> 00:01:50,649 are, the size, the date, the type, the permissions and so on and so forth. However, one of the 17 00:01:50,649 --> 00:01:58,770 more common usages of "ls" is "ls - la" to show the hidden files as well. You might notice 18 00:01:58,770 --> 00:02:06,719 that I am not using "ll" like I generally use in Fedora. It goes "- ll" command not 19 00:02:06,719 --> 00:02:11,690 found. I guess I could install it here as well, but it doesn't really matter. It performs 20 00:02:11,690 --> 00:02:18,060 a fairly similar function as "ls" does, but it's a bit faster to type in. Now I'm just 21 00:02:18,060 --> 00:02:23,530 going to go ahead and clear this. Next up, is "pwd" which prints working directory. Some 22 00:02:23,530 --> 00:02:31,940 of you may find it confusing, but / in all Linux-like systems simply refers to the root 23 00:02:31,940 --> 00:02:40,050 directory, to the beginning. To the root directory from where all the files are located and from 24 00:02:40,050 --> 00:02:47,300 where everything begins. Let me just make it clear. I'm going to navigate over to home, 25 00:02:47,300 --> 00:02:53,470 and then use "pwd." You can see that I am in home at the moment. So, print working directory 26 00:02:53,470 --> 00:03:01,060 does exactly what the name itself says, it prints your current working directory. Next 27 00:03:01,060 --> 00:03:08,840 up, we have our "cp" command, which we already used in order to copy VirtualBox guest additions 28 00:03:08,840 --> 00:03:20,060 from one place to another. It's fairly simple. You type in "cp /path" -- Let's do a real 29 00:03:20,060 --> 00:03:30,450 example. So, if I, for example, go ahead and type in "cp VBoxLinuxAdditions.run," and if 30 00:03:30,450 --> 00:03:36,920 I want to copy it to somewhere, let's say that I wish to copy it to "/var/". I will 31 00:03:36,920 --> 00:03:52,240 delete, of course, I will show you how to do that as well, but it's fairly simple. You 32 00:03:52,240 --> 00:03:57,960 specify what you want to copy and where you want to copy it to. Keep in mind, you could 33 00:03:57,960 --> 00:04:04,090 have actually typed in here a folder, a full path, to this VirtualBoxguestadditions.run. 34 00:04:04,090 --> 00:04:11,130 You don't actually need to be in the home directory. This "-v" option gives us this. 35 00:04:11,130 --> 00:04:17,380 It tells us what was copied where. It's a very useful option. Let me show you what would 36 00:04:17,380 --> 00:04:24,040 happen if I didn't have that. Just like this, you see nothing. There is no output or anything 37 00:04:24,040 --> 00:04:29,970 of the kind. This is this is fairly simple. When you have one very small file and you 38 00:04:29,970 --> 00:04:36,120 don't really care, but when you will have a large file, let's say it's 20GB or so, you 39 00:04:36,120 --> 00:04:41,650 are copying you'll just have a blank screen below. Nothing will be happening. You will 40 00:04:41,650 --> 00:04:49,260 not be able to figure out whether the copying process is going on or if it has actually 41 00:04:49,260 --> 00:04:57,280 crashed, bugged or something of a kind. Just pass the "-v" option which is always useful 42 00:04:57,280 --> 00:05:02,460 to have simply because the machine actually tells you what it is doing. Now, you might've 43 00:05:02,460 --> 00:05:06,470 noticed that all of these commands, more or less, have their own arguments, which can 44 00:05:06,470 --> 00:05:11,720 be passed to them in order to modify what the command does. You can view a listing of 45 00:05:11,720 --> 00:05:18,660 these arguments. You do not need to memorize them all. So, let's take an example of "cp 46 00:05:18,660 --> 00:05:24,960 --help." This is a universal way of getting help on the subject within the terminal. You 47 00:05:24,960 --> 00:05:31,630 type in the command, a space, then "--help," press enter and you get a listing of possibilities. 48 00:05:31,630 --> 00:05:35,910 So, I know it looks a bit messy and a bit difficult to see, but you don't actually need 49 00:05:35,910 --> 00:05:41,210 to look at all of these things here. Just scroll upwards and there you go. You can see 50 00:05:41,210 --> 00:05:48,720 all the arguments. They are listed clearly here. You have the argument here, and an explanation 51 00:05:48,720 --> 00:05:54,520 of what that argument does. For the time being, you're not going to be able to memorize all 52 00:05:54,520 --> 00:06:04,160 of these. Over time, as you practice more, and start actually is using these commands, 53 00:06:04,160 --> 00:06:10,320 you will be remembering more, and more, and more, and more, without actually wish it. 54 00:06:10,320 --> 00:06:17,450 Basically it will be caching the information, so to say. Anyway, over here, in the upper 55 00:06:17,450 --> 00:06:24,950 part of this help menu you got usage. In usage, you get the format or the syntax of the command. 56 00:06:24,950 --> 00:06:33,430 So basically, "cp" option, and then you specify your source and destination. Very simple, 57 00:06:33,430 --> 00:06:38,280 no problems there. This is universal for all of the commands, you can always use the help 58 00:06:38,280 --> 00:06:46,860 menu. However, in addition to the help menu, you also have man pages. So if I type in man, 59 00:06:46,860 --> 00:06:57,620 and I can use the command "pwd." The man pages on "pwd" give me a ton of information. You 60 00:06:57,620 --> 00:07:04,020 can see it gives you the name. It's called synopsis here, but basically the syntax of 61 00:07:04,020 --> 00:07:09,520 the command. You get a full description of what the command does, a full description 62 00:07:09,520 --> 00:07:16,900 of the arguments, you even get the author who actually wrote, some notes, copyright 63 00:07:16,900 --> 00:07:26,139 and some references to something else as well. This is a very short man page because "pwd" 64 00:07:26,139 --> 00:07:38,240 is a very short, basic command. For example, if I was to type in, "man grep," you can see 65 00:07:38,240 --> 00:07:46,550 that the man page is a lot bigger. I'm just scrolling down and it seems to go on. "Grep" 66 00:07:46,550 --> 00:07:51,120 is a multipurpose command which I'll show to you in a moment. I just wanted to show 67 00:07:51,120 --> 00:07:57,270 the difference between a basic and a more complex command. Let me just go ahead and 68 00:07:57,270 --> 00:08:06,550 clear the screen. Next up, we have move so, "mv." That will cause a folder to move. This 69 00:08:06,550 --> 00:08:13,120 is how you rename folders too, or files. So just go ahead and navigate over to "var," 70 00:08:13,120 --> 00:08:24,760 where I have actually copied this file. Excellent. If I type, "mv VBoxLinuxAdditions. I can move 71 00:08:24,760 --> 00:08:32,689 to some different folder, under some different name, or I can just rename it within my current 72 00:08:32,689 --> 00:08:52,779 folder. If I just type it in "RandomIsNotSoRandom." I'm just going to rename it to that. Say ".run." You can 73 00:08:52,779 --> 00:08:57,459 put whatever extension you want. Of course, it won't function the same. I am just showing 74 00:08:57,459 --> 00:09:05,639 you the way of renaming files. if I do "ls" again, you see, that VboxLinuxadditions.run 75 00:09:05,639 --> 00:09:15,730 has been successfully renamed to RandomIsNotSoRandom.run. I can also do this. I can RandomIsNotSoRandom 76 00:09:15,730 --> 00:09:22,800 to my home directory. If I do "ls," specify a path to my home directory and press enter, 77 00:09:22,800 --> 00:09:28,610 you see that I've actually moved it here. Unlike the copy command, it doesn't retain 78 00:09:28,610 --> 00:09:40,589 the original within wherever the source might have been. So, once you move it, it's gone 79 00:09:40,589 --> 00:09:47,809 from the source folder, however, it's going to appear in the destination one. Also tricky 80 00:09:47,809 --> 00:09:53,199 one: when you delete something with move, when you move something over something else, 81 00:09:53,199 --> 00:10:00,379 it's so difficult to recover, if not impossible. Also, be very careful with deleting files 82 00:10:00,379 --> 00:10:10,129 in Linux. Once you delete them from the terminal, you will not be able to recover them. There 83 00:10:10,129 --> 00:10:17,619 are some complex procedures that might give you a fraction of what you wanted to recover. 84 00:10:17,619 --> 00:10:21,959 If you remove it from the terminal. It's very, very, very difficult. It's not like Windows 85 00:10:21,959 --> 00:10:26,029 or something. When you delete something in Windows, you can always recover. It's like 86 00:10:26,029 --> 00:10:33,869 you basically didn't delete it. You just don't see it. But here, when you delete something 87 00:10:33,869 --> 00:10:43,309 it's gone permanently. So take great caution, take care but don't be afraid. I mean, over 88 00:10:43,309 --> 00:10:50,309 time, these things become second nature to you. You will take it into consideration without 89 00:10:50,309 --> 00:11:02,839 even thinking about it. I'll go ahead and clear the screen. Next up, we have "cat." 90 00:11:02,839 --> 00:11:19,110 Let's navigate home. Let's type "cat RandomIsNotSoRandom." You see what it does. It actually shows you-- 91 00:11:19,110 --> 00:11:29,089 this is a bit of a longer file-- all the contents of that file, whatever that might be. This 92 00:11:29,089 --> 00:11:34,050 content is not pretty at all. You can't read it like this, but doesn't matter. Let's just 93 00:11:34,050 --> 00:11:44,999 create another file. So, nano is my favorite text editor from the terminal. You will need 94 00:11:44,999 --> 00:11:50,869 to learn how to use the terminal text editors because you don't want to be switching back 95 00:11:50,869 --> 00:11:58,989 and forth between GUI text editors and working on something a terminal. It's extremely time-consuming. 96 00:11:58,989 --> 00:12:05,029 Here on Kali Linux, you can actually edit things with root. However, if you are using 97 00:12:05,029 --> 00:12:09,759 some other distribution or something of a kind, most of the GUI text editors will not 98 00:12:09,759 --> 00:12:15,899 be able to run as root. You will get an error message. So that can be a bit problematic. 99 00:12:15,899 --> 00:12:21,639 That's why you should always learn how to use text editors that are terminal text editors. 100 00:12:21,639 --> 00:12:27,410 Just type in "nano" and type in the name of the file you wish to create. For example, 101 00:12:27,410 --> 00:12:33,720 I'm just going to go ahead and type in "test." Since this is a test file no need to give 102 00:12:33,720 --> 00:12:39,619 it any extensions or anything of the kind. There we go, we are in the nano text editor. 103 00:12:39,619 --> 00:13:03,290 So here I can write some text, "Some random text goes here." You have a variety of options. 104 00:13:03,290 --> 00:13:10,639 This carrot sign, "^X" simply means control-X. If you press control-x you are going to exit. 105 00:13:10,639 --> 00:13:17,300 Control-O, write out, that's basically save. You don't need this. where is, is basically 106 00:13:17,300 --> 00:13:24,920 how you search things. Hit control-V to search. Let's look for "random" press enter and there 107 00:13:24,920 --> 00:13:31,489 you go. It's going to point to random. It found it, no problems. Previous page don't 108 00:13:31,489 --> 00:13:37,129 need and the next page we are not going to be that engaged with it. So cut text is also 109 00:13:37,129 --> 00:13:43,809 very nice. It allows you to actually remove large portions of text at a relatively fast 110 00:13:43,809 --> 00:13:49,249 rate. So if I just say control-K, it's going to remove the current line where the cursor 111 00:13:49,249 --> 00:13:56,449 is, not what you have selected with your mouse. Just so you know. Let me just bring that back. 112 00:13:56,449 --> 00:14:01,579 I'm just going to go ahead and continue talking about this in part two, in the following tutorial. 113 00:14:01,579 --> 00:14:03,589 Until then, I bid you farewell. 15082

Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.