New Linux User: 10 Things I Wish I Knew When I First Started

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] thank you hello and welcome back to learn Linux TV have a fun video for you guys today what I'm going to do is go over 10 Things I wish I knew at the beginning of my Linux career things that I found out much later on that I wish somebody would have told me when I first started and you know what let's just dive right into it and go over my 10 things that I wish I knew at the beginning of my career now the first one I'm going to go over is something that might be obvious to a lot of you but again these are things that I wish I knew at the beginning of my career and I did discover this kind of early on but I wish I actually discovered this earlier on than I did and that is the concept that unused Ram is wasted Ram now think of it this way if there's certain files that you open constantly or you know a program that you open all the time then you're going to want to have that well load as fast as possible the things that you use on a regular basis you definitely want to have those launch as quickly as possible and be right there ready for you as soon as you're ready for it and the idea behind this is is that things launch faster from Ram than they do from a hard disk nowadays we have solid state drives like nvme drives and things like that so we're not really hurting for Speed here but Ram is still faster than even the fastest SSD available so even though we've had a lot of advancements it's still true that unused Ram is wasted Ram basically the way this works and I'm overly simplifying this you have a cache when it comes to memory on Linux and even though that cache actually takes up memory memory from that Cache can be absolutely provided to any application that needs it so if you have a lot of ram being used up by the cache you might be thinking wow I don't really have any memory left to launch even Firefox or something like that but the truth is anytime an application launches and needs memory then the Linux kernel is going to provide memory to that application even if that means taking something out of the cache the whole idea here is that the operating system should manage all of this for you and you shouldn't even have to pay attention to it now the thing is a lot of you guys are probably think thinking that this is a very obvious thing but it might not be as obvious as you think but sometimes this concept actually causes a negative opinion that's not really fair for example take the gnome desktop a lot of people accuse it of being bloated and just wasting memory but that's absolutely not true now if you install The Gnome desktop on your computer and then you launch no application you simply just log in you don't launch anything and then you look at the memory usage you might see a gig or more is being used but that doesn't necessarily mean that just because when you install The Gnome desktop your memory usage appears to be higher that the memory you know efficiency is lower actually it's the opposite The Gnome desktop is very fast and efficient and sometimes I wonder if this misunderstanding about Ram is part of the reason why people keep accusing it of being bloated now the next thing that I want to go over something that I wish I understood earlier on during my career and that is that sometimes High CPU usage is is a good thing and considering the fact that I came up in my career as a system administrator this is something that I ran into quite often now although I didn't know this at the beginning of my career now that I've had you know a lot of years in system administration after I was more seasoned I would have people call me up you know clients and things like that and they would be asking me things like why is the CPU always at 70 percent that doesn't seem right and what I would do is respond back to them well there's no issue you are paying for the server because you wanted to do work if it's 70 utilized well it's doing work I would be more concerned if the CPU was closer to zero percent utilized that often means that a process died or something that should be running isn't running because a server that has very low CPU usage I would argue shouldn't even exist I mean why are you going to spin up a Linux server if you don't have any work for it to do servers exist to perform tasks to do actual work so again if the CPU usage is low that's a big concern to me if it's on the higher side as long as it's under control that's not really a problem that means you're actually getting your money's worth your server is performing work which is why it exists in the first place now the third one is fairly simple but this is something that I didn't run into until years later when I was getting into Linux and the issue was this I had a server that was complaining that its disk was full however when I logged into it and I checked the actual available space on that server it showed me that there was plenty of space available so I was like wait a minute the alerting system is telling me that the disk is full but when I look at it there's you know plenty of space available so what's up with that at the time I didn't understand the concept of inodes now it's beyond the scope of this video to go into a deep dive detail about inodes themselves but basically you have to keep track of inodes as well as available space on your hard disks now most of the time inodes are not a problem if I know it's become a problem then usually that's evident of a bigger problem now the first time I ran into this I was actually maintaining an email server and for some reason that server stopped sending email so what I realized actually is that the number of files was astronomical I mean I don't even remember how many files there were but just imagine an email server that a lot of people use and then all of a sudden emails are stuck they're just not leaving the server so they keep stacking and stacking and stacking and next thing you know the server ran out of inodes and to overly simplify the I note issue here when you have a storage volume on Linux you have a certain amount of space available and that's not unlike any other storage volume I don't care if you're running Windows Mac OS you're already familiar with the fact that your disk Can Only Hold so much data but when it comes to inodes the number of files becomes a real issue so when that happens you could run a command like df-8 and it'll show you that you have a bunch of space available but when you go to save a new file it tells you that you're out of space and that actually seems like something that well flicks right I mean how could you have a lot of space available and you can't store a single file again inodes in this case what you do is you type DF I I for inodes and that'll tell you how many inodes you have available most of the time you'll have well over 99 percent when it comes to available inodes because most of the time this is never an issue again anytime this is an issue it's usually evident of a much bigger problem but I just wanted you guys to be aware of it because if you ever have a situation where a server is complaining that it's out of space but it doesn't appear that it actually is out of space definitely run the df-i command to check the inodes that could actually be the problem now the next thing that I want to go over is the fact that there's so many Linux distributions I thought it was a bad thing when I first started out with Linux I mean I didn't even know which distribution to choose and it made starting all that much harder so for the longest time I actually thought that the number of distributions that are available today I mean there's well over a hundred I thought that was a bad thing but what I wish I knew and understood at the beginning of my time with Linux is that having a bunch of distributions available is actually a great thing in fact it's a superpower now think of it this way when it comes to Mac OS or Windows they provide a user experience for you and you really don't have much of a choice when it comes to Mac OS they've designed the you know file menu how the windows are how applications open and other than maybe changing the color scheme or changing the wallpaper you really don't have much control over how to customize your desktop and the same is also true when it comes to Windows I mean sure there's some adjustments like I mentioned like color schemes and things like that so it's not like you don't have any option but you don't really have that many what if you really didn't like the user interface at all well on Windows and Mac OS tough luck you either use the user interface that they provide you with or just use a different operating system now to be fair I am aware of the fact that there's you know utilities to skin the user experience and things like that especially with Windows but in my experience when you do things like that you know something that the provider of the Opera operating system didn't intend for then well things aren't quite as stable and you could actually crash the entire thing I know because I've actually done it but when it comes to Linux it's fully modular that's why we have so many distributions so if you don't like the user interface of a Linux distribution then well stop using it and use something else if you're not a fan of gnome or maybe you prefer plasma or something like that you could simply choose a desktop distribution that centers around that desktop environment so basically having a bunch of distributions available means you have more choice if you try a distribution and you decide that you really don't like it that doesn't mean that Linux is a bad fit that it's not a good fit for you that just means you don't really like that distribution you can simply try a different one and keep repeating the process until you land on something that you enjoy using when it comes to Mac OS and windows you are pretty much just stuck with the UI like I mentioned the UI that they've provided you and I actually think that's a big weakness of those platforms now for the next thing that I want to mention I want to bring up lvm and this is actually the first of two times I'll be mentioning lvm on this list so I guess I gave you a bit of a spoiler but the first point I want to make is that you should use lvm now lvm itself stands for logical volume manager and it's a really big topic but it's not all that difficult to learn I have an entire video on this channel already that'll teach it to you but what lvm allows you to do is it gives you more control over your storage it's an abstraction of storage so to speak so you could do things like you know combine multiple disks together as one volume and it'll act like one volume and that's not quite unlike raid but don't confuse lvm with raid because it's not a raid solution at all what it is is an abstraction on top of your storage that gives you even more features and one of the biggest things about lvm that I like is that you could resize file systems online for example let's say you have a Cloud Server and that cloud server has a 100 gigabyte storage volume but for whatever reason you need to upgrade that maybe 100 gigabytes isn't really enough anymore you thought it would be enough but it's really not now what you could do obviously is set up a new volume and you could just rsync all the files over to that volume and do it the manual way there's nothing wrong with that but when it comes to lvm you could resize a storage volume online that means you could add a new virtual disk to a Cloud Server for example and you could add that to your lvm setup and then expand your available space to include that hard drive as well allowing you to grow your storage to meet your needs and you could do that without shutting down the server and that's the brilliant part about this because if you maintain Linux servers I think you'll really appreciate being able to do things like that without shutting it down now it's fully possible that if you do set up lvm on your server that you might not ever use its features maybe that's just not something you'll run into I use the example of expanding storage maybe that's just not something you'll end up doing in that case it doesn't hurt to have lvm on your server because it's not going to affect your performance but if you do have a use case for it you know sometime down the road I think you will absolutely appreciate the fact that you set up the server with lvm because it's one of those things that could come in handy now let's move on to the fifth thing that I wish I knew when I first started with Linux and I think this is going to help a lot of you out there that are complete beginners because you might be overwhelmed with all of the commands and things that you have to learn maybe you're thinking how do I memorize all this stuff so how exactly do I go through the process of memorizing all these commands well actually that brings me right to my point and the thing that I wish I knew at the beginning of my career is that you don't have to memorize Linux commands in fact nobody memorizes Linux commands at all now if you've been watching my content for a while you might actually think that I have all of these commands memorized I mean how can I even teach them to you if I didn't well the truth of the matter is there's going to be some commands that I use basically every single day so yeah those commands I absolutely have memorized but the only reason I have those memorized is because I use them every day but when it comes to Linux commands there's just way too many for anybody to memorize if your goal is to memorize all of them you are not going to succeed I mean sure you probably could memorize you know one or two use cases for each command if you really tried hard but considering how many options there are I really don't think it's possible in fact sometimes I actually consult my own books when it comes to how to run a specific command if it's a command that I just don't use all that often I will forget how to use that command and I will actually sometimes reach for my own book no I'm not kidding I will literally reach for my own books as my own reference sometimes when I want to remember how to use a command now obviously not everybody writes books but what most people do is they just have their own cheat sheets maybe they have some text files with their favorite commands in there and their favorite variations of those commands and they just look at those text files anytime they want to remember how they did something in the past some administrators will actually just check through the bash history on a server to find out how they did something you know last year or something like that something that they don't do often for example if you're the type of person that doesn't have lvm memorized do you want to expand a file system well in my case I don't even have that memorized I don't actually expand file systems every day so I'll never have a chance to memorize that but I have have done that a number of times and I have it written down in my notes so anytime I actually need to do that I'll just look it up and then I'll go ahead and do it and then later on if I do that enough times maybe I will memorize that command but if you're trying to memorize you know everything then just stop it's just not going to happen because you're human and you're just giving yourself a hard time now as a related aside to this I think something that really perpetuates the myth that you have to memorize all this stuff is the fact that well certification exams often force you to memorize a lot of things and I really don't agree with that when you are working with real Linux servers you always have access to documentation I don't care if you're working with an offline Linux server you at least have the Man pages there for you so you'll always have at your fingertips a way to look up commands and what they do now when it comes to certification exams they really do seem to expect you to memorize a bunch of things and like I said I really think this is kind of where this you know comes from but the thing is I mean they're asking you to memorize a bunch of things that you're probably not going to use by the time you become a real Linux administrator when I became certified I mean there were several things that I looked at like who would actually use this on a daily basis and how is this particular bash script even useful in the real world well chances are it's probably not there's a lot of trick questions when it comes to these exams and again they force you to memorize a bunch of things but I really feel like these certification exams are absolutely sending the wrong message in the real world we have documentation we have Man pages we have everything that we need right at our fingertips so there really isn't a need to memorize everything you're just wasting your time and also your sanity so moving right along what's another thing that I wish I knew when I first started well one thing that I think is really important is to have a backup distribution now the thing is what most people will do is settle on one Linux distribution as their tried and true distro that they use on basically everything and there's nothing wrong with that I mean we all have our favorite distribution but you should always have a plan B perhaps your main distribution someday just won't exist if that day was to come what are you going to do if you don't have a plan B then you're going to be trying to figure out which distribution you want to move to I'm sure some of you are probably thinking that your District of choice will never go anywhere it'll always be there it's a popular distribution that a bunch of people use and it's just going to be there forever however you'd be surprised I mean take sent to us for example I'm not going to get on a soapbox as far as whether or not I think their new distribution release cycle is a good thing or a bad thing but the fact is it did change whether you're against it or for it well it still changed it's still a change that actually happened for some people moving to sentos stream is just not something that some administrators wanted to do they just didn't feel like that particular type of distribution is something that they can actually be okay with so in this case you had sent OS something that everybody thought would always be the same would always be there and then all of a sudden it changed it's completely different right now and for some people they like it a lot better but for others it's just not something they want to consider using now in that situation any Linux administrator that has a plan B distro that they're always testing things on and you know keeping in their back pocket those individuals at that point were in a very good place because in that case they already have the next distribution decided upon because they had a plan B but for those of you out there that don't have a plan B and especially for companies that don't have a plan B especially when the Centos switch happened well they were left in a very very bad position they had to all of a sudden if they didn't want to go was sent to a stream test their software on a different distribution and then move to a different distribution and that's a lot of work but if you have a plan B distribution that you you know test things on every now and then then you're already a step ahead when it comes to moving to another distribution and you never know you might actually have to someday when it comes to Linux distributions nothing is guaranteed and nothing is Promised the distribution that that you're using today might not exist tomorrow and even if it does it could completely change and if it does you might love the change or you might hate it but if you hate it and you have no plan B well you're in for a lot of work just always have a plan B something in your back pocket that you could decide to use if you have to and I think you'll definitely appreciate having that next let's talk about git when it comes to Version Control git is my favorite Version Control solution but technically when it comes to the point that I'm about to make you could probably insert another version control system in here and it would still be true but the thing that I wish I knew at the beginning of my Linux career is that well git is not just for software developers I mean sure git is very popular with software developers and it's probably the primary use case but when it comes to system administration especially Linux Administration Version Control is awesome it's a great way to keep track of your config files just like developers do you could track changes to those files revert back to previous versions of those files so if you have you know can config files in the Etsy directory maybe even your Apache files for example you could actually put them in Version Control and then if something happens and something stops working you can simply revert everything back to a known working State now sure you don't want to include anything Secret in any Version Control repository for example don't put your you know private keys in there or anything like that just be very mindful of that but as long as you don't make that mistake I think Version Control you know get and things like git are very useful for Linux administration because like I mentioned you have a history of changes available at any time you need it you can go back to previous versions you could test new changes and then roll right back so learning git is something that I highly recommend that every Linux administrator does because it'll absolutely come in handy on my end I actually thought that Version Control was just for software developers and I ignored it for quite a while it's definitely something you'll absolutely want to take advantage of now speaking of being able to roll back to previous configuration did you know that lvm has a snapshot feature well actually I know that now but I didn't know that for quite a while I think I went for years before I actually knew that lvm had a snapshot feature and it's actually really good as I mentioned earlier lvm is actually an abstraction on top of your storage so basically you format your hard disk you install lvm on top of it and then after that you install whatever file system you want to have for your storage and sure I'm oversimplifying this but the thing is you could actually take a snapshot of your storage volume with lvm and then what you could do is try out I don't know a new piece of software and then you could revert the snapshot back or delete the snapshot just get rid of it if you don't want to save it and then everything is back the way it was now if you've ever used virtual machine snapshots before it's not completely unlike that it's actually very similar of course it's something that you have to learn but I highly recommend that you learn lvm and again I have a whole video on this channel already that gives you a deep dive into lvm and I highly recommend that you learn it especially for the snapshot feature it's just really really awesome now for the last thing on my list we're actually going to talk about lvm again but it's not so much about lvm it's about how you're backing up your servers specifically Cloud servers now if you maintain Cloud servers on your end then you definitely want to pay attention to this one now sure some of you may have already figured this out earlier on but you know some of you may not have I actually learned the hard way which is why I wanted to make sure that I put it on this particular list anyway what this particular point is is that you should always make sure you take all the individual volumes into account when you back up a server that may sound obvious but you'd be surprised I've actually seen some administrators that have a bunch of years experience actually get bit by this so to explain the situation what I'll do is give you a hypothetical example let's say for example you have a cloud server with a 20 gigabyte hard disk maybe I don't know you just thought that would be enough and maybe you took my advice and you set up lvm on that server so that way you could expand the storage and grow it online and benefit from additional storage anytime you wanted to so let's say that the server was starting to become full so you added another virtual disk and you added it to your lvm configuration and then you expanded to that second disk and maybe it happened again maybe you added yet another 20 gigabyte volume now you have three and you expanded everything to take into account those three volumes well so far that's a great way to use lvm that's actually one of the major benefits but when it comes to backing up that server a mistake that a lot of Administrators make is they only back up the first hard drive now think about that for a minute if you've added a few virtual disks to your VM and you've expanded lvm across those but you only back up one of those disks then you don't have the whole picture you're gonna have data on the other volumes as well so if you don't actually back up all of your volumes then you're not going to be able to restore or that back up now sure you should absolutely test your backups and if you did well you would know about this problem before it actually becomes a problem so there you go those were 10 things that I wish I knew at the beginning of my Linux career and there's going to be a whole lot of things that I wish I knew at the beginning of my career that's actually why I've created this channel so I could teach you guys the things that I wish I knew earlier on that's the whole point of this channel I just love to teach you guys things but anyway considering that I've been using Linux for a very long time now there's going to be a lot more things that I could have added to this list so if you want to see another video just like this one to go over even more things that I wish I knew at the beginning of my career then let me know in the comments down below and you never know I might do a follow-up anyway in the meantime thank you so much for checking out this video I really appreciate it definitely subscribe if you haven't already done so click that like button if you like this video and I will see you in the next video foreign [Music] [Music]
Info
Channel: Learn Linux TV
Views: 314,157
Rating: undefined out of 5
Keywords: Linux, gnu/linux, LearnLinuxTV, Learn Linux TV, LearnLinux.TV, Learn Linux, Linux Training, Linux Tutorials, linux tutorial, switch to linux, linux career, devops, devops career, system administrator, sysadmin, it career, it learning, linux servers, cloud computing, solutions architect, linux tips, top 10, computer science major, linux server, linux administrator, learning linux, linux for beginners, free software, linux tips and tricks, computer science
Id: HIJ6LixbcAY
Channel Id: undefined
Length: 23min 31sec (1411 seconds)
Published: Thu Mar 30 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.