 In the last few months we've got a lot of new subscribers to the channel and I've got a lot of new subscribers that are very new to Linux and they don't know anything about the terminal or the command line and they really want to learn how to use the terminal. I've been getting people messaging me asking, hey DT, you use the terminal all the time and it looks really cool. I want to learn all these terminal commands. Can you point me to a video to learn it all? I've made dozens of videos about the command line and about Bash but there's really no one video I can send these absolute beginners to that would properly teach them how to use the terminal in the command line. So today I wanted to make a comprehensive video for the absolute beginner on how to use the command line in Linux. So let me switch over to my desktop here and this is Linux Mint 20.1. I'm running Linux Mint inside a virtual machine here today and the first thing we need to do is open a terminal. Now you can open your terminal in several different ways in your desktop environment. If it has a traditional kind of menu system, you can navigate through the menu system to locate the terminal application. If the terminal has a quick launcher on the panel, you could click that and on a lot of Debian and Ubuntu based systems such as Linux Mint, Control Alt T is a hot key that should bring up the terminal. So let me hit Control Alt T and the terminal pops up. Now I'm going to make the terminal full screen here and I want to zoom in a lot of times to zoom in and out on most terminals. It's control plus sign or control minus. So if I do control plus, I should zoom in if I did control minus, I'd zoom back out but I want to zoom way in so you guys can see the commands I run today. Now because we have a lot of information to cover, I'm not going to spend much time on each of these commands. We're going to rush through this but you can always go back and re-watch the video if you have problems understanding some of what is discussed today. So the very first terminal command I want you guys to run is just open up your terminal and type PWD. That stands for Print Working Directory. This tells us what directory we are in. Right now I'm in my home directory. Your home directory is typically slash home slash your username and even without doing the PWD command, I actually knew I was in the home directory because this little squiggly sign here, this little tilde symbol, that is an alias for your home directory. That simply means that's just another way of writing slash home slash dt in my case. So anytime I see the tilde sign, that's actually slash home slash dt. The next command I want to run is CD. Now CD means change directory, meaning go to another directory somewhere on my system. So maybe if we're already in my home directory, maybe I want to go to the downloads directory. So I start typing downloads and then I'm just going to hit Tab. And Tab is a way to autocomplete the path that you're typing. So CD and then start typing downloads and then just hit Tab if you don't want to type the whole thing and it will just autocomplete it for you. Then hit Enter. And now you can see we are actually in the tilde slash downloads directory. So that is actually my home directory slash downloads. If I did PWD, it would print the full path. It would expand the tilde character out to slash home slash dt slash downloads. Now that we're in the downloads directory, maybe I want to go back to the home directory. Well, how do I get back to the home directory? Well, you can do that three different ways with CD. You can do CD and then space slash home slash dt in my case would take me back to my home directory. But let me get back into the downloads directory. So CD back in there. I could also do this CD space and then the tilde symbol here because remember tilde is just an alias for slash home slash dt. And that would also take me back home. And if I hit the up arrow a couple of times here, it remembers the history. I'm going to run the CD downloads command again to go back into the downloads directory. Also, I could simply run CD without any other argument, CD without any argument. Always CDs back into the home directory. Now let me clear the screen. So I'm going to type the word clear and hit enter just so all the information that was already on the screen goes away and we get a clean terminal. You could also do control L on the keyboard to clear, for example, let me do PWD. So it prints out my home directory and then let me do control L. And that also works for clear. So you can clear the screen two different ways you can just type the word clear or you can do control L. The next command you really need to know is the LS command is probably one of the most common if not the most common command people run in the terminal. This is the list command. What is it list? It lists the contents of the directory you're currently in. If you don't give it any other arguments, it simply lists everything in the directory we're in, which is in this case, my home directory. But that's not really what it does. It doesn't list everything in this directory. It only lists the files and the directories that are not hidden files and directories because in Linux, there are certain files and directories that have a period at the beginning of their names. We call them dot files and these dot files are really hidden files. They're files that are not normally displayed when you run a LS command or when you open a file manager and you're viewing a directory to actually show all the files, including the hidden files, which you need to do is run LS space and then give it dash A for all files, including the hidden files. And now you see I get all of the files and directories in this system, including the ones that begin with the period, the dot files and the dot directories. Another interesting flag for the LS command that most people use is the L flag and let me show you that. So I'm going to do LS space dash A because I want to be shown all the files in this directory, including the hidden files. And then I'm going to give it the L flag for long listed format. And what this does is instead of just giving me a horizontal kind of list, it actually gives me a vertical listing of all the files and directories in this directory, including the file permissions, who owns the file, the size of the file, the date that the file was created. So it gives us a lot more information and that is typically my LS command. Typically I also give it one more flag. I give it an H flag. So my LS command is typically LS dash L for long format A for all files, including the hidden files. And then I usually give it a H flag for human readable numbers because by default it lists the file size and bytes and some of these file sizes get into kilobytes, megabytes, and gigabytes. And these numbers get huge and they're not comma separated. So if you give it the H flag, you know, if a one gigabyte file will actually read as one gigabyte instead of, you know, a bajillion bytes or whatever it is. Now let me clear the screen so control L to clear the screen. Now what if you didn't know all the flags that were available for the LS command? Because there's a lot, many more than what I just showed you. And maybe you want to go and read about some of the flags that are available for a particular command such as LS. So what you need to do is read the man page. So if you type in the terminal man and then space and then the name of the program, you want the man page for the man pages, the manual pages, the instruction manual for that command. So do man space LS and you get the man page for the LS command. And you can see all of the flags, the A flag we discussed. There's a B flag, a C flag, a D flag. So you can an F flag. So you can list out just the directories or just the files. There's a G flag, which is group directories first. You can do a lot of really cool stuff with the LS command. So any command I discussed today that you want to learn more in depth about a particular command, just view the man page. Now let's talk about creating a file. There are a couple of different ways to create a file. If you want to create an empty file, maybe you don't want to actually do anything with this file just yet. You want to create an empty file, but you don't want to actually open it with a text editor and put anything in it. You can just do this command here, touch, and then we'll call this particular file file 1.txt, it'll be a text file. And if I did an LS, you see in my home directory, we now have that empty file called file 1.txt. Now many times when you create a file, you actually do want to open it in a text editor and start, you know, adding stuff to it right away. So typically when you create a file, you actually don't usually use touch. You use your favorite editor. Let's use nano for this example. You do nano and then name a file. So maybe I want to create a file called file 2.txt. And I want to edit it right away. And then I'm going to do nano space file 2.txt. And this opens this new file that was just created. It's still an empty file, but now we can actually type something. This is a line of text. Well, if I can type. And then what I could do is control X to exit out of nano, Y to save, hit enter. And there you go. And if I did an LS, file 2.txt is there. And if I actually wanted to check and make sure that the contents I wrote to that file are there, we could use the cat command. We can run cat, file 2, and just tab complete. And then hit enter. And it cats out that file, every line of that file, which is there's only one line, and that line is this is a line of text. Now that we've shown you how to create a file, how do you create a directory? Well, you use this command here mkdir for make directory. So makedir space, and then let's create a new directory. I'm going to call it test. So we're going to make a new directory and name it test. And now that we've done that, let's run the LS command and see if we have the test directory and we do. Now we could cd into the test directory if we wanted to go there. Cd into the test directory, let's run a LS. LS doesn't return anything because this is an empty directory. Well, let's move something into this directory so it's no longer empty. So let me cd back into the home directory. Now I could just type cd and hit enter and go back to the home directory. But another interesting thing you can do with cd is cd space and then the dash character. And this cds into the last directory that you were in. So maybe I wasn't in the home directory, maybe I was in my videos directory or something, cd space dash always goes to the last directory you were in before you went to this directory. I hope that makes sense. So that cds back into my home directory. Let me clear the screen. Let me run an LS and what I want to do is I want to move. So let's do MV for move and let's move file one dot txt. Where do we want to move it to? Let's move it to the test directory and hit enter. And now let's run a LS except we're in the home directory. I want to do an LS on the test directory. So let's give it a path to the test directory and then run an LS. And you see file one dot txt is inside the test directory. Now if I run an LS without any arguments, you know, we'll run LS and the directory we're currently in the home directory and you see file one is not here because we moved file one to the test directory. But what if you wanted to just copy a file instead of moving it completely? Well, you could copy with CP instead of MV for move. We do CP for copy and I'm going to do file two this time. And we're going to move file two, of course, into the test directory. And now, again, if I do LS on the test directory, we now have file one dot txt and file two dot txt in the test directory. But if I LS in the home directory, file two dot txt is also still in the home directory because we copied it. So we have two file twos, right? One in the home directory and then the copied one that is now in the test directory. Now, how do you remove files and directories? Well, to remove a file, what you can do is use the rm command for remove. And in this case, I want to remove file two dot txt from the test directory. Now, right now I'm in my home directory, right? You see the path, the tilde is signifying the home directory. That's where I'm at now. So to remove file two from the test directory, I need to type the full path to it. So I need to type test slash and then file two dot txt. And let's run that. And now, when I do an LS on the test directory, file two dot txt is no longer there because we removed it. And if I up arrow to get to that last command I ran, this time let's run file one. So let's remove test slash file one dot txt. And now, when I run the LS on the test directory, it is now an empty directory. And now, to remove an empty directory, you can't use the remove command. It doesn't work on directories, typically. You can force it to work on directories, giving it certain flags. We'll get to that in a minute. But typically, to remove a empty directory, you do rmdir for remove directory. Remove directory test. Let me hit Enter. Now, let me LS. And the test directory is no longer there. Now, how do you remove a directory if it has stuff in it? How do you remove the directory and remove everything within the directory? Well, it's a dangerous command, but you need to know it. So let's go ahead and make the test directory one more time. So I'm going to mkdir test. And then let's put something in it. Let me copy file two dot txt over to test one more time. And now, if I did an LS on the test directory, you see it's not an empty directory now. So rmdir on test actually will fail. It says fail to remove because the directory is not empty. You can't rmdir a directory unless it's empty. But you can use the rm command with these flags dash rf. And what this is is remove recursively and forcefully a directory. Now, this is a dangerous command because make sure that you actually want that directory deleted recursively because if you messed up and removed recursively, the root directory, for example, you would destroy your Linux installation or you rm-rf your home directory, you just lost all of your home user data. So all your documents and everything are wiped out. So be very careful if you run the command rm-rf. Make sure that that path to the directory is correct and you really want that directory and all of its contents removed. In this case, it's pretty safe because the test directory was just a directory I created and there's really nothing in it. Now, let me clear the screen here and let's talk about finding programs on your system. One of the things people often want to know about at the command line is where a particular program's binary is on the system. So any program that you can run from the command line, anything that you can execute from the command line has a binary somewhere on the system. For example, the LS command that we've been running. Let me do this command here, which space LS. And it's gonna give me the path to the actual LS program, the LS executable binary on the system. It's gonna tell me exactly where that lives on the system. I did which Firefox. I'm pretty sure Firefox is the default browser here in Mint. It will tell me where the binary for Firefox is. Now, I typically don't use the which command. There's a better command called where is. Where is does the same thing It lists multiple things. It will give you the path to the binary. It will give you the path to the libraries for Firefox. So user bin Firefox is the binary. That's the executable. User lib Firefox is where all the Firefox libraries should be and it also typically gives you the path to the man page for that program. So user share man Firefox in this case. Now, how do you search for files and directories on your system? Maybe you are searching for a file that contains a specific name or a specific string of characters. Well, there's a couple of popular commands to do this. Probably the easiest command is the locate command. So I could run locate Firefox and it will give me all the files and directories on the system that have Firefox as part of their name. Now, not every Linux installation is going to have the locate command available to install locate. Sometimes the package is not called locate. Sometimes it's called mlocate. So let me actually check that here on Mint. So if I did a sudo apt install mlocate, it's going to ask for my password and mlocate is actually the package. So that is actually the program you need to install is mlocate, but the command to actually run is actually called locate, not mlocate. So locate and then a string of characters that you want to search for. Now, locate searches a database. It takes a snapshot of your system. So every now and then you need to update the mlocate database, how you do that is run sudo and then update db, all one word. And then once you have the new scan of your system, you know, then run another locate command. I don't know. Let's locate something that contains the word Linux. It's probably going to be a lot of stuff on the system that contains the string Linux as part of the path to that file or directory. Now, let me clear the screen. Another kind of find command is just the standard find command that's part of the GNU Core Utils. So if I wanted to search through the entire root file system, I could do sudo because we need sudo privileges to search through certain root directories. I'm going to do sudo space find space slash because we want to search the root directory when the root directory is the slash symbol space. I'm going to give it this flag dash I name because I want it to search case insensitively, meaning I don't care whether the names, the letters in the name are capital or lowercase. And what do we want to search for? We want to search for Linux. And it's going to give me, in this case, some directories that have Linux as part of the name. And it doesn't matter whether Linux began with a lowercase l or a capital l because I gave it that I name flag. Now, the find command is very powerful. If you read the man page, it's a gigantic man page with a ton of flags and options available for it. I've done videos about the find command specifically, so check out my videos about find to know more. Now, let me clear the screen. Let's talk about printing text right here at the command line. Probably the most common command for just printing something out at the command line is the echo command. So I could do echo and I could do in double quotes here. I'm going to do hello world. You could have done double quotes or single quotes. It really doesn't matter, just wrap it in quotes and it will spit out hello world. That's the output. Now, echo is a pretty standard command, but there's actually a better version of echo. There is the printf command. Printf is interesting. It's an upgraded version of echo because it allows you to do things like include special formatting and escape sequences. So I could do, for example, one, and then I could do backslash in for new line, two, backslash in for new line, three, and then do the ending double quote and watch what happens. Now I get three lines, one, two, three, because I could add those escape sequences for the new lines. If I tried to do that with echo, it wouldn't work because echo does not allow those escape sequences. I hope that makes sense. You say echo, just echoes exactly what I typed rather than swapping out the backslash in as line breaks. Now, an interesting character that you need to know about is the greater than sign and what this does is redirects output to a file. Let me show you. Let me run that printf command that we ran a minute ago. I'm gonna printf, one, two, three, and one, two, three will be on their own lines and then I'm gonna do the greater than sign. So I wanted to take that output, which is one, two, three, and I want to direct it to a specific file and it can be any file. It doesn't have to be a file that exists on the system. We can create a new file. Remember, I deleted file one.txt earlier, so let's create it again, file one.txt. I'm gonna hit enter. If I do a ls, you will see file one.txt is now back. If I wanted to see what was in it, let's just run the cat command on file one and you see one, two, three is cat it out. So the greater than sign, that is for redirecting output into a file. By the way, that cat command, it's really interesting, but sometimes you cat out a file and it's a gigantic file. Let me do cat on our dot bash RC, which is the bash shell configuration file. We'll talk about that later, but let's do cat space dot bash RC. And this is a gigantic file. We're already at the end of the file, but I would have to scroll up a lot to actually read this file. So catting out a file, a lengthy file, doesn't make a lot of sense. There's a better way to view this and you use this command here, less and then dot bash RC and it cats it out, but it starts it at the top. And if you want to scroll down the file to actually read it, which makes more sense than being at the end and having to scroll back up, less starts at the top of the file and to read it, you just hit enter. Just hit enter and you go down line by line and you could actually read it to get out of less type Q for quit. Now let me clear the screen. Typically when you cat a file or less a file, you're looking for a specific line of text, a specific string of text, but a better way to actually find that line of text you're searching for is to use the grip utility. Grip is essentially a search utility. So run the command grip and then the string you're searching for. Maybe I want to search for the word alias. So I'll wrap that in single quotes space and then the location of the file that I actually want to search for the word alias in. I want to search in my dot bash RC file. Let me run that and you see the output. It prints out every line that had the word alias somewhere in that line. Let me clear the screen one more time. Earlier we talked about a very special character. We talked about the greater than sign that redirects output to a file. Another really interesting character is the pipe symbol. What is the pipe symbol? Well, it takes the output of one program and directs it into another program. So let me give you an example. Let's run the LS command. Let's do LS and let's do dash L for long format. So this is the LS command. Maybe I want to run the LS command and then I want to take that output and pipe it into another program. Maybe I want to pipe it into, you know what? Another GNU utility, kind of like grip is said. What is said? Well said is often used as a search and replace kind of tool and the way it works is you do S slash and then the old text slash then the new text that you want to replace and then slash G and then the ending double quote. So in this case, what I want to do is there's a lot of vowels in this LS command. What I want to do, let's replace them all. So what I'm going to do is I'm going to do inside square brackets. I'm going to do A E I O and what I want to do is I want to replace every A E I O with the letter U and watch what happens. There are no vowel vowels anymore in this except the U. Actually every A E I O is still there. It was just replaced with the vowel U. I hope that makes sense. So we took the LS command and the output from the LS command. We piped it into another command, the said command and then it ran the said command. I hope that makes sense. I know that can be a little complicated but piping is one of the most unique things about the Bastille and Linux and the command line and you could keep piping. So we run the LS command, we piped it into said and then we could pipe it into another command. Maybe when you want to run, I don't know the sort command which sorts alphabetically or numerically. In this case, it's not going to do much because the very first letters are either D or dash. So that's how it sorted it. But you know, you can keep piping stuff when we can after we sort it, we could run the grip command. Maybe I want to search for specific lines which include, how about just the lines that include D, R, W, X, R. So it's going to include all of these lines but these last two lines, it's not going to return those. You see, so you can keep piping and keep piping into more programs and more programs. So that's really the interesting thing with the shell and eventually with shell scripting once you start creating your own custom scripts. Now let me clear the screen. We've talked about catting a file. So again, let's cat.bashrc just as an example. Again, it cats out the entire file. We're already at the end of the file. I'd have to scroll back up to read it. We've shown you less, less is a better way. It still cats out the whole file but you start at the top and have to read from the top. But a lot of times you don't need the whole file. A lot of times you just need specific groups of lines from the file. Typically you just need a few lines at the top or a few lines at the bottom of the file. And if you run head space.bashrc, if I can type it correctly, what it does is it prints out by default the first 10 lines of the file. So head name of file prints out the first 10 lines. If instead of head, I ran tell.bashrc, it prints out the last 10 lines by default. Now you can actually specify a number of lines. If 10 is not what you want, you could do head space dash in for number of lines space. And then maybe instead I want 15 lines and then space name of file. Now I get a head but I get 15 lines of the head. And if I wanted to do that on tell, I could do that as well. Tell again, dash in for number of lines and then the actual number of lines you want and then the name of the file. And in this case, we just ran the tell command and got the last 15 lines of our.bashrc. Now let me clear the screen. Now let me run a LS space dash L for the long format of the LS command. What is all of this stuff at the beginning of the files and directories? These are the file permissions. Now this will be a lengthy discussion that I don't have time to get into on this video. I have done a video about file permissions on Linux. And I suggest you guys watch that. The command you use to change file permissions is chmod space. And then whatever file permissions you want to set. And you can set it in the drwxrwxrwx format or you can just do it as numerical values. Maybe I want to change file one dot txt and give it permission 755. So chmod space 755 and then file one dot txt. So I just changed it from, it looks like it was 644 before to 755. So if I do LS dash L again, you see file one now instead of being rw dash rw dash r dash dash is now rwxrwxrwxrwx. Now you, again, watch my file permissions video to understand what all of that means. Just know that the chmod command is what you use to change permissions. Now let me clear the screen here. Now one of the things you often will use chmod for is to give yourself execute permissions for a file. For example, let's in nano, let's create a simple bash script. So I'm gonna do nano and I'm gonna do script.sh for shell script. And we want this script to run echo and then we want to do hello world. A very simple script here, right? So then control X to exit, Y to write and then just hit enter. Now let's try to execute this script. If we execute it, it should print out hello world right here in the terminal. To execute a shell script, what you need to do is period slash and then the name of the shell script. So in this case, we're gonna do period slash script.sh. And we're gonna get an error because permission denied. Why is permission denied? Well, if I do LS space dash L and go to script.sh, we do not have execute permissions. Now execute permissions are the X's that are in some of the files. So we do not have permission to actually execute that file, meaning we don't have permission to actually run that script. How do we get this permission? Typically you're gonna do chmod space plus X, meaning add the X's to the file permissions, add X three times basically to script.sh. Now that we've done that, let me up arrow and now when we try to run the script, it actually runs and then you get on the output, hello world. Now let me clear the screen. One very useful command that you will often use inside the shell is the history command. So make sure you guys know history, just type the word history and it gives you, you know, the last, well, it will vary depending on your bash RC settings, but it will give you several hundred or maybe even several thousand commands that you've run recently in your history. Once you've run the history command, of course you could always just copy and paste the command you were looking for, but interesting thing about history is it gives you numbers, it lists them by numbers. For example, maybe I wanna run the command that's numbered 84, which is the till-n15 on the bash RC. How would I run that? Well, you simply do exclamation point and then no space, just the number that is listed in the history. So do exclamation 84 and it will run the 84th command in your shell history. Another interesting history kind of alias is just the two exclamation points, the bang bang. That signifies the very last command I ran and this is extremely useful. So let me clear the screen and I will show you why you need to know about the bang bang command. So maybe I want to update my system on a Debian or a Ubuntu based system or here in Linux Mint. Typically what you wanna do is apt update. So let's run an apt update. That's gonna say a sudo password for DT. So it actually knows we need sudo privileges, but I'm gonna cancel that. A lot of times when you run a command that needs sudo privileges, that you didn't give sudo privileges to, it's gonna say you can't run that command. So let's imagine that that command failed. Well, what I could do is go back right afterwards and then do sudo space and then bang bang, meaning run sudo and then space and then the last command I ran. So it's basically gonna run sudo apt update. And it prints it out, sudo apt update. Now give your root password or whatever it is and it will actually update the system. I'll actually let that run since I started it. All right, clear the screen. Let's talk about how to kill a program because this is something you often do at the command line. You got programs running and you want to close them and there's several different ways to close a program or kill a program is how we call it here in Linux. You could simply run kill space and then the process ID for that process that's running or sometimes you can just give it the name of a program. Right now I'm in the GNOME terminal. I think if I did kill GNOME terminal, it would probably kill it. I don't want to do that because I just have to reopen it and then zoom in again. Another thing you could do is if you have several instances of a particular program, maybe you have multiple instances of the GNOME terminal running, you could do kill all space, you know GNOME terminal or whatever it is that you're trying to kill. Another interesting way to kill a program is the xkill command. So let me open up something I don't mind killing. So let's open up the file manager here. Now that I have the file manager open, let me minimize this and I'm gonna run xkill. xkill will turn your cursor into an x, meaning anything you click on will be killed. It only does it one time. So if I click on the file manager with the x, we just killed the file manager. So three things you need to know, kill, kill all, xkill. Another way to kill a program is through htop. If htop is installed, htop is not currently installed. Let me sudo apt install htop and then let's run htop. And htop shows all the processes that are running on your system. So what I could do is I could just arrow down here and find the program that I want to kill. Maybe I want to kill most of this stuff or daemons running in the background, but just imagine I wanna kill this particular process that I'm highlighted on right here, rsyslogd. Now I don't actually wanna kill it, but if I did, I would type F9. You see at the bottom, it tells me. Let me move my head out of the way. F9 for kill. You see this at the bottom, it gives you the hotkeys for it. So just type F9 and then another menu will come up. Let me show you F9. Another menu will come up. It's already highlighted on sigterm. Just hit enter and it will actually kill that process. Now I actually don't wanna do that. So let me get out of htop. Let me get my head back up and let's clear the screen one more time. Another interesting command you sometimes need, not necessarily on some of the more beginner friendly distros like Linux Mint and Ubuntu and things like that, but a lot of times, if you're doing more minimal installations, like maybe you're doing a server install like a Debian server or a Ubuntu server, or maybe you're doing a minimal arch install or a Gen2 install. And during the installation process, you're wondering, hey, is networking actually working? Do you have internet? Well, a good way to test it is just to run the ping command ping and then the address to some website or some IP address that you know, just ping it. And obviously Google.com is a popular website. Let's see if we can ping Google and we can. You see it just keeps returning it. Now do control C on the keyboard to kill the ping. Another common command as far as internet is Wget. What is Wget? It allows you to download something from the web. That's basically a download command. So Wget and maybe I wanna do HTTPS colon slash slash and then I don't know. Somelinux.com, you know, this is the website for some Linux OS, I don't know, and slash and then new-release.iso, right? That would be the command I could run at the terminal. You know, if I knew the path to the URL for some particular Linux's ISO, you know, for a download, I could run Wget to download that ISO. I hope that makes sense. Some other interesting command line utilities are the date command. The date command just returns the date. Now you could give it several different flags. You know, you can change the format drastically. Again, just you're ever wondering about flags for a program, just do man space, name a program. So let's read the date man page and you know, you get various flags, formatting options and I won't cover that. You guys can cover that on your own. Just read the man page. So that is date. Another one you can run is Cal. Cal, self-explanatory is a calendar. And another interesting one you can run from the command line is BC and this is your basic calculator. So type BC and you have a prompt and I could just start doing simple mathematics here. So if I did two plus two, hit enter and I get four returned and let me quit out of that. Control C should get us out of that. And it actually returned an error. It says use quit to exit. So let's just type the word quit and we get out of BC. Let me clear the screen. I don't want this tutorial to run too long. The only thing I want to discuss real quick, let me do a LS-LA for all files and long format and hidden files because I want to show you guys in your home directory, look for dot bash RC. What is bash RC? That is your config file. A lot of Linux files, if they end with the two letters RC, that signifies they are config file. So do nano space dot bash RC. And now we have our bash RC opened in our text editor and you could go in here and you could edit some stuff, change some stuff, but really the interesting things are aliases and you see alias ll is LS-ALF. So if we don't like doing our standard LS command, what we could do is just use the ll command because they created an alias for it. So let me open up a new terminal. Let me zoom in a little bit here. There we go and do ll. And ll is the same as running LS-LAF. That's what is the exact same command. I hope that makes sense. That's what a bash alias is. I've done some videos on bash aliases before and you can add other bash aliases. For example, let me quit out of this. Do I want to save? No, I really haven't changed anything. Anyway, to update your system on a Debian or an Ubuntu-based system, typically you have to run this command sudo apt update space and an sudo apt upgrade. And I suggest you guys get used to installing software, removing software, updating your system at the command line. But the problem with this particular command, you're gonna wanna update your system probably once a week, twice a week. And this is a lengthy command to type. It may be hard to remember the command. If you're not used to running this command, what I would do is I would create an alias for this command. So what I would do is get back in your bash rc. So do nanos dot bash rc and somewhere where you have aliases already written, I would just add a new alias. So there was already some aliases here. So I'm gonna go to this line down here and let's do alias space. We need to create a name for the alias. I'm gonna do apt up for update or upgrade apt up equals no space between the alias name and the equal sign. It has to be name equals without a space. And then we'll do a single quote and we want this alias to run this command sudo apt update and and sudo apt upgrade. And then do the ending single quote and then do control X to exit, slide a right and hit enter. And we have to restart bash here. Now I could just close the terminal and then reopen it for the changes to take effect. But if I wanna do that without closing the terminal, I can do this command source. And what I want to source is the path to my dot bash rc which is, I'm gonna type the full path, the tilde character, which is the alias for my home directory slash dot bash rc. Let me hit enter. And now that I've done that, we've sourced the new bash rc file, the one we just added that new alias for. Let's try that new alias apt up hit enter. And it is running sudo apt update. And then it's also gonna run sudo apt upgrade. It's asking us, do we actually wanna take the upgrade? I'm gonna type in for no because I'll upgrade off camera. So that's all I wanted to cover on this tutorial on learning some of the basic terminal commands. And I came at this, for those of you that are absolute beginners, I know we covered a ton of commands very quickly. So you're gonna probably have to go back and rewatch this two or three times to get everything down. But honestly, if you just rewatch the video two or three times and actually run the commands that I ran, it'll stick in your head. These are not complicated. And once you've learned them, you will always use them. You will never open up a file manager to move files, copy pop files, or see the contents of a directory. No, you're always just gonna open up a terminal and type an LS to see the contents of a directory. It's just faster. Same thing with moving files. You're just gonna env the path of file, especially if you use the tab complete in the bash shell. It's actually much faster than trying to drag files and with multiple file manager windows open. You're never gonna do that stuff in a GUI program again. I think one of the things, I think a lot of people think the terminal and the command line are harder than they actually are. And I really hope that this video inspires more of you to actually learn the command line. Now, before I go, I need to thank a few special people. I need to thank Absi, Devin, Fran, Gabe, Corbinian, Mitchell, Akami, Archfiend, 530, Chris, Joe, David, the other David, Donnie, Dylan, Gregory, Lewis, Paul, Picvm, Scott, Wes, and Willie. They are the producers of this episode without these guys. This episode about learning basic terminal commands wouldn't have been possible. The show is also brought to you by each and every one of these ladies and gentlemen as well. These are all my supporters over on Patreon. A sincere thank you to each and every one of those ladies and gentlemen as well because DistroTube is sponsored by you guys, the community. If you'd like to support my work, look for DistroTube over on Patreon. All right, guys, peace.