Linux Crash Course
The Linux Crash Course playlist from Learn Linux TV is a beginner-friendly series of standalone episodes that make learning Linux simple. Each episode focuses on a specific Linux command, concept, or topic, explained in a way that’s easy to understand. Since every lesson is self-contained, you can watch them in any order and build your skills at your own pace.
In this playlist you’ll discover:
• Linux command tutorials with clear, step-by-step examples
• Beginner-friendly explanations of Linux concepts and features
• Bite-sized lessons you can watch independently
• Practical tips to help you feel more confident with Linux
Perfect for: Linux Beginners, Students, and Curious Enthusiasts who want to explore Linux commands and concepts without needing a full-length course.
✅ Easy-to-follow Linux crash course lessons
✅ Hands-on command line demonstrations
✅ Clear explanations of Linux concepts and topics
✅ Expert guidance from Learn Linux TV
Whether you’re brand new to Linux or just curious about specific commands, this playlist is your go-to resource for Linux tutorials, tips, and demystified concepts.
#Linux #LinuxCrashCourse #LinuxTutorial #LearnLinux #LinuxCommands #LinuxForBeginners
Curated by: Learn Linux TV (85 videos)
Currently Playing: Linux Process Tuning Made Easy: Understanding nice and renice
The Linux Crash Course series here on Learn Linux TV teaches you a valuable Linux-related skill in each and every video. You can watch most episodes in any order, and with over 60 entries in this series (and counting) there's no shortage of Linux Learning! In this episode, Jay will teach you some of the basics of tuning Linux processes with the nice and renice commands.
*Thanks to Akamai for sponsoring this video!*
*Support Learn Linux TV* by spinning up your own Linux server on their cloud platform ➜ https://learnlinux.link/akamai
━━━━━━━━━━━━━━━━━━━━━━
*📖 Switch to Linux with my latest book! (Available Now!)*
Thinking about making the jump to Linux? This step-by-step guide will help you choose the right distribution, install Linux with confidence! Purchase your copy here:
https://learnlinux.link/switch-to-linux
━━━━━━━━━━━━━━━━━━━━━━
*🐧 Save up to 30% on Linux Foundation Certifications*
Whether you're starting a Linux career or advancing your existing skills, Linux Foundation training can help you stand out in a competitive industry. Check out the available courses and certifications, and save!
https://learnlinux.link/get-certified
━━━━━━━━━━━━━━━━━━━━━━
*❤️ Support the Channel and Get Awesome Stuff*
Books, discounts, shirts and more!
- Switching to Linux Book (New!) ➜ https://learnlinux.link/switch-to-linux
- Ansible Course ➜ https://learnlinux.link/ansible
- Linux Essentials Course ➜ https://learnlinux.link/linux-essentials
- eBook Bundle ➜ https://learnlinux.link/ebook-bundle
- Linux Merch Shop ➜ https://merch.learnlinux.tv
- Linode Starter Credit ➜ https://learnlinux.link/linode
- Paid Assistance ➜ https://www.learnlinux.tv/request-assistance
*❤️ Support the Channel*
- Enjoyed the video? Your support keeps this channel independent!
- Become a Channel Member (Ad-Free & Early Access) ➜ https://learnlinux.link/join
- Support on Patreon ➜ https://learnlinux.link/patron
━━━━━━━━━━━━━━━━━━━━━━
🕐 Time Codes
00:00 - Intro
01:16 - Set up your own Linux server with Akamai! (Sponsor)
02:38 - Quick refresher on the ps command
03:42 - Understanding the output of the ps command
04:50 - Making sense of "niceness" values
07:13 - Example of changing the priority of a process in Linux
10:49 - Further exploring the renice command
12:22 - Setting process priority with the nice command
13:59 - Another key difference between the nice and renice commands
━━━━━━━━━━━━━━━━━━━━━━
*🎓 Learn Linux TV*
Your source for Linux-related Fun and Learning!
https://www.learnlinux.tv
https://community.learnlinux.tv
https://learnlinux.link/jay
━━━━━━━━━━━━━━━━━━━━━━
*🤝 Affiliate Notice*
Some of the links mentioned in this description are affiliate links. If you purchase through them, it helps keep the content flowing.
https://www.learnlinux.tv/content-ethics
━━━━━━━━━━━━━━━━━━━━━━
*⚠️ Use Content Responsibly*
Learn Linux TV shares technical content intended to teach and help you, but it comes with no warranty. The channel is not liable for any damages from its use. Always ensure you have proper permissions, follow company policies, and comply with all applicable laws while working with technology.
#CloudComputing #DevOps #Linux
Video Transcript
[Music] [Music] hello again everyone and welcome back to learn Linux TV and also welcome back to the Linux crash course series here on learn Linux TV in this series if you're new I go over an important Linux related Concept in each and every video and unless I tell you otherwise each video is completely Standalone that way you just watch whatever videos you need to watch in order to learn what you need to learn and that'll help you get on board with Linux even faster and this series is now over 60 episodes long so thank you so much to everyone for supporting learn Linux TV and this series I really appreciate it and today's episode what we're going to do is take a look at how to alter the priority of running processes on our Linux system I'm going to show you how to increase priority and I'm also going to show you how to decrease priority and this is very useful if you you have a process that you are running that's you know really important and you want to let the CPU know that scheduling that particular process is more important than others and that's exactly what I'm going to show you in today's video specifically we're going to learn the nice and reice commands now before we get into that though I need to take a moment and mention the sponsor for today's video If you're looking for a cloud provider that's affordable flexible and reliable then look no further than aami connected cloud with acomi Cloud platform you can spit up Linux servers quickly and the platform contains all the features you'll need to deploy full featured Solutions and using the marketplace you could easily deploy applications such as nexcloud Rocket chat Mastadon WordPress py hole Plex Jenkins and many more in fact there's over 100 applications available in the marketplace if you want to set up a custom Linux instance you could do that too all the popular Linux distributions are available on the platform including but not limited to Debian Centos Fedora Ubuntu and many others in fact even Arch Linux is available so check out aami connected cloud with the URL that you see on the screen right now which will do two things first it'll help support this channel which I'll really appreciate and it'll also get you $100 in starter credit to check out the platform and thank you yet again to aami for sponsoring this video all right so with that out of the way it's time to dive in to the nice and rece commands in Linux and I'm going to show you exactly how they work let's get started so let's get started and learn how to control process priority with the nice and rce commands and the first thing that I'm going to show you is how to determine the current process priority for processes that you might be running and to do that we're going to revisit a command from our past the PS command and with it what we'll do is use the- l option here and like you see here I see some information regarding processes that are running under my user account and to add something to this list to make it a bit more fun what I'll do is open up fimm doesn't really matter what process you open up and which process you control as long as you have permission to do so but anyway what I'll do is open up themm and now it's open and then I'll hold control and press Z to send it to the background now when I type P s-l you can see that I also have Vim listed there in the output but I mentioned that the goal for today's video is to teach you how to control the priority of a process so how do we understand from this output what the priority of a process happens to be well there's two columns that you'll pay attention to here in addition to the command name at the end we have the priority column and the niess column on each of these processes we have eight 80 for the priority and zero for the neness value but what do those numbers actually mean now the first thing to know about this is that by default the priority is going to be 80 if you do absolutely nothing also the default niess value is zero as well for most Linux distributions now if I was to enter the nice command just like this and press enter it's going to give me the default niess value which again most of the time is is going to be zero a value of zero effectively means that we're not increasing the priority of a process and we're also not lowering it either it's just at Zero it's not + one or minus one it's just zero there's no specific priority here a process will just be given zero by default if we don't decide to change that value now to help you understand these numbers a bit more a niess value of zero like I mentioned doesn't have priority good or bad but if the number goes goes up it's a positive number so goes from 1 to two and so on all the way up to 20 which is the highest it can go the higher it is the nicer the process is and what that means is that the higher the number the lower the priority and the more nice it is to other processes think of it this way if you have a process with a niess value of 20 it's pretty much the lowest priority that it could possibly be which is equivalent to somebody that's always letting someone else go in front of them in line or something like that they're just being nice to everyone else and in that case a value of 20 for niceness is the lowest priority that you can have a negative - 20 is going to be the highest priority or the highest niess value that you could possibly have now a neness value of -20 is going to be the highest priority that a process can possibly have think of it this way as the niess value goes down the more priority a process has and the higher the number the less priority a process has now when it comes to the priority value which we see here as 80 the higher that number as well the lower the priority so that could be 100 all the way down to zero for example so just like the neness value the higher that number the lower the priority now let's go ahead and see this in action and I'll show you exactly how this works and if it doesn't make sense now it's going to make sense very shortly I'll bring up the ps- L output again and what we want to pay attention to right here is the process identifier or P ID which is going to be different with each individual process now notice that Vim in this case has a p ID of 6848 so that's the one that we're going to work with in this example now on your end I don't recommend that you change the priority of a process on a production Linux server unless you have permission to do that but instead it's easier to just launch a text editor for example because that's not going to get in the way of anything and is the least likely to cause a problem obviously if you lower the priority of something that's critical that could have unintended consequences but for the most part it should be pretty benign to change the priority of them itself anyway let's take a look at changing the priority of a process and again I'm going to use Vim as an example and in order to change the priority I'm going to need sudu so I'll type that first now one thing I'll mention real quick about Pudu in regard to changing priority the commands that I'm about to show you you won't need sudu if you are lowering the priority of a process but you will need it if you are increasing the priority of a process just keep that in mind going forward but anyway the command that I'm going to start you off with is the rice command and what this command will do is enable us to change the priority of a process that's already running and then just like with most commands in Linux we're going to add an option which we could start doing by typing a hyphen just like you see here and what I'll do is change the priority to 10 next I'll add- P that allows us to Target a specific process identifier and the one that we want to Target this time around is p ID 6848 so I'll type that in and there's the completed command so what I'll do is run this command and then after I do I'll run ps- L again and we can compare that output from the new output so I'll press enter I'll type in my password right here and right here it says that the old priority is zero the new priority is minus1 so ps- L and take a look at that we have two differences here when it comes to the output regarding Vim we have 70 for the priority and now we have minus 10 for the niess value like I mentioned before a negative number is going to be a higher priority so by setting the priority to minus 10 I'm actually increasing the priority of that process and again that's why I needed sudu we also see that the priority value itself is 70 so it's 10 less than what it was before again a lower number is a higher priority and a higher number is a lower priority now what I'll do is change the priority and make it less of a priority and this time around what I'll do is not use sudu so I'll just type rice just like last time and then I'll set a priority of five that's a higher number so I'm going to lower the priority and again that's why I don't need sudu that's the last time I'll mention that and then- P just like last time and I want to execute this against 6848 which is vim so I'll press enter and let's see what happens now as we can see here the old priority was minus 10 we already knew that and the new priority is 5 so I was able to change the priority and again ps- L we see the new niess value and we also see the new priority value oh sorry I was just Consulting my own book actually you know that's something that I do from time to time because unlike what many of you might think I don't memorize everything that I teach you guys sometimes I actually look at my own book if I want to remember how to do something that I don't do every day but since I'm on the subject of this book check it out mastering auntu server fourth edition written by Yours Truly it's available right now and I think you're going to love it so if you're looking for an Ubuntu book to teach you everything that you need to know when it comes to managing real Ubuntu servers check it out so definitely check out the book I would really appreciate it anyway let's get back to the video so another thing that I want to show you guys is a different way to write the priority number and this is fairly common it's something that you will run into anyway I'll type rice and then I'll type- n-n means I want to provide a new priority number or a new niess value and it's a bit redundant depending on what you're doing but anyway what I want to do is lower the priority we set it to five so what I'll do is change it to six lowering the priority by one point and then I'll type- p and I'll use the same process ID yet again I'll press enter and just like it says the priority was five and now it's six and the higher the priority you know again the lower the number the more attention that process is going to get from the CPU so now the attention given to Vim will be a little less but generally speaking you're not going to notice any difference when it comes to a process like Vim it's already a process that's going to run fast anyway unless you have a ginormous file open inside of it so you're not going to see any actual difference here but imagine Vim is an important process for example maybe your web server process process you probably want your web server process to respond to web requests quickly I mean that's kind of the point right so you might have a use case that's more effective than just Vim I don't feel like anyone is going to be very impressed with the difference of a text editor but again just imagine that it's a very important process that's critical to your business and that's the one that you're going to increase the priority of now what I'm going to do is show you how to set a priority when you are launching a process for the very first time time for that we have a dedicated command like I mentioned the rice command is used for changing the priority of an existing process but if the process isn't running yet then the nice command basically the same but without the re at the beginning is going to allow you to set a priority of a new task and the syntax here is very similar to the previous command I'll type nice in this case and I could type it as- n kind of similar to how I just did it with with the rece command and I can set the new priority so let's say I want to create a process with a priority or niess value of 10 which is going to be a lower priority than the default the default is zero so we're 10 points less than the normal niceness value here so what I should be able to do is launch Vim let's see what happens so Vim launched and what I'll do is just hold control and press Z to minimize this application if you're curious I have an entire video that goes over the process of backgrounding a process so you can check out that video if you want to learn more about that but anyway contrl Z now it's in the background and I'll run ps- L again and we'll see the difference now recall 6848 was the process we already had and now we have process 7097 another instance of vim and as you can see it has a different priority and a different niceness value 90 and 10 respectively okay so another thing that I want to show you guys is that even though the Syntax for reice and nice are very very close there are some differences for example this is a valid Command right here I just used a random process ID for example I want to lower the priority to 12 and the process identifier is 8989 of course this won't work because I don't even know if I have that process identifier being used right now but the point is with the rce command was able to omit the dashn option and set the priority even without that now here's the thing if I was to for example use nice and then provide the value like I did with the reice command and I want to launch a new instance of them this isn't going to work unfortunately it tells me no such file or directory so what that means is when it comes to reice you could give it the niceness value straight away without dashn but with nice you will need the dashn to set the priority of a new process so in order for this to work I will have to add that so I'll do that now and then we have them yet again and we can see it down there we have P ID 7116 priority is 92 niess is 12 but all in all that's pretty much all there is to it now of course there's much more detail that I could go into but I've gone over everything that you need need to know when it comes to nice or rce so we've just gone over the basics of setting priority on Linux and I hope it was helpful and there's our video thank you so much for checking out this episode of the Linux crash course series I really appreciate it if you've enjoyed this episode then please do me a favor and click the like button to let YouTube know that you enjoy my content I would really appreciate that in the meantime I'm going to get started on some additional content for you guys be sure to sub subscribe to the channel to be the first to see the new content as soon as it comes out but in the meantime thank you so much for watching this video and I'll see you in the next [Music] [Music] one [Music]
Tracks in this Playlist