 I've done so many videos in the past five years about the Linux terminal, the command line, the various shills available on Linux, the various show utilities available on Linux. I've got some playlists, you could go check out if you want some more in-depth coverage on the individual show utilities, but today I'm going to give you a whirlwind tour. We're going to learn the Linux terminal in 30 minutes. So I've opened up a terminal, and when you open a Linux terminal, it's going to always open in your user's home directory at first. You can see the tilde character here. The tilde character is an alias signifying we're in my user's home directory. I can verify this with the PWD command for print working directory. By hit enter, you can see I'm in slash home slash DT. The tilde character is simply an alias for slash home slash DTDT is the name of my user. If I want to see the contents of this directory, I can use the list command, which is the ls command, and it lists all files and directories in this current directory that we're in my home directory. Well, it doesn't list them all. It only lists the ones that are not hidden. If you actually want to list all the files and directories, including the hidden ones, the ones that begin with a period or a dot, do ls dash a. When you give it the a flag, now you get a list, including all of the dot files. That's the hidden files, the ones that begin with a dot. If you want a long form listing, you could do dash l. And if you want a long form listing, including all the hidden files, you could do dash la. Let me hit control l to clear the screen. Control l is a key binding. It's just an alias for the clear command, which works as well. The two most common commands that you're going to enter in a terminal are the ls command, which we've already seen, and the cd command. So if I wanted to change into, I don't know, do I have a test directory here? No, let's make one. Let's make dear tests. So make directory, and I'll call this new directory test. Now let's change over to the test directory. So cd change directory to test. Let me do a ls. It's an empty directory. If I cd back into home and do an ls, there's the contents of my home directory. And that's mostly what you do in the terminal. That's a large part of what you're doing is you're moving around the directory structure. You're doing a lot of cd-ing, and then you're doing a ls to see what's in the new directory that you've gone to. Now, other than doing cd and then, you know, the name of some directory, like, you know, I could go to my downloads directory. I could also do cd and give it these aliases here. cd-dash will take me to the last directory I was just in. If I up arrow to get that last command and do cd-. Again, it takes me back to downloads and cd-. Now it takes me back to home. You see how that works? I could also do cd-period-period-period is an alias for the parent directory, meaning go up one directory. Right now I'm in slash-home-slash-dt. If I cd-.dot, it will take me into simply slash-home. If I do cd-dash, it takes me back to home. Or I could have done cd-tilde-character, which, again, is an alias for slash-home-slash-dt. That would also take me home. Or cd- without any argument always takes you home. If you want to learn more about a command, for example, the cd command, you could read the man page, the manual, right? So man space, name of command, cd, for example. And you could read the manual for the cd command. There's not much to it. The cd command is pretty straightforward Q to quit out of the man page. Also, most of your commands in Linux will have a dash-dash help flag. So two dashes followed by the word help will give you a quick overview of the flags and options that are available for that particular command. One of the most common things you'll do in a terminal is you'll want to read a file. And you can open the file with a text editor. For example, if I just want to read what is in the contents of my dot-bash-rc file, you know, I could read it with nano. Let me quit out of that. I don't want to save. But a lot of times you're not wanting to make any edits. You just want to read a file. Well, you can use the cat command. So I could cat my dot-bash-rc, and it actually just prints it out here as output in the terminal. That's a very large file, so I would actually have to scroll back to actually read some of this. But what I could do is instead of cat, I could use the less command so I could less my bash-rc. And it starts at the top, and then I just hit the spacebar to go down each line and read it. When I'm done, hit Q to get out of the less. So let me cd into this test directory that I've created. If I do it ls, there's nothing in it. So let's create a file. How can you create a file? Well, if you just want to create a file without doing any kind of editing, you just want to create a file just to work with maybe at a later date, you can use the touch command. So I could touch file 1.txt, for example. By doing ls now, you can see there is one file in this directory called file 01.txt. Now if you want to edit it, you could nano file 1.txt. You want to use nano as your editor, but you could also use vim. vim is typically on the system as well on most Linux operating systems. And if you open that in vim, you can see there's nothing here. It's an empty document because we haven't added anything to it, but you could edit something and then eventually colon wq for write and quit to get out of vim. Let's talk about copying files, moving files, and removing files. So to copy a file, cp is the copy command. So I could copy file 01.txt to a new location. And I'll copy it over to file02.txt. And now if I do an ls, you can see now I have two different files, file 1 and file 2. Now to move a file, you use mv for the move command. I'm going to move file 2 over to file03.txt. And now when I do an ls, I'm going to have file 1 and I'm going to have file 3 because file 2, I moved it. I essentially renamed it is what moving will do. Of course, I was copying and moving within the directory I'm in, but I could send these to anywhere. I could move file03, for example, over to my home directory. So let's do the tilde alias for slash home slash dt. I'll move it to my downloads directory. Now when I ls, only file 1 is in this test directory because file 3 is now in my downloads directory. To remove a file, rm is the remove command. And now I'll remove file 1 and there you go by doing ls. Once again, we're at empty directory. Now let me do the makedir command again. I'm going to make a subdirectory here. I'm going to call it test2 by ls. You can see test2 is within the test directory that we're currently in. I'm going to cd over into test2. And then what I'm going to do is I'm going to touch file 1, file 2, file 3, file 4, file 5. By doing ls, you can see we have, actually I mistyped. I added a space accidentally here. So actually I created file and then another file simply called 4. So actually I have six files here. Now let me cd dot dot, so back to the parent directory, right? So ls, there is the test2 directory. How do you remove the test2 directory? Well, you can't actually use the remove command. The remove command is really for files. To remove a directory, you use rmdir remove directory. But that only works if it's an empty directory because the shell wants you to go into test2 and individually remove all the files to make an empty directory and then remove the empty directory with rmdir. That's tedious. There is a command that will force it to just delete the test2 directory and all of its contents. And that is using the rm-r flag. That's recursive, meaning I'm going to delete whatever you give me plus everything inside that directory. All the subdirectories, all the files in the subdirectories, yada, yada, yada. This is a dangerous command, rm-r, because if you did this in the wrong directory, for example, your user's home directory, you would actually delete your entire home directory, all of your user data. So be careful with this command. But if I run that command, do an ls, you can see the test2 subdirectory and all the files that were in it are now gone. By the way, the recursive flag, that dash r flag, that also works with copy. When you're copying a directory and subdirectories, you'll need the recursive flag with the copy command as well. One of the commands that you'll see me often enter on camera is the whereis command. If I'm taking a look at a Linux distribution and I don't know if a particular program is installed, I'll do whereis, all one word, space, name of program, right? So for example, is Firefox installed on my system? I don't know. Let's do a whereis Firefox. And if it's installed on the system, you'll get name of program colon and then you'll either get nothing behind name of program colon if it's not installed or if it is installed, you'll get the location to the binary, the location to some libraries, maybe the location to a man page. Let me give you an example of a program I know is not installed. Zed, which is a text editor for I believe the Cinnamon desktop environment. I'm pretty sure I don't have it installed. And you'll see I get nothing returned, right? So Zed is not installed. Another similar command is the which command, which is a little simpler, right? Instead of giving me the location to libraries and man pages, it's just going to give me the location of a binary. Hope I did which emacs, you know, I'm just gonna get the location of a binary for emacs, where if I do a whereis emacs, I'm gonna get much more information. Another command I often enter at the terminal is a uname command. Now, if I do uname without any arguments, it's just gonna tell me Linux, you know, the name of the kernel, right? But if I do a uname dash R, it will actually tell me the actual kernel version. You can see on my machine right now, I'm using kernel version 6.1.15-1-LTS. Now, if I do a uname dash A for all, it will give me everything that's part of the uname command. So I get the kernel, the distribution I'm on, the kernel version, yada, yada, yada, yada, you see time and date and you know, the name of the operating system is GNU slash Linux, et cetera. And of course, there's flags and options to get each and every one of these fields out of here. The most useful one that most Linux users are gonna want is that uname dash R because often you wanna know what kernel version you're on. Another common command that I use on my videos is the WC command. And typically I use WC space dash L for a line count. WC is the word count program, but usually I want a line count for some things. For example, maybe I want to know how many lines are in my bash RC. Now I could do a WC dash L on my dot bash RC. And I get no such file or directory. So that's because I am in the test directory. So what we need to do, CD, no arguments, gets me back to home. Now if I up arrow twice, I go back to that command WC dash L dot bash RC, which now works. And you can see I have 294 lines in my dot bash RC file. By the way, the dot bash RC file in your home directory, that is the bash shills config file. Another common command I use on Linux, it's the find command where you do find and then the location of some directory. Maybe I wanna search my downloads directory for some particular string. And I typically use this flag a lot dash I name, which is an insensitive name search. And then I'll give it a string to search for. For example, Linux. I probably have some Linux ISOs in my downloads directory. If I do a search for that, nothing came up. But let's search my entire system for something. So let's find on root, the root directory, which means search my entire file system. Oh, I don't know. Hundreds of thousands of files on my system for dash I name Linux. Now this is going to return a bunch of stuff. I don't want to sit here and wait on it to find all the files that contain the string Linux. I'm gonna do a control C to kill that command, right? Control C will kill a running process. So that's how you terminate any command, any lengthy command that you wanna get out of. One other thing I wanna mention is I did find on root. I can also do find period. Find period, the period is a alias for this directory. So if I do dash I name and I do bash, for example. You see I have a few files that contain the string bash in my home directory and in various subdirectories because it does do a recursive search here. So let me control C to kill that. So period is your current directory, period, period. Two periods remember is the parent directory. The next command is the echo command. For example, maybe I wanna echo hello world and that's all that does, right? The next command is the printf command which is similar to the echo command itself. The difference is it takes a different kind of format and by a different kind of format, I mean you actually specify a format with percent s, percent s is going to be some value that we'll give it later and then maybe I wanna do a backslash in for a new line. So print some string followed by a new line. What string? Well, how about hello world? Misspelled, all right, then there you go. And you can have more than one percent s values here if I wanted to. I could add another one as well and once again another new line and let's go ahead and do a second something here. I don't know and you can say hello world and then new line and then something and there is a space here because there was actually a space after the new line break. So if I wanted to, I could up arrow if I didn't really want that space there and get rid of the space and now they're lined up as expected. One important concept with these Linux shells is the pipe symbol. The pipe symbol is you being able to take the output from one command and put it into the next command as input. For example, if I cat my dot bash RC that's the cat command. Now let me up arrow and then cat dot bash RC pipe and then less. What it's gonna do is it's gonna take that cat output and then rerun it with the less command. And you can see how that works. Now I'm actually reading it as less. Now that command is kind of useless because I could have just done less dot bash RC but that's just an example of how you can string commands together with a pipe instead of less. Maybe I wanna take the top 10 lines so I could do pipe head and you can see I just get the first 10 lines. If I wanna specify a number of lines I could actually do dash in and maybe instead of 10 lines I want just five lines or maybe instead of head maybe I want tails. Maybe I want the tail which is the last five lines in this case or maybe I wanna do tail the last 10 lines but of those last 10 lines I really just want the first five of those last 10 lines. You can see you can just keep stringing these together with these pipes. I'm gonna CD back into the test directory and I'm gonna clear the screen. Let's talk about redirection. So I'm gonna echo hello world again. And this time I'm gonna do the right pointing arrow the right pointing chevron the greater than sign. So what this is this is a redirection it's going to take that output from echo hello world and it's going to send that to wherever I wanna send this. And in this case I wanna send it to the name of a fall I'll call it fall one. I do an LS there is now a fall one in this test directory if I do a cat on fall one you can see the contents of that fall contain the string hello world. Now let me up arrow and I'm gonna echo something different this time so let's echo something different and this time instead of the one greater than sign let's do two greater than signs. This is a redirection but this appends the fall and so what this does it takes this line and it adds it as the last line of the fall. So let me hit enter once again let me up arrow cat fall one and now you can see hello world and then the next line something different. Now if I up arrow and instead of doing the append with the two greater than signs if I only did a single one it actually overwrites the entire fall with this string. So let me hit enter up arrow cat and now the file simply reads something different. So one greater than sign actually writes the fall overwrites the entire fall with whatever you're doing the two greater than signs appends the fall meaning it adds it at the end of the fall. One of the most powerful shell commands is the grip command. Now the grip command is a search command you give it a string so I'm gonna grip the string. How about Derek which is my first name and where do I wanna search for this? We have to give it a file. Well let's search my bash rc for the string Derek. It doesn't exist but if I typed Derek with a capital D there is a line in my bash rc that does contain my name that string Derek. What if we wanted to search for every line in my dot bash rc that didn't contain the string Derek? Well let's do dash v for inverse search meaning give me every line but the line that contains that string and you can see now it actually gives me basically my entire bash rc minus the one line. If you wanna do a recursive search you could do dash r so I'm gonna grip dash r and I'm gonna search for my first name and then I'll just do the tilde character here right. We're gonna search the home directory and we're gonna find my name all over the place here so I'm just gonna go ahead and control c to kill that process. Let's go ahead and clear the screen. Another powerful shell utility is the sed command. Sed is typically used for substitutions and it's usually done in this form sed and then inside single quotes you wanna do s slash and then some string slash and then some other strings slash g and this is the string you're searching for and this is the string that is replacing it right. So if I wanted to search for Derek and replace it with Bobby right. On my dot bash rc. Now I'm gonna have to scroll back up but what we could do since we know pipes now let's just go ahead and make this easier to read and let's pipe that into head dash n five and there is the first five lines of my bash rc and where Derek Taylor used to be now I'm known as Bobby Taylor. Well not really. This is just output to the terminal. It didn't actually write that. It didn't overwrite my bash rc. If I wanted to make that permanent I would have to give said the dash i flag and now if I do that, let me vim my dot bash rc and you can see it actually did change that. Now I can change that back real quick and let's do a colon wq to write and quit out of vim. Another command I love is the alt command which has a number of different uses. I've done videos about alch in the past very powerful command but the most basic usage of alch is typically done with alch and then inside single quotes and then inside the curly braces you do a print space dollar sign and then the name of a field you want to print maybe the first field for example. So let me show you this in action. So if I kept my slash it's a slash pass wd file a standard file on the computer as far as Linux systems. This is a file that contains all of the users on the systems and their default shells their default home directories yada yada yada and you can see there are colons that separate each of the fields. Well, if I do cat on slash it's a pass wd and I do all and then the single quotes spoilerly braces print dollar sign one. It prints the first field but by default alch actually uses spaces as field separators. So in this case because the file uses colons as field separators I need to do dash capital F for field separator and specify that the colon is actually the field separator and then print the first column based on the colons and now I get a list of user names because those are the actual user names is the first column. If I wanted the second column they're using the X server. The third column gives me I guess the user ID of each user. You can see how that works. Alch very cool command. Another similar command to alch as far as being able to pull out fields and columns is the cut command. So I could do cut and I could do dash F one for field one and dash D for delimiter and the delimiter is the field separator. They just call it a delimiter with cut and then once again I'll specify a colon and I still get that list of users. So just a different way, alch or cut both can pull out columns if you're dealing with a file where information is laid out with separated like comma separated values or colon separated values, alch and cut will be your best friend. A common command that I often run on my Linux distribution installations and first looks it's the Xrander command. So if you're using the X server what this does it tells you all the displays that are currently connected and I have three displays, three monitors currently connected there's the names of the monitors. Now through the magic of some of the commands we've already learned plus piping I could actually do something like Xrander and then pipe it into grip and the lines that contain the monitors I notice contain the string connected. So let's just grip the word connected. Okay that works but I only want the monitor names. I don't want the entire line that contains the monitor names. So how would I get that information? Well I could use alch if I wanted to use the alch method and I could simply print dollar sign one and that works and by default it uses spaces as field separators which is what I wanted so I didn't have to specify a field separator or once again I could also use cut cut dash F1 for field one dash D for delimiter and I do need to specify that we're using spaces with the cut command. And you can see that is a very nice, tidy way to get a list of all of your monitors and monitor names and I typically do use this kind of stuff when scripting especially when working with tiling window managers where sometimes in your configs you need to specify what your monitors are. Well this will automatically get your monitor names for you. How cool is that? Let me CD into the test directory. Once again, let me do an LS. I still have file one here. Let's talk about chmod. So change mode is essentially what this is. This changes file permission. So if I chmod 755 on file one and I did a LS dash L for long format this string here of R and WX's. This actually is the file permissions for that file. That's read write execute permissions. 755 is pretty liberal as far as permissions. If I wanted something a little stricter I could chmod 644 on file one. If I do a LS dash L you can see now all those execute permissions that we had before now nobody has execute permission so if it was a script nobody could run it. I've done a video detailing and great detail file permissions on Linux. So check that video out if you're not familiar with that. Speaking of making scripts executable oftentimes you'll do a chmod plus X meaning plus executable. Basically it adds all the X's to the file permission string. If I did file one. Now if I do LS dash L you can see we have three X's in the various places where the executable flag should be. If I wanted not to make that executable let me up arrow and chmod minus X and then up arrow LS dash L and you can see the X's are now gone from the permissions. Now LS dash L gives you the owner and the group of the file as well. Now if I wanted to change the owner the person that owns the file you would chown right change owner and then typically you would do name colon name because often the owner and the group are the same and then the file that you're gonna change that to. If I hit enter of course there's no user on the system named name right so that command does not work but that is how chown works. And of course you could chown recursively you typically will have to do that in directories so recursively change everything in some directory somewhere and be careful when you chown recursively because if you did that in the wrong directory you could actually seriously damage your system. For example if you chown everything in the root directory that would really destroy your machine so be careful when you're doing recursive chowning or chmodding for that matter with the file permissions that's also very dangerous if you do that in a top level directory. Let's talk about the history command so if you type history in the shell you will get all the commands that you've entered. Gives you a nice little history of the commands you've entered in the shell. If you want a shorter history you could do history and then give it a number history 10 just gives me the last 10. One of the most common things you'll do with the history command is pipe it into GRIP because you'll be searching for a pass command something you entered days, weeks, maybe months ago but you forget the exact command because it's a lengthy command maybe that Xrander command that I did earlier. I don't remember what I piped it into I don't remember all the flags and options I just remembered it was a Xrander command so let's grip for the string Xrander in my history and it will give me all those past Xrander commands oh there's the one I wanted so that's how that works you'll often do history into GRIP another thing with history you notice that the commands have numbers right they're numbered and if you want to run a command for example the clear command clears the screen it's numbered 655 you could do bang which is the exclamation point bang and then number for example 655 watch what happens it runs the command in our history that was numbered 655 which was the clear command bang bang is interesting because it always runs the last command so if I hit bang bang it just simply runs the clear command because that was the last command for example one of the most useful things to do on your system is to run an update for example on my Arch Linux system I'm running Arco Linux actually I could do a pacman dash capital S lowercase yu it says error I can't run this as root well sudo bang bang which bang bang means run the last command it's up this time with sudo and now it's actually gonna ask me for my sudo password and I can actually run the update I'm gonna control C to cancel that process speaking of processes how do you kill a process at the command line you can use the kill command you would do kill and then you know some kind of ID number if you wanted the ID number you could get it with the top command I typically like a H top so just a better top but if you get the process ID you know you could use the kill command to actually kill that process another thing you could do if I switch to a different workspace you could use the X kill command so if you're killing a graphical program X kill turns your cursor into a skull and crossbones and the next window that you click on it will kill that process so if I click on this terminal for example it killed that terminal another command you could use is kill all meaning kill every process that has this name for example kill all conky if I make this window a little smaller conky is the system monitor here kill all conky, conky is gone let's go back to our original terminal clear the screen some common networking stuff you'll use will be the ping command for example I could ping google.com and just let the ping run for a second and you can see now it's pinging google.com very slowly but it's it's coming control C will kill the ping and you'll often use ping during your Linux installations especially command line installations like Arch Linux, Gen2, things like that you'll ping a popular website like Google just to see if your ethernet is working or not sometimes you want to download the contents of a file on the internet and you can use WGIT for that for example if I wanted to download the contents of a particular web page I'll download the contents of distro.tube slash index.html if I do that it just downloaded that if I do an LS there is index.html I catted that just to verify yeah there is the actual HTML and the contents of my home page another command I could use instead of WGIT to download a file from the internet would be the curl command for example I could curl uh...https colon slash slash uh... distro.tube slash index.html and then I could space dash dash output and specify a file name let's do this one index2.html and you can see it downloaded and LS and now I have index2.html if I cat index2.html just to verify yeah that the download did work let's talk about numbers so let's start with the sequence command if I sequence 50 it's going to give me 1 through 50 incrementally now if I wanted to I could take sequence 50 and I could get it shuffled up randomly so I could pipe that through the shuff command for shuffle and I get 1 through 50 except they've been shuffled up right they're all out of order another useful command would be the random command so are the random actually it's a shell variable so if I echo dollar sign random all caps I'm getting a random number if I up arrow I get another random number so sometimes you want some kind of random number generated for you maybe in your scripting or your programming so echo dollar sign random is a really easy way to get that random number let's talk about the test command test basically test if a file or a directory exists on the system or not so if I do test-f for file I'm in that test directory remember there's a file in here called file 1 well let's test for it test-f file 1 if I hit enter nothing happens because really what I want to do is test-f file 1 and and and and means if that previous command actually succeeded without error then I want you to do something so let's echo the word true and then I'm gonna do two pipes together so and and is essentially and a boolean and a pipe pipe is the boolean or meaning so if it's not true then please echo false and I should have ran that command without that colon at the end I fat fingered that so file 1 does exist but does file 2 exist I know it doesn't but let's run it just to verify that that command does work and there's LS by the way to remind us what is in that test directory so I'm gonna up arrow so now I'm gonna do test-d to test if a directory named file 2 exists and of course there's no sub-directories in this directory so test-f for file test-d to test if a directory exists let's talk about the XR's command which is one of the most powerful commands we'll talk about today so you're gonna take some kind of source information or maybe it's a command that produces some output and then you pipe that into XR's space command and you pass on another command so basically XR's is gonna take whatever output came from the source or the previous command and then it's gonna pass that along as parameters for this second command let me show you an easy example here so if I echo 1, 2, 3 and then I pipe this into XR's space touch what's gonna happen is touch is going to run touch and then 1, 2, 3 it would basically be the command touch 1, 2, 3 and if I do an LS you can see now I have files named 1, 2, and 3 inside this test directory now if I up arrow a couple of times and get back to echo 1, 2, 3 what if instead of XR's touch now I do XR's RM for remove let's do an LS after running that and you can see 1, 2, and 3 have now been removed let's talk about some commands you will sometimes see folks that are installing Linux distributions on cameras such as myself will often run commands like LSBOK for list block what the list block command does it lists all your block devices and essentially what you're really looking for are your physical drives you can see I've got six drives in this machine actually 1, 2, 3, 4, 5 drives 4 SSDs currently connected as well as an NVMe drive and you can see I can get the numbers and the reason you'll run LSBOK is because a lot of times you need the partition name for example which partition is mounted to what directory especially when you're creating file systems for a Linux install you wanna make sure for example that you're formatting the right drive LSBOK will get you that information similar to LSBOK you could also use DF DF is a command that also will give you your block devices as well as your loopback devices as well and along similar lines is the DU command for disk used or disk usage let me see the end of the home directory if I do a DU in my home directory it's going to tell me the size of these directories in my home directory recursively and it's gonna be gigantic because my home directory of course is gonna have thousands of subdirectories and subdirectories in those subdirectories yada yada yada let's do a DU-A for all files and directories H for human readable numbers and let's do this in the test directory because there's so little in it now we get easy to read output here and you can see all the files and the directories in the test directory and you can see their byte sizes two nifty commands to know are the date command to get the current date and the Cal command to get a quick little calendar so it's the calendar for the month you're currently in a lot of times though you want a calendar with three months you want this month and the one previous and the one next month as well well you could do Cal-3 to get your three month calendar displayed let's talk about a calculator BC for basic calculator, bash calculator I'm not sure what it stands for but now you get a new prompt if I do something like five divided by three for example of course that's gonna be one with a remainder of two if we wanna get the remainder I could do five modulus three let's go ahead and see what the remainder is and of course we already know it's gonna be two two times two of course is four let me control C to get out of the basic calculator and I could also do something like echo six divided by two and then again with the magic of pipes pipe that into BC and I could get the answer just displayed right here as output without ever having to go into the basic calculator prompt now let me copy a file over to the test directory I'm in my home directory I'm gonna copy my dot bash RC file over to test slash I'll call it bash RC now let me go ahead and CD over to the test directory if I do a LS dash LA you can see there is this bash RC the new one the copied version in here in the test directory now this is a big file what if I wanted to split it up I could do split dash in for number of splits I wanna split this into five chunks so take you know like 20% of the file every 20% split it up and of course we have to specify what file we're splitting now if I do an LS you can see XAA XAB XAC XAD XAE so it split it into those five chunks if I do a cat on XAA you can see that it ends right here right it just took the first you know 20% of my bash RC so how do you get these back into one file so after you split if you wanna put these back into a file again you use the cat command cat even though people use cat 99.9% of the time they use cat to read a file that's all you wanna do with cat cat actually stands for concatenate that's what it was originally designed to do it was to concatenate meaning put back together these split files so I could cat X asterix for wildcard symbol meaning any file that begins with X I don't care what comes after the X and then what I'm gonna do is I'm gonna redirect that into a new bash RC I could name that anything but now we've created this file new bash RC and if I vim the new bash RC it is actually my bash RC all put back together again yeah it looks exactly the way it should look now let's clean up this test directory I'm gonna remove every file that begins with X so X asterix and I'll do an LS so all of those X files are gone let me CD back into the home directory clear the screen last command I wanna talk about briefly is the time command so what the time command does is you do time and then another command and time will tell you the number of seconds it took for that command to run a number of milliseconds for most commands because most commands are very quick for example if I run tree on root the tree command gives me the entire directory hierarchy on my system in that directory in the root file system this is gonna take a long time because there's probably tens of thousands of directories on the system let me control C to kill that process I'm gonna run a time on tree on root and it's gonna run but at the end it's going to also give us the number of seconds and you can see it finished and it gives us the time and you see the real time here it was actually 28.3 seconds user time and then the system time as well you get three different time values so there you have it learning the Linux terminal in 30 minutes that was a whirlwind tour now most of the commands practically all of the commands that I displayed on video I've done dedicated videos going in much more detail about the individual commands so check my command line playlist on YouTube now before I go I need to think a few special people I need to think the producers of this episode Gabe James-Maximette Mehmet Mitchell-Paul Royal West Armored Dragon, Bash Potato Chuck Commander Ingrid George Lee Methos, Nate Erion, Paul P. Saucer and Vador Polytech Realities for Les Red Prophet Roland Tools Devler and Willie these guys they're my host here patrons over on Patreon without these guys learn the terminal in 30 minutes video wouldn't have been possible the show is also brought to you by each and every one of these fine ladies and gentlemen as well all these names you're seeing on the screen right now these are all my supporters over on Patreon I don't have any corporate sponsors I'm sponsored by you guys the community if you want to see more videos about Linux and free and open source software subscribe to distro tube over on Patreon alright guys peace well I forgot to talk about the Calse command