1 00:00:00,810 --> 00:00:06,030 Hello and welcome back to the Kelly Wallace certified pen test, your third Cup series. 2 00:00:06,390 --> 00:00:10,650 We're going to talk about some Linux essentials or Linux fundamentals. 3 00:00:16,130 --> 00:00:20,780 We're going to talk about important Linux fundamentals because Linux is at the core of ethical hacking. 4 00:00:21,170 --> 00:00:24,110 If you want to be good at calling Linux, you must learn Linux. 5 00:00:25,560 --> 00:00:30,540 The same could also be said of cyber security and system administration or network administration. 6 00:00:30,870 --> 00:00:37,380 There are so many jobs that use names or so many things that use Linux, so many scripts, so many programs, 7 00:00:37,380 --> 00:00:39,810 so many servers, so many tools that use Linux. 8 00:00:40,140 --> 00:00:46,890 Many of the security tools and pen testing tools run on only Linux or are made specifically for Linux 9 00:00:46,890 --> 00:00:48,840 or run better on Linux. 10 00:00:48,930 --> 00:00:51,780 So that's one of the major reasons to learn Linux fundamentals. 11 00:00:52,380 --> 00:00:57,030 Linux also powers the cloud, so it can be important for that application as well. 12 00:00:59,590 --> 00:01:00,550 This is our outline. 13 00:01:00,580 --> 00:01:02,890 We're going to talk about the women's file system. 14 00:01:03,580 --> 00:01:06,160 We're going to talk about Linux file system folders. 15 00:01:07,480 --> 00:01:11,020 We'll talk about the command line command line basics. 16 00:01:11,780 --> 00:01:14,890 So Linux is based on the old Unix file structure, too. 17 00:01:15,270 --> 00:01:19,510 So we'll look at the various Linux system folders and files that are contained there. 18 00:01:20,600 --> 00:01:24,920 We'll also go over the command line and several the command line basics. 19 00:01:26,900 --> 00:01:31,700 And we'll even throw in a few other bonus commands at the end of the module. 20 00:01:33,900 --> 00:01:35,100 This is the Florida chapter. 21 00:01:35,100 --> 00:01:41,010 So we'll look at the different unifying file systems for Linux, the command line, and also important 22 00:01:41,010 --> 00:01:42,090 commands you should know. 23 00:01:45,440 --> 00:01:50,060 So if you knew the Linux command line, you may find yourself wondering why there are so many unusual 24 00:01:50,060 --> 00:01:54,020 directories, what they're there for, why things are organized the way that they are. 25 00:01:54,020 --> 00:02:00,560 In fact, if you're not used to how Linux organizes files, the directories can seem pretty much arbitrary 26 00:02:01,250 --> 00:02:06,470 with strangely truncated names, in many cases even redundant names. 27 00:02:06,890 --> 00:02:13,520 Turns out there is a method to the madness based on decades of Unix conventions, though each Linux 28 00:02:13,520 --> 00:02:20,510 distribution has its own quirks a majority conform for the most part with the file system, hierarchy, 29 00:02:20,510 --> 00:02:25,400 standard or FH, as the FHC Project began in 1993. 30 00:02:25,850 --> 00:02:32,840 And the goal was to come to a consensus on how directory should be organized and which files should 31 00:02:32,840 --> 00:02:33,670 be stored where. 32 00:02:33,680 --> 00:02:37,430 So the distributions can have a single reference point from which to work. 33 00:02:38,760 --> 00:02:40,010 A lot of decisions were made. 34 00:02:41,520 --> 00:02:46,920 About the directory structure and they were based on the traditional UNIX directory structures with 35 00:02:46,920 --> 00:02:50,910 a focus more on servers rather than individual desktop users. 36 00:02:50,910 --> 00:02:57,330 So and also the assumption that disk space was at a premium, so machines would likely have multiple 37 00:02:57,330 --> 00:02:58,200 hard drives. 38 00:03:02,730 --> 00:03:06,900 So Lennox uses the file system hierarchy standard or F as. 39 00:03:10,010 --> 00:03:11,620 So these are the different owners. 40 00:03:11,750 --> 00:03:15,920 This is not an all inclusive list, but this is a good chunk of them. 41 00:03:25,450 --> 00:03:32,620 So first we have the bin or the slash bin and slash SBN slash bin and slash SBN directories are intended 42 00:03:32,620 --> 00:03:38,830 for storing binary executable files, both directory store executables that are considered essential 43 00:03:39,190 --> 00:03:41,550 for booting the system like the Mount Command. 44 00:03:41,560 --> 00:03:46,810 So if you want to mount other folders and external devices, the main difference between these directories 45 00:03:46,810 --> 00:03:48,310 is that the slash s-pen. 46 00:03:49,420 --> 00:03:55,990 Directory is intended for system binaries or binaries that the administrators will use to manage the 47 00:03:55,990 --> 00:03:56,470 system. 48 00:03:57,650 --> 00:03:58,940 Slash boot directory. 49 00:03:59,630 --> 00:04:06,410 This stores all the bootloader files, which is typically only grub, the Grand Unified Bootloader kernel 50 00:04:06,410 --> 00:04:09,020 files and init runtime name and files. 51 00:04:09,410 --> 00:04:14,630 It's often treated as a separate small partition so that the bootloader can read it more easily with 52 00:04:14,630 --> 00:04:16,610 slash boot on a separate partition. 53 00:04:17,060 --> 00:04:24,050 Your root file system can be used for more sophisticated features that require kernel level support, 54 00:04:24,620 --> 00:04:30,560 whether it's an exotic file system, disk encryption or logical volume management. 55 00:04:30,670 --> 00:04:31,160 LLVM. 56 00:04:32,250 --> 00:04:36,210 Then we have the SC directory which will probably spend a lot more of your time. 57 00:04:36,630 --> 00:04:40,680 The Etsy directory is intended for storing system configuration files. 58 00:04:42,210 --> 00:04:48,180 So if you're looking for a service or change some type of networking process or other course settings, 59 00:04:48,660 --> 00:04:51,090 Etsy is the first place to look. 60 00:04:51,540 --> 00:04:57,210 It's also smaller and easier to backup directory that contains most of the customizations you might 61 00:04:57,210 --> 00:05:00,510 make to your system or your computer at the system level. 62 00:05:01,500 --> 00:05:03,720 So let's go ahead and look at the Etsy directory. 63 00:05:10,240 --> 00:05:15,070 So I notice in here we've got a lot of different things if we can get it out to the screen. 64 00:05:18,140 --> 00:05:26,660 So we've got Pearl, we've got PHP, we've got Python, we've got the nocturnal network manager is here. 65 00:05:26,660 --> 00:05:28,510 We have the mice duo. 66 00:05:30,290 --> 00:05:33,590 We have log logging definitions. 67 00:05:33,590 --> 00:05:36,320 We have the the kernel. 68 00:05:39,140 --> 00:05:40,970 We have the first tab file. 69 00:05:41,450 --> 00:05:43,730 Lots of different things here, the Chrome tab. 70 00:05:43,730 --> 00:05:48,080 So if you want to run a particular recurring tasks and jobs in your system. 71 00:05:48,510 --> 00:05:50,030 And of course we have the Apache. 72 00:05:51,890 --> 00:05:56,390 As well as the chromium browser, the lots of files in Etsy. 73 00:05:57,230 --> 00:05:58,160 Let's look at 74 00:06:00,920 --> 00:06:02,090 the bin directory. 75 00:06:05,840 --> 00:06:07,850 We can see different binary files. 76 00:06:07,850 --> 00:06:12,470 Here are the different domain. 77 00:06:12,470 --> 00:06:16,220 A lot of the commands you might type like Who am I with? 78 00:06:16,760 --> 00:06:17,720 Wireshark. 79 00:06:21,400 --> 00:06:22,630 Update commands. 80 00:06:25,720 --> 00:06:26,490 Traceroute. 81 00:06:26,500 --> 00:06:28,180 Lots of different things are in this folder. 82 00:06:28,930 --> 00:06:33,160 Then we have the SBN folder. 83 00:06:37,570 --> 00:06:41,170 So a little bit different, but very similar stuff. 84 00:06:58,220 --> 00:06:59,960 So let's talk now about the Home Directory. 85 00:06:59,960 --> 00:07:07,430 So this is the location on the Linux system where the personal files are stored. 86 00:07:07,760 --> 00:07:13,760 So each directory under home is named after a particular user's name and is owned by that user on a 87 00:07:13,760 --> 00:07:14,210 server. 88 00:07:14,210 --> 00:07:20,960 These directories might even store the email, assets, keys or even services that are running on certain 89 00:07:20,960 --> 00:07:21,470 ports. 90 00:07:22,190 --> 00:07:27,080 On desktop systems, your home directory is probably the main directory where users will interact. 91 00:07:27,650 --> 00:07:35,720 So any desktop settings, pictures, media documents or other files users need to end up being stored 92 00:07:35,720 --> 00:07:37,100 in their home directory. 93 00:07:38,220 --> 00:07:42,510 It's one of the most important directories to back up, and it's often a directory that's given its 94 00:07:42,510 --> 00:07:43,260 own partition. 95 00:07:44,660 --> 00:07:46,210 Are giving home its own partition. 96 00:07:46,210 --> 00:07:51,820 You can experiment with different Linux distributions and reinstall the complete system on a separate 97 00:07:51,820 --> 00:07:52,510 partition. 98 00:07:53,740 --> 00:07:57,250 When you mount the home partition, all your files and settings are right where you left them. 99 00:07:58,930 --> 00:08:00,670 So let's look at the home directory briefly. 100 00:08:09,930 --> 00:08:14,330 So we've got Kelly, which is the default account and we have user one end user, too. 101 00:08:14,340 --> 00:08:16,230 So let's look at Kelly. 102 00:08:16,750 --> 00:08:19,770 The screen and there's the home directory. 103 00:08:19,770 --> 00:08:21,660 We can see the bash, our C file. 104 00:08:21,660 --> 00:08:24,450 We can see the a few other important files. 105 00:08:25,020 --> 00:08:28,470 Your documents folder, your downloads, your desktop. 106 00:08:30,190 --> 00:08:32,280 Things like any session hours you might have. 107 00:08:33,360 --> 00:08:34,530 So that's the home directory. 108 00:08:34,860 --> 00:08:40,800 Then you have the lib directory or the library directory, the stores essential shared libraries that 109 00:08:41,430 --> 00:08:44,430 the slash men and women need to be able to run. 110 00:08:46,180 --> 00:08:49,210 This is also the directory where any kernel modules are stored. 111 00:09:03,600 --> 00:09:07,650 So another directory we have is the US directory or the slash units are rectory. 112 00:09:08,010 --> 00:09:13,020 This is stood for both UNIX source repository and also UNIX system resources. 113 00:09:14,720 --> 00:09:20,330 So this is typically when you install additional software from your distribution, its binaries, libraries 114 00:09:20,330 --> 00:09:21,680 and supporting files. 115 00:09:21,980 --> 00:09:30,050 They go here in the U.S. or been or use our SBN directory and sometimes the US r slash lib directory. 116 00:09:32,430 --> 00:09:37,440 When storage was at a premium, you would often mount this directory separately on a larger disk so 117 00:09:37,440 --> 00:09:40,170 you could grow it independently as you added new software. 118 00:09:42,350 --> 00:09:44,450 So let's briefly look at these directories. 119 00:09:49,130 --> 00:09:56,420 There's a slash lib directory at the system D, but different versions of python postgresql. 120 00:09:58,620 --> 00:10:03,270 Network time protocol libraries as your kernel modules. 121 00:10:10,680 --> 00:10:12,690 As the US slash bin directory. 122 00:10:24,800 --> 00:10:25,640 So if you got your pin. 123 00:10:25,670 --> 00:10:26,690 Your pin command. 124 00:10:29,180 --> 00:10:32,870 Among other things, and you have your OPPT directory. 125 00:10:33,200 --> 00:10:38,150 So the debates between us are slash local and OPPT or something interesting. 126 00:10:39,770 --> 00:10:41,240 They've been back and forth. 127 00:10:41,690 --> 00:10:47,870 Essentially, both directories serve the same purpose, providing a place for users to install software 128 00:10:48,380 --> 00:10:50,060 outside their distributions. 129 00:11:02,510 --> 00:11:04,880 So the OP directory organizes a little bit differently. 130 00:11:04,900 --> 00:11:08,210 It stores binaries in libraries in a shared directory. 131 00:11:13,980 --> 00:11:18,150 So then you have the slash route directory, which is where the administrators personal files are. 132 00:11:18,450 --> 00:11:23,820 It's owned and readable only by the user, and it's designed otherwise to function much like a home 133 00:11:23,820 --> 00:11:24,360 directory. 134 00:11:24,640 --> 00:11:27,540 But for files and settings the route user needs. 135 00:11:28,590 --> 00:11:33,960 Many systems will disable the root user in favor of using sudo to get superuser privileges. 136 00:11:34,440 --> 00:11:36,510 So this directory isn't used nearly as much. 137 00:11:37,830 --> 00:11:42,240 And then you have the slash var directory, which is the place where a lot of your logged spaces are 138 00:11:42,240 --> 00:11:42,750 stored. 139 00:11:43,170 --> 00:11:46,620 A lot of variables that you might need by certain daemons. 140 00:11:47,640 --> 00:11:52,950 So classic UNIX servers help this space that are premium and the bar directory was designed for storing 141 00:11:52,950 --> 00:11:58,200 files that might vary wildly in size or might get written to frequently. 142 00:11:58,590 --> 00:12:05,220 Unlike with slash user, which is read only the bar directory most definitely has to be rideable because 143 00:12:05,220 --> 00:12:10,320 you're going to find log files, mail server information, or anything else that might come and go or 144 00:12:10,320 --> 00:12:13,770 otherwise need to grow in size in unpredictable ways. 145 00:12:15,720 --> 00:12:21,210 So at least with servers, if you had to pick a route level directory to put a large disk on the VAR 146 00:12:21,240 --> 00:12:22,920 directory, it would be the first on the list. 147 00:12:24,910 --> 00:12:30,040 And you want you want to have a drive that's better optimized for heavy rights. 148 00:12:33,400 --> 00:12:35,890 So then we have the slash DV directory. 149 00:12:35,900 --> 00:12:40,480 This is for device files, essentially unix, everything as a file. 150 00:12:40,570 --> 00:12:42,580 So even your hardware ends up in the file. 151 00:12:56,190 --> 00:12:58,800 So then we have mount and media file. 152 00:12:58,810 --> 00:13:05,310 So Mount and media are more going to be used if you're adding a USB drive or a network file, share 153 00:13:05,310 --> 00:13:08,400 mount or some other source, you need a place for them to go. 154 00:13:08,940 --> 00:13:13,950 So the mount used to be a catchall for any amount of disk, didn't have anywhere else to go, but typically 155 00:13:13,950 --> 00:13:17,760 now you want to use that for more network file shares. 156 00:13:18,870 --> 00:13:25,650 The slash media directory is more for those things that are going to be mounted temporarily, like CD-ROMs, 157 00:13:25,650 --> 00:13:27,030 USB drives and so on. 158 00:13:31,250 --> 00:13:38,120 So the starting point of the hierarchical tree for the file system is called root, which is represented 159 00:13:38,120 --> 00:13:39,440 by the slash character. 160 00:13:39,770 --> 00:13:47,180 So the directory can of course obtain or contain subdirectories when it has only one root hierarchy 161 00:13:47,180 --> 00:13:50,240 and it can integrate data from several disks. 162 00:13:50,840 --> 00:13:55,790 But one of these just becomes the root and the others are mounted on directories in a hierarchy. 163 00:13:56,810 --> 00:14:02,660 So mounting is essentially attaching an additional file system to a currently accessible computer. 164 00:14:05,440 --> 00:14:12,790 And the different types of file systems or the hierarchical file systems are the next to the Z three 165 00:14:12,790 --> 00:14:17,350 Annex D for the EC2 or second extended file systems. 166 00:14:17,350 --> 00:14:18,760 The system for the Linux kernel. 167 00:14:18,760 --> 00:14:24,040 It was designed by Remy Card as a replacement for the extended file system original. 168 00:14:26,480 --> 00:14:31,280 Then we also have the Windows file system or the empty file system. 169 00:14:31,280 --> 00:14:32,150 Which stores? 170 00:14:33,880 --> 00:14:41,050 In a particular format is a proprietary Microsoft proprietary journaling system and has been around 171 00:14:41,050 --> 00:14:44,290 since Windows 90 and is the default file system of Windows. 172 00:14:44,650 --> 00:14:50,050 It is supported in other desktop environments and server operating systems as well. 173 00:14:50,860 --> 00:14:57,910 Linux and BSD also have a free and open source NTFS driver. 174 00:15:06,680 --> 00:15:10,340 Which is called NTFS dash 3G, which has read and write functionality. 175 00:15:10,670 --> 00:15:13,670 Mac OS does come with a read only support for NTFS. 176 00:15:14,120 --> 00:15:20,690 So because write support is not stable most of the time, if you put an end to best drive in a mac, 177 00:15:21,380 --> 00:15:24,020 you will not be able to write to it, although you will be able to read from. 178 00:15:30,030 --> 00:15:37,050 So when Linux creates essentially a new partition for every device or distance attached and it will 179 00:15:37,050 --> 00:15:43,050 typically mount mount under HDTV, slash SD one or slash SD eight to. 180 00:15:46,600 --> 00:15:48,240 So let's talk about the command line. 181 00:15:48,250 --> 00:15:52,120 So the command line in Linux is the terminal or the terminal interface. 182 00:15:53,570 --> 00:15:55,670 And it can vary from distro to distro. 183 00:16:10,620 --> 00:16:15,870 So from the Linux console, originally, the console was actually a terminal plugged into a computer. 184 00:16:15,870 --> 00:16:21,270 It provided an interface that was used to configure and control the computer and view the messages from 185 00:16:21,270 --> 00:16:22,290 the operating system. 186 00:16:28,900 --> 00:16:33,280 So in a Linux server first boots, it prints out status messages to the console. 187 00:16:33,290 --> 00:16:40,300 So when you never seen that startup script, that text that comes before your operating system boots, 188 00:16:40,720 --> 00:16:41,800 that's your terminal. 189 00:16:43,290 --> 00:16:48,240 So essentially when you're interacting with your server, you're connecting that terminal to a program 190 00:16:48,570 --> 00:16:49,680 running in the console. 191 00:17:01,900 --> 00:17:05,530 So let's take a look at the Linux terminal and Kali Linux. 192 00:17:32,340 --> 00:17:34,710 So if we open up our Kelly Linux distribution 193 00:17:37,770 --> 00:17:41,730 and we already had a terminal open from looking at the file system, but let's go ahead and close it 194 00:17:41,730 --> 00:17:43,530 down and exit out. 195 00:17:47,640 --> 00:17:50,670 They've actually changed it now, so we're used to close it now. 196 00:17:50,670 --> 00:17:57,990 There's a different type of command and that does happen sometimes and there are some shortcuts on certain 197 00:17:57,990 --> 00:18:01,410 life distributions to be able to get to the the terminal. 198 00:18:04,010 --> 00:18:07,100 Or we can click on the icon or we can create it here. 199 00:18:07,100 --> 00:18:11,210 So this is essentially the terminal as most people use it. 200 00:18:11,210 --> 00:18:15,920 It might be called ICS term or some other other thing in that case. 201 00:18:17,600 --> 00:18:18,170 So. 202 00:18:21,210 --> 00:18:25,140 The command line is essentially your Linux shell or your Linux terminal. 203 00:18:25,140 --> 00:18:30,540 So the default shell provided in Linux is bash. 204 00:18:36,140 --> 00:18:39,320 So the bash commands or the bash shell. 205 00:18:39,890 --> 00:18:43,520 If you see a dollar sign, that usually means that you're in a user session. 206 00:18:44,000 --> 00:18:47,240 If you see the pound sign, that means you are route. 207 00:18:48,960 --> 00:18:50,820 So let's go in and look at our colleague Linux. 208 00:18:51,270 --> 00:18:54,480 Notice there is a dollar sign in this case. 209 00:18:54,870 --> 00:18:55,890 So I'm going to go ahead and. 210 00:18:57,870 --> 00:18:59,820 Zoom in so it can be seen a little better. 211 00:19:19,300 --> 00:19:25,990 So we're going to pull my command so that I'm currently logged in as the calling user and we can see 212 00:19:25,990 --> 00:19:27,160 who's actually logged in. 213 00:19:28,000 --> 00:19:29,690 What's the debris command or the who command? 214 00:19:29,710 --> 00:19:30,970 Basically the same kind of thing. 215 00:19:31,420 --> 00:19:36,100 If we want to sudo to root, we have to type in the password. 216 00:19:36,370 --> 00:19:40,000 Our prompt changed to a symbol. 217 00:19:58,940 --> 00:20:03,470 So that means we can now enter commands as an administrator or a root user. 218 00:20:07,080 --> 00:20:12,360 So essentially if you're typing in a command into that terminal are connected to a Linux server, you're 219 00:20:12,360 --> 00:20:18,720 essentially telling that Shell to run that program and print out whatever output it sends to the screen. 220 00:20:22,190 --> 00:20:28,190 So it's always important to be aware of what level of permission you have in the shell, because the 221 00:20:28,190 --> 00:20:33,620 only way to run commands as route has to be done via the command line. 222 00:20:35,070 --> 00:20:38,490 So let's talk about some other command line basics and penetration tests. 223 00:20:38,850 --> 00:20:45,930 You're most likely have show access only after a successful exploit rather than a graphical user interface, 224 00:20:45,930 --> 00:20:48,240 especially if you're dealing with a cloud based server. 225 00:20:48,600 --> 00:20:51,760 The cloud server may not even have a gooey interface at all. 226 00:20:52,830 --> 00:20:58,500 So becoming proficient with the command line is essential for you to be successful as a security professional. 227 00:21:02,420 --> 00:21:05,660 And of course, as we've mentioned, the command line in Linux is called the terminal. 228 00:21:06,530 --> 00:21:13,010 And you can also open up a terminal with the control and t shortcut on the keyboard. 229 00:21:13,760 --> 00:21:18,520 Charlie, of course, uses the bash file and it's hidden by default. 230 00:21:18,530 --> 00:21:20,450 Notice that there's a period in front of it. 231 00:21:20,930 --> 00:21:29,990 So if you just type, if you go into the directory here and we just type else notice there's no files. 232 00:21:29,990 --> 00:21:37,700 But if we do a last minute shows us the hidden files and the bash dot RC and the bash dot original so 233 00:21:38,120 --> 00:21:39,170 it can fit the bash. 234 00:21:39,170 --> 00:21:41,120 The RC is the configuration file. 235 00:21:41,120 --> 00:21:43,550 So add that to the screen. 236 00:21:44,540 --> 00:21:48,450 We can see different variables that have been declared and different functions. 237 00:21:48,890 --> 00:21:54,890 And so if we want certain commands to have aliases instead of having to type the full command, you 238 00:21:54,890 --> 00:21:55,700 can do that here. 239 00:21:59,320 --> 00:22:06,370 So the bass shell stands for the Born Again Shell, which is just a type of interpreter that processes 240 00:22:06,370 --> 00:22:06,730 commands. 241 00:22:06,760 --> 00:22:12,760 There are other kinds of shells, but Bash is the improved version of the shell, which is the born 242 00:22:12,760 --> 00:22:14,560 shell, the original version. 243 00:22:14,980 --> 00:22:18,730 So Shell scripting is how we write programs. 244 00:22:21,430 --> 00:22:27,790 For the terminal to execute the command line can be used for anything on call, including triggering 245 00:22:27,790 --> 00:22:34,240 an application, checking for network statuses or any other activity that can be done using the graphical 246 00:22:34,240 --> 00:22:35,200 user interface. 247 00:22:41,780 --> 00:22:47,060 So there's some basic Linux commands we want to understand to be successful with the command line or 248 00:22:47,060 --> 00:22:48,560 be proficient with the command line. 249 00:22:54,770 --> 00:22:57,530 All right, let's talk about some more basic Lennox commands. 250 00:22:57,860 --> 00:23:03,230 We've got PWT, which stands for print or present working directory. 251 00:23:06,760 --> 00:23:12,850 And Peter actually will show you the user in which directory they're currently working on. 252 00:23:14,470 --> 00:23:15,370 And we have. 253 00:23:16,680 --> 00:23:20,250 Also the last command to show what files in the directory you're in. 254 00:23:20,760 --> 00:23:21,330 So if you're. 255 00:23:21,600 --> 00:23:24,300 I'll switch over to our Linux desktop here. 256 00:23:27,200 --> 00:23:32,110 And it clear the screen and print it and we'll see. 257 00:23:32,120 --> 00:23:34,130 I'm currently in the home directory. 258 00:23:35,390 --> 00:23:40,070 If we go to the main page, we can print the logical name. 259 00:23:40,070 --> 00:23:42,530 We can print version information. 260 00:23:44,240 --> 00:23:45,410 Just a basic man. 261 00:23:45,890 --> 00:23:51,980 And of course the US command, if you just, you else was nothing else, you know, just give you all 262 00:23:51,980 --> 00:24:00,320 the non system or non hidden directories if you do ls dash l you get a little bit of a different view. 263 00:24:00,800 --> 00:24:07,490 You actually can see the bits that are set for permission in Linux, so you can see if it's a D in front 264 00:24:07,490 --> 00:24:07,700 of it. 265 00:24:07,700 --> 00:24:08,630 It's a directory. 266 00:24:09,890 --> 00:24:16,130 If you do ls dash l a you get all the hidden directories and the hidden directories actually have a 267 00:24:16,130 --> 00:24:18,980 period in front of them and you'll see. 268 00:24:20,550 --> 00:24:23,910 They have different bits which we'll get into later when we get permissions. 269 00:24:23,910 --> 00:24:29,850 But less is useful because it helps you list the file structure and if you forget how to use it, you 270 00:24:29,850 --> 00:24:34,260 can do the main page and it stands for List Directory Contents. 271 00:24:37,780 --> 00:24:41,470 You can have it list by columns if you want to do list, see, 272 00:24:44,860 --> 00:24:47,500 so you can have it display in different modes. 273 00:24:51,520 --> 00:24:52,030 You can have it. 274 00:24:52,030 --> 00:24:54,160 Do you grouping directories together? 275 00:24:54,610 --> 00:24:56,560 You can format in certain ways. 276 00:24:57,430 --> 00:25:02,920 One of the different options you actually also have it print out the elements which can be useful if 277 00:25:02,920 --> 00:25:03,460 you're doing. 278 00:25:07,200 --> 00:25:08,670 Certain storage operations. 279 00:25:09,920 --> 00:25:12,590 All right, let's go and switch back over to the slide deck. 280 00:25:13,070 --> 00:25:15,750 And so that's Peter Beattie. 281 00:25:15,800 --> 00:25:22,910 Unless very important, Peter Beattie is actually environment variable which stores the path of the 282 00:25:22,910 --> 00:25:23,600 current directory. 283 00:25:23,600 --> 00:25:26,330 So let's go ahead and do this if we do. 284 00:25:29,200 --> 00:25:32,690 Echo dollar TWD. 285 00:25:34,210 --> 00:25:35,620 It will actually do the same thing. 286 00:25:41,790 --> 00:25:44,790 So let's talk about the CD command and the change directory command. 287 00:25:45,270 --> 00:25:48,540 This is one of the most important and widely used commands in Linux. 288 00:25:49,290 --> 00:25:51,180 Do you want to change to another folder? 289 00:25:52,290 --> 00:25:52,530 Sure. 290 00:25:52,530 --> 00:25:54,730 And they want to go to the downloads directory. 291 00:25:55,770 --> 00:26:00,690 You can type CD space downloads or CD space the full path of the directory. 292 00:26:02,650 --> 00:26:08,260 See is essentially in some ways the only way to check a log on headless servers. 293 00:26:08,950 --> 00:26:13,510 So for newbies, it's one of those initial commands that you'll get your hands dirty with, or it's 294 00:26:13,510 --> 00:26:17,800 very much similar to the CD command on Windows. 295 00:26:18,880 --> 00:26:25,870 We also have the M, R and R MDR or the make directory and remove directory commands. 296 00:26:26,170 --> 00:26:32,410 So if you want to create a folder and also remove folder, you can use these commands so you can create 297 00:26:32,410 --> 00:26:33,940 multiple directories at once. 298 00:26:36,370 --> 00:26:38,530 You can also set permissions for those directories. 299 00:26:38,920 --> 00:26:43,030 So it's important to know that when you're a user executing that command, you have to have the right 300 00:26:43,030 --> 00:26:49,450 permissions in the parent directory, or you also might get a permission denied error. 301 00:26:49,600 --> 00:26:51,370 So let's go back over to our Linux. 302 00:26:52,570 --> 00:26:53,200 Box. 303 00:26:54,870 --> 00:26:56,610 And we'll go ahead and make directory. 304 00:26:57,360 --> 00:26:58,440 Let's actually. 305 00:26:59,910 --> 00:27:03,270 We'll call it new underscore. 306 00:27:05,340 --> 00:27:06,030 Directory. 307 00:27:07,500 --> 00:27:11,160 Let's say make directory new underscore directory to. 308 00:27:12,440 --> 00:27:14,840 New Underscore Directory three. 309 00:27:17,440 --> 00:27:20,560 So we can make multiple directories and we do the LS command. 310 00:27:20,560 --> 00:27:23,020 We'll see that all the directories have been created. 311 00:27:23,440 --> 00:27:26,400 Now what if we want to remove the directory from D.R.? 312 00:27:26,770 --> 00:27:29,320 Let's say we want to remove directory number three. 313 00:27:30,880 --> 00:27:34,210 Now we can do tap completion to partially complete the command. 314 00:27:35,110 --> 00:27:40,390 And if we do the command again, notice that that new directory is actually removed. 315 00:27:43,010 --> 00:27:45,890 So make directory and remove directory are important. 316 00:27:46,610 --> 00:27:50,600 Let's look at the main pages so you can actually set arguments. 317 00:27:51,320 --> 00:27:53,150 You can set it to verbose mode. 318 00:27:53,150 --> 00:27:56,240 If you want a message, run it for each directory. 319 00:27:59,660 --> 00:28:05,960 You can also integrate with Linux, the security enhanced Linux, or you can just output the version 320 00:28:05,960 --> 00:28:06,650 information. 321 00:28:26,440 --> 00:28:29,800 So we'll create a new directory for. 322 00:28:31,770 --> 00:28:34,290 And it gave us kind of a running log of what's going on. 323 00:28:38,160 --> 00:28:40,030 Should be dashed like. 324 00:28:42,470 --> 00:28:43,050 There you go. 325 00:28:43,070 --> 00:28:49,040 So you can see that this software is also licensed under the GM GPL license. 326 00:28:50,410 --> 00:28:52,180 And it tells you a little bit about who wrote it. 327 00:28:54,160 --> 00:28:57,550 So that's CD and make directory in our movie directory. 328 00:28:57,940 --> 00:28:59,330 Now let's look at the arm command. 329 00:28:59,350 --> 00:29:01,000 If you want to delete files. 330 00:29:03,590 --> 00:29:05,180 You can delete individual files. 331 00:29:05,240 --> 00:29:06,230 Let's go ahead and. 332 00:29:08,640 --> 00:29:10,500 Look at the files we have here. 333 00:29:11,310 --> 00:29:13,530 Let's go ahead and make a new text file. 334 00:29:18,810 --> 00:29:21,570 Say, This is my new text. 335 00:29:23,020 --> 00:29:37,780 File and I'm super excited to be learning Kali Linux pen testing, distribution and escape. 336 00:29:38,020 --> 00:29:38,890 I'm going to write with. 337 00:29:40,520 --> 00:29:43,880 Clear the screen and we're going to see that we now have a new text file. 338 00:29:44,420 --> 00:29:45,170 We have new text. 339 00:29:45,320 --> 00:29:49,070 Text, and we can actually just remove that individual file. 340 00:29:53,830 --> 00:29:55,660 And we see that the file is now gone. 341 00:29:56,680 --> 00:29:58,780 If you want to remove dash are. 342 00:30:02,310 --> 00:30:04,110 And we want to remove that new directory. 343 00:30:07,480 --> 00:30:09,670 Notice that the new directory is now gone. 344 00:30:09,910 --> 00:30:12,820 Anything that was under it will also get removed. 345 00:30:12,820 --> 00:30:14,590 So be careful with it or remove command. 346 00:30:15,040 --> 00:30:21,460 If you do remove the r f, you can potentially remove recursively. 347 00:30:24,520 --> 00:30:31,210 So our will remove references to objects from the file system where those objects might have had references. 348 00:30:31,660 --> 00:30:38,140 So if you have a file with two different names by default as it is not removed directories generally 349 00:30:38,140 --> 00:30:39,180 it works silently. 350 00:30:39,190 --> 00:30:43,630 So you want to be really careful so you don't delete things as you want to. 351 00:30:45,220 --> 00:30:45,940 Maintain. 352 00:30:46,360 --> 00:30:48,370 So let's talk about the touch command. 353 00:30:49,060 --> 00:30:54,190 So the touch command is used to create a file that can be used to create almost anything from an empty 354 00:30:54,190 --> 00:30:58,180 text file to even a zip file standard Linux Command. 355 00:30:58,180 --> 00:30:59,170 Which is pretty much. 356 00:31:00,230 --> 00:31:01,970 Available with every distribution. 357 00:31:03,220 --> 00:31:06,580 So with the touch command, let's go and look at the man page. 358 00:31:07,750 --> 00:31:10,630 So you can change file timestamps. 359 00:31:11,140 --> 00:31:15,850 So if you do use the touch command, especially if you get into forensics, you want to be careful with 360 00:31:15,850 --> 00:31:19,120 it because you will change the file. 361 00:31:24,460 --> 00:31:31,330 So if we want to touch a new file, we now have a new file. 362 00:31:34,450 --> 00:31:39,940 And so from that we can manually run in the home directory, we can check this with the print working 363 00:31:39,940 --> 00:31:45,700 directory and if we check the last command, we get more details about existing files. 364 00:31:47,350 --> 00:31:49,930 So that's the arm command and the touch command. 365 00:31:52,180 --> 00:31:53,440 So what about the man? 366 00:31:53,470 --> 00:31:55,810 The Help page using the man page for a while. 367 00:31:56,800 --> 00:32:05,710 So at the man page, if you forget how to use a command, you can type man and then the name of the 368 00:32:05,710 --> 00:32:07,510 command like code in this case. 369 00:32:07,940 --> 00:32:11,350 So sometimes there won't be a manual page for that. 370 00:32:14,820 --> 00:32:17,640 But nine times out of ten there will be so. 371 00:32:19,010 --> 00:32:21,260 Main page is short for manual page. 372 00:32:21,650 --> 00:32:25,010 It's just a form of software documentation on UNIX and limited software. 373 00:32:27,980 --> 00:32:35,510 And so things that are covered include computer programs, library system calls, sometimes standards, 374 00:32:35,510 --> 00:32:37,550 conventions, even abstract concepts. 375 00:32:37,970 --> 00:32:41,540 User might invoke command page by issue, issuing the man command. 376 00:32:42,660 --> 00:32:47,850 A default man typically uses a terminal pager programmed more or less to display the output. 377 00:32:48,860 --> 00:32:52,190 So you have to hit the spacebar to return more options. 378 00:32:52,190 --> 00:32:59,150 So because man pages are distributed with the software, they document their more favorable means of 379 00:32:59,150 --> 00:33:04,670 documenting software compared to other out-of-band management techniques like web pages. 380 00:33:05,570 --> 00:33:11,690 There's higher likelihood for a matched with the actual features of the software to the documented ones. 381 00:33:12,320 --> 00:33:18,740 It's for this reason that man pages are often referred to as online or an online form a software documentation. 382 00:33:19,310 --> 00:33:22,670 Even though the man command does not require internet access. 383 00:33:23,800 --> 00:33:26,950 Going back to the days when out of band manuals were the norm. 384 00:33:30,510 --> 00:33:33,000 So let's talk about the copy command. 385 00:33:37,560 --> 00:33:38,790 So the copy command. 386 00:33:45,760 --> 00:33:48,790 Okay to copy certain files. 387 00:33:51,990 --> 00:33:53,310 So it takes two arguments. 388 00:33:53,320 --> 00:33:55,500 The first is the location of the file to be copied. 389 00:33:56,010 --> 00:33:58,200 The second part is where you want to copy in that. 390 00:34:02,300 --> 00:34:07,730 All right, so I've done the copy command and we're going to work on the next set of command. 391 00:34:07,740 --> 00:34:10,130 So actually let's do a demo of the copy command first. 392 00:34:10,580 --> 00:34:11,780 We'll copy the. 393 00:34:13,230 --> 00:34:15,660 New text file we created to a new directory. 394 00:34:17,150 --> 00:34:19,700 So let's go ahead and do that or close the browser. 395 00:34:20,500 --> 00:34:23,150 You don't get rid of these notifications. 396 00:34:29,370 --> 00:34:31,900 So we have the new file, that text. 397 00:34:34,090 --> 00:34:35,230 And we're gonna give it the path. 398 00:34:35,230 --> 00:34:36,580 We're going to it to home. 399 00:34:37,260 --> 00:34:40,090 Kelly slash documents. 400 00:34:41,140 --> 00:34:42,190 And there we go. 401 00:34:42,310 --> 00:34:45,880 And change to the documents directory. 402 00:34:52,210 --> 00:34:53,860 And our new file is there. 403 00:34:55,150 --> 00:34:55,820 So magical. 404 00:34:55,820 --> 00:34:59,830 Unless we can copy files from place to place. 405 00:35:01,550 --> 00:35:03,050 Without too much difficulty. 406 00:35:04,580 --> 00:35:07,790 So let's go to the next set of commands. 407 00:35:10,160 --> 00:35:14,420 So copy also has some different syntax. 408 00:35:15,790 --> 00:35:20,140 And usually do the copy command at the dollar sign prompts regular user. 409 00:35:20,980 --> 00:35:22,540 Let's look at the move command. 410 00:35:22,990 --> 00:35:26,800 So the move command, we can move files other places. 411 00:35:28,860 --> 00:35:31,590 Or he can also use the MOVE Command to rename a file. 412 00:35:32,310 --> 00:35:34,890 So let's say we want to rename the file. 413 00:35:37,120 --> 00:35:38,490 You filed the text. 414 00:35:46,460 --> 00:35:46,960 Particularly. 415 00:35:49,700 --> 00:35:50,780 I have it backwards. 416 00:35:51,800 --> 00:35:56,390 So we're going to the first part is the follow on to remain and the second part is the what you want 417 00:35:56,390 --> 00:35:57,350 to rename it to. 418 00:35:58,250 --> 00:35:59,600 And we're going to. 419 00:36:01,510 --> 00:36:03,880 Now we have a new file that's been renamed. 420 00:36:04,420 --> 00:36:07,660 So that's one use of the MOVE command. 421 00:36:08,170 --> 00:36:12,070 We can also use the MOVE Command to rename the directory. 422 00:36:13,610 --> 00:36:15,380 So let's go and make a new directory. 423 00:36:22,120 --> 00:36:22,660 So there's a new. 424 00:36:23,260 --> 00:36:25,510 We're going to move the new directory. 425 00:36:32,660 --> 00:36:34,310 Make it new directory too. 426 00:36:36,410 --> 00:36:38,270 So we do the command again. 427 00:36:38,720 --> 00:36:44,870 We now have the new directory, so we can also use it to move a directory from one place to the other. 428 00:36:45,500 --> 00:36:48,980 Let's move the source directory. 429 00:36:54,020 --> 00:36:56,090 Is a new place for moving to Etsy. 430 00:37:03,730 --> 00:37:04,240 Let's see. 431 00:37:06,780 --> 00:37:08,670 When I moved to Etsy because. 432 00:37:16,390 --> 00:37:16,860 You know. 433 00:37:16,890 --> 00:37:19,720 Oh, it's called mediocrity. 434 00:37:19,730 --> 00:37:20,440 That's my fault. 435 00:37:29,980 --> 00:37:36,520 And if you go to the ABC directory, we'll see the new directory two is in fact there. 436 00:37:40,430 --> 00:37:41,270 And there we go. 437 00:37:42,260 --> 00:37:48,140 So we saw how the move came in and can be used to rename a file on all some directories. 438 00:37:48,570 --> 00:37:49,790 We have a locate command. 439 00:37:49,790 --> 00:37:55,850 Locate command is used to locate a file in Linux system, just like the search, command and Windows. 440 00:37:58,100 --> 00:38:01,490 So this actually is useful when you don't know where the file actually is. 441 00:38:02,650 --> 00:38:04,330 So let's go ahead and clear the screen. 442 00:38:06,730 --> 00:38:12,520 So if I want to locate my new directory or new file. 443 00:38:22,090 --> 00:38:23,060 What did I actually name it? 444 00:38:23,080 --> 00:38:23,860 I can't remember. 445 00:38:27,960 --> 00:38:28,680 Let's see. 446 00:38:32,620 --> 00:38:34,290 So we call it new father text. 447 00:38:34,370 --> 00:38:35,710 Let's go ahead and clear out. 448 00:38:37,210 --> 00:38:39,220 It's going to change back to the ETSI directory. 449 00:38:43,830 --> 00:38:47,310 It doesn't know where it is because I don't think it actually has the. 450 00:38:49,180 --> 00:38:50,620 So yeah so location. 451 00:38:51,760 --> 00:38:57,910 It'll look for some different things you can do regular expressions to do a lot of different commands 452 00:38:57,910 --> 00:38:58,570 will locate. 453 00:39:02,740 --> 00:39:05,320 And most distros will come with the. 454 00:39:06,230 --> 00:39:07,520 Proper syntax. 455 00:39:11,570 --> 00:39:15,260 So now we have the Echo and the cat command. 456 00:39:15,270 --> 00:39:22,550 So if we want to actually echo something to the screen, we can even send it out to a file. 457 00:39:23,180 --> 00:39:23,660 So. 458 00:39:25,070 --> 00:39:25,900 This case. 459 00:39:28,020 --> 00:39:29,190 We're going to echo. 460 00:39:31,150 --> 00:39:31,800 Hello. 461 00:39:33,370 --> 00:39:36,540 My name is Chris. 462 00:39:38,610 --> 00:39:43,110 When a cat that out to do that text file. 463 00:39:46,310 --> 00:39:48,970 We'll see the new DOT text file appears. 464 00:39:50,260 --> 00:39:51,430 Because the directory ran. 465 00:39:54,200 --> 00:39:54,950 And there we go. 466 00:40:04,630 --> 00:40:05,320 And there you go. 467 00:40:05,320 --> 00:40:08,770 There's the file, the cat command we've been using quite a while. 468 00:40:09,040 --> 00:40:13,330 Cat is short for Concatenate, and it's one of the most frequently used commands. 469 00:40:13,330 --> 00:40:20,530 And Linux allows us to create files, view the contents of the file or redirect output, so on and so 470 00:40:20,530 --> 00:40:20,800 forth. 471 00:40:20,800 --> 00:40:26,650 So if we look at the cat command, we can see we can print on standard output. 472 00:40:27,220 --> 00:40:29,050 We can cat in eight files. 473 00:40:29,350 --> 00:40:29,980 We can. 474 00:40:31,790 --> 00:40:36,530 Show tabs and show non-accredited characters many different things. 475 00:40:42,130 --> 00:40:45,590 But then we have different text editors. 476 00:40:45,610 --> 00:40:52,120 If you're one thing that you're going to do in Linux, you're going to do creating editing text files 477 00:40:52,720 --> 00:40:54,480 among the common tax reform. 478 00:40:54,820 --> 00:41:01,900 Whether you're on Linux or Unix, if you're programming, developing Web pages, sending email, writing 479 00:41:01,900 --> 00:41:06,400 letters, configuring your environment, you're going to eventually work. 480 00:41:07,430 --> 00:41:08,570 With text editors. 481 00:41:11,370 --> 00:41:13,020 It's a very important skill to have. 482 00:41:15,630 --> 00:41:17,700 Unchanged directory to the home directory. 483 00:41:19,180 --> 00:41:26,590 One of the most common text editors is VII, or which is now called them or VI approved. 484 00:41:27,600 --> 00:41:29,370 And it has two different options. 485 00:41:32,920 --> 00:41:35,590 So then there's backwards compatible VI. 486 00:41:36,130 --> 00:41:38,720 There's also g m, there's g view. 487 00:41:38,720 --> 00:41:40,030 There's all kinds of different things. 488 00:41:41,330 --> 00:41:47,660 So there was a very powerful text that you can use, but it does have a kind of a steep learning curve. 489 00:41:48,870 --> 00:41:50,520 Lots and lots of different commands. 490 00:41:50,730 --> 00:41:54,660 There's even a gooey version of them. 491 00:41:58,100 --> 00:42:03,670 But it may not always be installed on certain Linux distributions. 492 00:42:08,500 --> 00:42:14,740 So depending on the repository you're in, you may not have access to it, but I will always generally 493 00:42:14,740 --> 00:42:17,710 read the default to them. 494 00:42:21,700 --> 00:42:26,800 So there's also Nano, which is another common text editor. 495 00:42:30,320 --> 00:42:33,530 The Nano is another editor inspired by Pico. 496 00:42:34,070 --> 00:42:37,540 So it doesn't always wrap blind. 497 00:42:37,550 --> 00:42:43,280 So if you want to have your text editor look like some of the other text editors, you can do that. 498 00:42:45,110 --> 00:42:46,430 But it works very similar. 499 00:42:46,520 --> 00:42:47,720 Let's go ahead and then I'll. 500 00:42:49,430 --> 00:42:52,180 My new text text. 501 00:42:52,240 --> 00:43:01,040 So we created a new text file and say, this is the new text file and it's a bit easier to use. 502 00:43:02,330 --> 00:43:03,050 And then. 503 00:43:04,700 --> 00:43:05,350 We're done. 504 00:43:05,350 --> 00:43:08,100 We want to write it out to a file so they control. 505 00:43:08,100 --> 00:43:10,060 Oh, we'll give it a name. 506 00:43:12,420 --> 00:43:15,260 We know actually what direction we wanted to go to. 507 00:43:17,640 --> 00:43:20,700 They wanted to the calendar directory one to downloads. 508 00:43:22,900 --> 00:43:24,520 And many different options. 509 00:43:26,350 --> 00:43:27,250 You can do this with. 510 00:43:34,660 --> 00:43:37,600 If you need help, you can actually display the help. 511 00:43:41,640 --> 00:43:44,340 So a lot of different options with Nano and them. 512 00:43:45,090 --> 00:43:47,940 There's even a one called Jab. 513 00:44:00,180 --> 00:44:01,380 So we can manage an. 514 00:44:06,860 --> 00:44:08,930 So Jeb may not always be installed. 515 00:44:10,990 --> 00:44:13,450 And Sonam's text editors get deprecated. 516 00:44:14,350 --> 00:44:18,370 Let us be aware, not just because it works on one distro may not work on others. 517 00:44:20,840 --> 00:44:22,490 So this is definitely. 518 00:44:24,140 --> 00:44:26,510 Simpler than now as far as the format. 519 00:44:27,260 --> 00:44:28,820 Of course, then we have pseudo. 520 00:44:29,360 --> 00:44:30,710 Pseudo is an important command. 521 00:44:30,710 --> 00:44:35,450 It's widely used and when it stands for super user do. 522 00:44:39,630 --> 00:44:43,710 So if you want to run a command of villages, you can use sudo command. 523 00:44:44,760 --> 00:44:51,330 So if you want a pseudo to root on a pseudo the password, change the password, update passwords you 524 00:44:51,330 --> 00:44:52,380 want to switch users. 525 00:44:52,380 --> 00:44:53,820 Many cases will use pseudo. 526 00:44:54,540 --> 00:45:00,750 There's also the union command, which is designed to show information about the system. 527 00:45:00,750 --> 00:45:02,730 Your Linux distros running. 528 00:45:05,230 --> 00:45:06,430 So let's go ahead and. 529 00:45:07,830 --> 00:45:15,030 Exit out on a pseudo S2 or type in the past for calendars now route. 530 00:45:16,050 --> 00:45:19,650 An exit back out to the man pseudo. 531 00:45:21,170 --> 00:45:22,590 And it's going to give us some options. 532 00:45:22,590 --> 00:45:29,570 So basically sudo allows us to run commands as another user and the policies and security policies will 533 00:45:29,570 --> 00:45:31,750 determine what permissions you have. 534 00:45:37,180 --> 00:45:39,100 So we can do lots of different things with pseudo. 535 00:45:39,700 --> 00:45:42,940 If you're going to edit the SC pseudo file. 536 00:45:45,050 --> 00:45:47,420 You want to use the visceral command. 537 00:45:48,930 --> 00:45:49,830 If it's there. 538 00:45:52,840 --> 00:45:59,830 Some distros as they are newer, they may not have the visual command. 539 00:46:00,370 --> 00:46:06,010 So just be aware that the process may be different depending on the discharge over the next that you 540 00:46:06,010 --> 00:46:06,490 have. 541 00:46:13,070 --> 00:46:14,450 So you name Carmen. 542 00:46:14,830 --> 00:46:18,710 So we want to show information about the system that's upcoming on the terminal. 543 00:46:24,180 --> 00:46:33,000 So we're running Linux, Kali Linux 5.5, AMD 64 number one and it says what builds for running? 544 00:46:39,580 --> 00:46:42,850 So then we have the apt get package manager. 545 00:46:42,850 --> 00:46:46,060 So an ending on what we're running in. 546 00:46:46,060 --> 00:46:48,640 We may not have access to full. 547 00:46:50,530 --> 00:46:52,840 The same full list of applications. 548 00:46:57,730 --> 00:46:59,890 So we want to install something we don't have. 549 00:47:00,370 --> 00:47:02,680 We're going to do a pseudo app, get install. 550 00:47:05,730 --> 00:47:07,740 My case, I'm going to install Emacs. 551 00:47:12,520 --> 00:47:13,780 Let's try to get it. 552 00:47:25,870 --> 00:47:29,200 So they've taken it out of the classroom, which is does have the time. 553 00:47:29,890 --> 00:47:35,680 So just be aware that just because APT works now, it may not work on certain commands later. 554 00:47:35,680 --> 00:47:42,460 So we want to get updates and you want to go out and grab the latest and greatest updates from the repositories. 555 00:47:42,910 --> 00:47:49,180 This is a good practice too, because you might have to update your OS to make sure you have the latest 556 00:47:49,180 --> 00:47:50,070 and greatest tools. 557 00:47:52,900 --> 00:48:02,470 He also can do an apt get upgrade which will upgrade to the latest and greatest version and that will 558 00:48:02,470 --> 00:48:03,400 take some time. 559 00:48:03,400 --> 00:48:05,200 So he knows it goes out to Cowley. 560 00:48:05,890 --> 00:48:12,940 Download the Cowley Rolling Repository and it's going to go update all the packages that are available. 561 00:48:14,110 --> 00:48:14,740 I'm calling. 562 00:48:15,100 --> 00:48:19,330 Once you do an update, you may want to do an app to get auto remove. 563 00:48:21,400 --> 00:48:24,130 Or an apt get clean if you have a failed install. 564 00:48:25,790 --> 00:48:29,090 Let's go ahead and go back to the slide deck. 565 00:48:29,090 --> 00:48:32,180 So with apt get you have to do pseudo. 566 00:48:32,630 --> 00:48:37,730 Otherwise it may tell you are you root and it may not work. 567 00:48:38,390 --> 00:48:41,990 So then we have the change mod command or the C-H Mod Command. 568 00:48:42,770 --> 00:48:51,890 C-H Mod is essentially the way we make files executable in Linux, and you can either do it from octal 569 00:48:51,890 --> 00:48:57,590 notation or you can do it from a setting different bits on a file. 570 00:48:58,850 --> 00:49:03,920 So if I want to change stands for actually change mode. 571 00:49:04,670 --> 00:49:04,970 But. 572 00:49:06,320 --> 00:49:11,330 A numbers and letters will distinguish between who is actually as what permissions. 573 00:49:14,380 --> 00:49:17,380 So let's go ahead and look at cloud permissions and Linux. 574 00:49:17,860 --> 00:49:25,120 Once it's done updating, we'll go in no company tab just because save time. 575 00:49:29,880 --> 00:49:31,410 Well, let's stop missions. 576 00:49:31,890 --> 00:49:33,930 And what if I want to change? 577 00:49:33,990 --> 00:49:40,020 So right now, the new father text has a certain set of bits. 578 00:49:40,050 --> 00:49:41,250 These are the bits right here. 579 00:49:42,090 --> 00:49:46,390 So it has user bits, group and has owner bits. 580 00:49:46,390 --> 00:49:48,610 So let's go ahead and do a C-H mod. 581 00:49:49,170 --> 00:49:53,760 I'll make everything rideable and everything executable. 582 00:49:55,370 --> 00:49:59,060 So notice I'm not pseudocode so I will not have permission to do that. 583 00:50:00,880 --> 00:50:03,430 If i sudo to root and i have permission. 584 00:50:07,890 --> 00:50:14,420 And that's what I do, that the file color syntax will generally change. 585 00:50:14,460 --> 00:50:19,340 In this case it doesn't, but some by extension, will have a red color set or executable. 586 00:50:19,350 --> 00:50:20,550 So this is change months. 587 00:50:20,550 --> 00:50:21,750 Seven, seven, seven. 588 00:50:22,290 --> 00:50:23,020 What does that mean? 589 00:50:23,060 --> 00:50:25,830 Well, that means I have set, read, write and execute. 590 00:50:27,400 --> 00:50:28,900 So those are the best you can change. 591 00:50:28,900 --> 00:50:31,140 If I want to change my mind. 592 00:50:31,140 --> 00:50:31,310 Yes. 593 00:50:31,330 --> 00:50:32,020 Execute. 594 00:50:34,020 --> 00:50:35,340 That particular file. 595 00:50:37,600 --> 00:50:42,040 I could do that and I've taken away executed from all the different groups. 596 00:50:43,930 --> 00:50:45,220 That's important to understand. 597 00:50:45,820 --> 00:50:46,810 C.H. Montgomery. 598 00:50:49,590 --> 00:50:51,970 Then we have the hostname commands. 599 00:50:51,990 --> 00:50:55,080 We want to change our view of the hostname and IP address. 600 00:50:57,790 --> 00:50:58,870 This is actually Kelly. 601 00:50:59,620 --> 00:51:01,130 Let's look at the man page. 602 00:51:02,470 --> 00:51:04,600 So this will show or set the hostname. 603 00:51:05,380 --> 00:51:06,430 This will also. 604 00:51:09,010 --> 00:51:10,750 Show or set domain names. 605 00:51:16,050 --> 00:51:19,400 So we have several different options here from within the. 606 00:51:22,180 --> 00:51:26,860 This menu, so might send it a fully qualified domain name. 607 00:51:30,130 --> 00:51:31,680 It said it is an IP address. 608 00:51:32,640 --> 00:51:33,870 Lots of different options. 609 00:51:35,400 --> 00:51:37,480 I want to change the name from the system. 610 00:51:44,490 --> 00:51:46,830 I've now changed the show's name to Hatbox. 611 00:51:47,700 --> 00:51:49,230 All I had to do was change the name. 612 00:51:49,800 --> 00:51:50,850 And there we go. 613 00:51:55,570 --> 00:52:01,840 So then of course we have the variable pane command and commands can be useful because this allows us 614 00:52:01,840 --> 00:52:03,520 to check our connection to the server. 615 00:52:03,970 --> 00:52:07,300 We can ping much like we can in our windows system. 616 00:52:10,590 --> 00:52:15,120 I can thank Google and I will continue paying until I stop. 617 00:52:15,840 --> 00:52:22,110 So if I want to just paying a little bit differently, I can use the main page and see what other options 618 00:52:22,110 --> 00:52:26,610 there are I can take with IP version or IP version six. 619 00:52:26,610 --> 00:52:28,050 I could even have it be an audible. 620 00:52:29,070 --> 00:52:34,830 I can have it print the timestamps if I want to ping flood something. 621 00:52:42,900 --> 00:52:49,500 It's going to flood Google things and Google most likely come back and not allow it to go. 622 00:52:49,860 --> 00:52:52,020 So I want you to ping. 623 00:52:53,550 --> 00:52:55,220 What IP versus six? 624 00:52:56,710 --> 00:52:59,110 I can do a pinged at 6:00 on. 625 00:53:04,900 --> 00:53:08,840 It says the network is unreachable because they don't have IP six enabled. 626 00:53:16,460 --> 00:53:23,060 So I can actually tell it the number of pings or another number of hops to go that are having it go 627 00:53:23,060 --> 00:53:23,990 continuously. 628 00:53:24,590 --> 00:53:28,850 I could change the time to live with just how many hops it will go before it is dropped. 629 00:53:29,600 --> 00:53:33,320 So playing is an important command for Linux. 630 00:53:35,360 --> 00:53:36,500 Other useful commands. 631 00:53:36,500 --> 00:53:40,520 We have the find command which will find files or directories. 632 00:53:47,460 --> 00:53:49,920 I want to find Stark's text file. 633 00:53:51,370 --> 00:53:53,980 So I found my new file by text. 634 00:53:54,640 --> 00:53:56,920 And then I want to see how much memory is free. 635 00:53:59,140 --> 00:54:05,890 So the free command will display not only the amount of free memory, but also the use memory and swap 636 00:54:05,890 --> 00:54:06,820 space as well. 637 00:54:12,560 --> 00:54:14,270 And we have the deaf command. 638 00:54:16,370 --> 00:54:17,520 Do you have command? 639 00:54:17,670 --> 00:54:18,510 We'll show you. 640 00:54:20,030 --> 00:54:22,400 How much disk space is free. 641 00:54:23,480 --> 00:54:26,240 We have a lot of space left on your hard drive. 642 00:54:26,280 --> 00:54:27,680 Or if you're running out. 643 00:54:31,020 --> 00:54:34,140 You can also have it print out the AI nodes. 644 00:54:39,410 --> 00:54:44,210 You can have a print out the different partitions that are there and how much space is taken up. 645 00:54:44,420 --> 00:54:47,840 And see, I have 13% used on the partition. 646 00:54:49,140 --> 00:54:50,490 64 gigabytes. 647 00:54:56,180 --> 00:54:59,390 So let's go to the ID man. 648 00:54:59,630 --> 00:55:05,690 So the user we've already talked about the identity of the user with the groups they belong to. 649 00:55:07,400 --> 00:55:11,750 So my current user is part of the group, part of the CD-ROM group, student group. 650 00:55:12,380 --> 00:55:14,420 Many other different groups right away. 651 00:55:16,920 --> 00:55:20,340 It's gotten cashed out of the password file. 652 00:55:21,560 --> 00:55:22,910 So let's do. 653 00:55:25,760 --> 00:55:27,140 Switch to user one. 654 00:55:32,560 --> 00:55:34,810 And I can't when I set the password to. 655 00:55:51,850 --> 00:55:53,920 I have to go back and change the password because I can't. 656 00:55:54,100 --> 00:56:03,970 It was basically you'll be able to see the identity of the user, the message which can review kernel 657 00:56:03,970 --> 00:56:04,690 logs. 658 00:56:05,710 --> 00:56:07,990 But you had to be sudo to do it. 659 00:56:09,300 --> 00:56:11,580 You can see all the messages coming back from the colonel. 660 00:56:12,240 --> 00:56:19,410 You can also look at the different hardware on the Linux system with the PCI command, which is also 661 00:56:19,410 --> 00:56:22,230 good for other versions of Linux too. 662 00:56:23,040 --> 00:56:29,340 So I don't see what type of processor or whatever sound card of a video card, so on and so forth. 663 00:56:29,880 --> 00:56:32,010 You can also list all the USB devices. 664 00:56:32,550 --> 00:56:38,370 So this is a virtual rehab on your physical systems running Linux, you may have some other options. 665 00:56:38,880 --> 00:56:42,810 Then you have the less GCM CIA. 666 00:56:45,450 --> 00:56:46,920 So this case I've found. 667 00:56:47,520 --> 00:56:54,540 So they've taken it out because it's PKM say PKM CIA cards are not as common. 668 00:57:07,750 --> 00:57:12,370 So maybe another process using Arial. 669 00:57:21,600 --> 00:57:21,750 Yeah. 670 00:57:22,120 --> 00:57:23,700 So we got a locked file that's going here. 671 00:57:23,710 --> 00:57:24,340 That's okay. 672 00:57:25,070 --> 00:57:28,930 But PCMCIA cards, there are some other useful commands 673 00:57:31,540 --> 00:57:33,400 such as process management. 674 00:57:34,120 --> 00:57:36,430 So on Linux you have the PS command. 675 00:57:39,190 --> 00:57:44,800 Yes shows all the processes currently running in the A which is a more detailed version. 676 00:57:45,910 --> 00:57:47,560 You can kill processes. 677 00:57:48,930 --> 00:57:50,460 So let's say I want to kill. 678 00:57:52,220 --> 00:57:53,630 P.S. a U.S.. 679 00:58:02,400 --> 00:58:04,470 So I usually have to have the process name. 680 00:58:06,140 --> 00:58:08,540 And if you maybe you want to send the process to the background. 681 00:58:12,260 --> 00:58:13,790 Somebody is Wireshark. 682 00:58:17,340 --> 00:58:17,940 There we go. 683 00:58:18,060 --> 00:58:18,480 So. 684 00:58:19,740 --> 00:58:20,880 Gentlemen, this will work. 685 00:58:20,880 --> 00:58:27,390 But because Caligula makes in the new version has changed things, it may work a little bit differently. 686 00:58:27,990 --> 00:58:29,140 We have the effigy. 687 00:58:31,500 --> 00:58:34,710 So you take the background job to the foreground. 688 00:58:35,910 --> 00:58:38,160 And show background processes. 689 00:58:41,100 --> 00:58:44,040 So in summary, we talked about the one file system. 690 00:58:44,040 --> 00:58:46,260 We talked about Linux file system folders. 691 00:58:46,710 --> 00:58:48,270 We talked about the command line. 692 00:58:48,660 --> 00:58:50,450 We talked about command line basics. 693 00:58:50,460 --> 00:58:56,700 We looked at some different basic Lennox commands and we looked at other useful Linux commands that 694 00:58:56,700 --> 00:58:57,240 are there. 695 00:58:57,840 --> 00:59:01,320 So I hope you enjoyed this particular module. 696 00:59:01,770 --> 00:59:06,870 We covered a lot of material, but there's a lot of useful commands that you will find that will help 697 00:59:06,870 --> 00:59:11,880 you in using Kelly Linux as well as other Linux distributions. 698 00:59:12,360 --> 00:59:15,030 So we'll see you in the next module.