 One of the questions that keeps coming up is hey DT, why do I need to actually learn about Linux to use Linux? Why can't I just use Linux as my operating system and never really learn anything about it because I was on Windows? I never really had to learn anything about Windows. I just used Windows Why can't I just use Linux without really diving deep into the shell and the command line? The GNU core utils mem and emacs and all of that stuff. Why do I need to learn any of that stuff? Well, the answer is you don't really have to you can use Linux without actually learning anything about Linux For example, you know most desktop Linux distributions are rather new user friendly You don't have to do much with them. They just work out of the box So you really don't need to learn Linux unless you want to be able to fix the problems that crop up from time to time It's kind of like being a car mechanic. Do I I don't want a car. I don't know how to fix the damn car When I want a car fixed I take it to somebody that knows how to fix it You can be that way with Linux But if you want to not have to pay somebody to fix your problems, right? You do need to be able to fix it yourself and that's what I'm doing, right? That's why I learn a lot of this stuff is I just I like to be able to fix my problem So I like to be able to open a terminal and feel comfortable in it You know and be able to use the bad shell and and be able to you know Work with some of the files on the system and be able to manipulate text and you know change things You know, especially if files are broken if I've played with config files and they're broken or a bad system update Broke some things, you know just for a test example. Let me cat a file So I'm gonna cat my slash Etsy slash shells files a very small file But let's imagine it's a gigantic file with hundreds maybe even thousands of lines of text And I want to filter out a certain section of this file Let's say that I only want the list of these shells that are available on the system I don't want all of this information here, which are just Committed lines well what I could do I could up arrow and I could cat the slash Etsy slash shells file again It's up this time. I'm going to pipe it through grip. Let's do an inverse grip So I'm gonna do grip dash v so I want you to find all the lines that do not contain The hashtag the pound symbol if I do that and now I get a list of just the shells now Unfortunately, I get a list of the shells, but I get the full path to the shells But I only want the actual name of the shell so instead of slash bin slash fish for example I just want fish and instead of slash user bin bash. I just want bash now How would I accomplish that well knowing some of the command line utilities for example all I can use all I can specify all to use the slash as the field separator So what it's going to do it's going to take all these slashes as field separators That is the character that delineates the first column from the second column or the first field from the second field And the third field and then once I have that set up I can tell all to then print me the last field so dollar sign in F is the last field And now I get a list of just the shell names without the full path Although we have some duplication because I have two binaries to the fish you'll I have two binaries to zsh I have two bash entries. So even what they're all Duplicated so what I could do I could up arrow and then pipe all of this into the unique command Which is part of the GNU core utils and so it's going to get rid of any Duplicated entries here and now I get a list of all the available shells on the system without Duplications without the full path to those shells and without the annoying Commented lines that started with the hashtag at the beginning of the fall now Do you really need to know how to use all of these tools? No But if for whatever reason we were doing something with this file and I really needed this important information Is it dire? Is it critical? What if I needed this information because my system was broken, right? And you know that this is the thing if your system is broken and you know how to use some of these tools You can fix your system, but again only if you want to fix your system You don't have to right you can just use Linux and when it breaks you can just reinstall the operating system Right that they can be your fix But for a lot of us we want to be able to to fix things without the need to do a fresh install every time Something minor breaks on the system and of course some of these command line utilities are really fabulous Especially for those of you that do a lot of writing maybe you do a lot of programming or example Let me cat my dot bash RC, which is a very lengthy file Let me up arrow and let's just take the head of it Which is the first ten lines and you can see my name Derek Taylor here in the comments at the top of the fall But let's imagine that there's a ton of instances of Derek in this fall Maybe there's a hundred different lines in this fall where Derek is is there But maybe one day I legally changed my name from Derek to Dirk, right? I don't like the second e, you know Do I want to have to go through all of my documents where I had Derek in the name and change it manually to D-e-r-k Dirk well, you know if I know a command line utility like said I can quickly make those changes Instantly because I can do it a said substitution so I could do s slash and I'm going to change Derek to Dirk That'll be a global substitution meaning change that in every instance where you find it in this fall And the file is my bash RC once again I'll up arrow and we'll just take the head and you can see that said will change Derek to Dirk for me And if there had been a thousand instances of Derek It would have changed all 1,000 instances of Derek to Dirk, right? Now do you need to learn this stuff? No, no, if you if you're fine with just opening up G edit or notepad or whatever plaintext editor you use and spend the next two hours changing all 1,000 instances of that word to the new instance of that word. Yeah, you don't need to know said, right? You just pick and choose do you want to spend a few seconds learning some of these commands like I don't even really need to explain what I just did with that said command right instead and then s for substitution the String you want to replace the string you want to replace it with and then slash g for global And then the name of the fall, right? So, you know that takes a few seconds to learn and that could save you potentially hours of work in a particular file That you're working in now. Do you value your time? Do you really want to save all those hours of work? Well, that's then you know you make that choice and of course I don't have to do this directly at the command line if I know vim You know I could vim my dot bash rc and I could do colon to get into command mode in them What I would do is I I would do a colon percent s of s for substitution once again Let's search for Derek. Let's replace it with Dirk Let's do g for global substitution Meaning if there are a thousand instances of Derek It's going to change all 1000 instances of that string Derek to Dirk And that is really the powerful Thing about these commands is the text manipulation because these kinds of commands They can save you several minutes of work several hours Several days several weeks of work in some cases if you're making very complicated Text edits that you know you really need to manipulate a whole lot of text in a very specific sort of way For example, maybe I have a thousand lines that all begin with the word alias But maybe the command alias has changed. It's been deprecated and now this command for example is Alien, you know, I can make that change if I want to very quickly I would have to spend at least a couple of minutes to change all of those instances of alias to alien If I had to type it out and that's just 10 lines Imagine it's a hundred lines a thousand lines 10,000 lines, right? Imagine, you know, this is a problem I've run into sometimes as I get documents from people. They'll send me things and maybe they're not a real good typer You know the people that have bad grammar bad spelling especially the ones that type everything in all caps or they type everything all lowercase, you know If you know some of the said substitution commands, you know, you can do a substitution where you take You know all the lowercase letters will do a range of a through z and we can substitute that for all the uppercase letters We do make that a global substitution. I do that on my bash rc You can see it just printed out my bash rc Except it changed every instance of a lowercase a through z to a capital a through z, right? And if you had to retype that yourself that would take a long time So if you work with text files, whether you're a programmer or even like you're a creative writer, you know Knowing some of these tools that manipulate text Again, it saves you days of work hours of work weeks of work in some cases But really you should learn linux, you know, if you want to learn linux, you don't have to but if you want to learn linux You should learn linux so you can fix your linux system. Maybe you have a bad update, you know Programs are crashing. You're not sure what program is the problem And you need to figure out what is installed on your system Or maybe you need to figure out if a particular program is installed on your system How can you do that? Well, you should know your package manager for your particular linux distribution I'm on arco linux, which is an arch based linux distribution. I need to know the basic pacman commands I know pacman dash capital q lowercase q gives me a list of all the programs that are installed on the system Now if I up arrow and I use grep once again, I can search for a specific Package to see if it's installed is zero ad installed I can grep for zero ad and there are two zero ad related packages that are installed Of course, I could also use one of the ganu core utils to do a where is Zero ad to search for the location of a binary on the system titled zero ad and there is user ben zero ad So that would also tell you if zero ad was installed And of course, this is not just arch related and pacman related If you're on a debian based system or an aboon tube based system You can do the same thing with apt as self instead of doing dash q q You would do apt list space dash dash installed to get a list of all your packages and then once again grep For the package name that you're looking for one of the problems that you often run into on linux is permission problems For example, if I do an ls to list all the files in my home directory right now You can see I've got this file here test dot txt. It's owned by root So that file is owned by root meaning my user my home user the dt user He can't really do anything with that file. He has no permissions to edit that file And you often run into this problem You'll open in a text editor a file that's not owned by you and then you go to try to edit it and then save it And the editor will complain you can't change this file. You don't have permission. Well, what do you do? Well, what I would do since I know the command to change ownership of a file I would just do a sudo because we're changing a file owned by root I would sudo ch owned change owner to dt for test dot txt, right if I do that give it my sudo password And I do an ls again, you can see now dt owns this file test dot txt Another canoe cord you till command is the who am I command? Which will give you the name of the user that you're currently logged into For example, if I didn't know what the home user of this computer was but I needed to change a file to that home user I could do a who am I to look up that user I could even do a change owner and then I could do dollar sign and then wrap that in parentheses who am I to change, you know test dot txt And that would also Change test dot txt to whatever the value of the who am I command is which in my case is dt One of the things that often happens is you know with bad updates sometimes your desktop environment Is broken, you know your desktop environment or window manager Especially if you only have one desktop environment or one window manager installed An update happens and that desktop environment or window manager is broken meaning you cannot use it yet You can't log in all you have is the command line All you can do is go to a tty essentially a terminal And from there you need to fix your problems. Well, if you don't know any of these good new core utils You don't know how to use some of the terminal based text editors like vim or even something like nano or micro Then you're in a lot of trouble. So do you need to learn linux to use linux to be a linux user? No, not necessarily because again, you don't necessarily have to fix your problems, right? Even though I want to fix my problems you can run into all of these situations where you have a bad update Things are broken. You know what? You could just download a new ISO and reinstall You'll be back up and running in a few hours. You'll be fine for me If I know the problem and I can solve it within just a few seconds from a single terminal command That's the route. I'm gonna choose now before I go. I need to thank a few special people I need to thank the producers of this episode gave james matt paul steve west archaic armor dragon commander angry george lee Matthew met those Nate or young paul peace archer fedora realities were less red profit roll and so last 18 ran tools devler working to an abound to and willy these guys They're my high steered patrons over on patreon without these guys this episode of distro to would not have been possible The show's also brought to you by each and every one of these fine ladies and gentlemen 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 if you like my work I want to see more videos about linux free and open source software Subscribe to distro tube over on patreon. Peace guys