A Meta Post: The State Of Linux Tips

There was one site before this one and we’ll just ignore that in favor of the current site that contains various Linux tips, tweaks, and tutorials. This is an article about the state of this site, linux-tips.us, and is a measure of progress. This is an article about where we started, where we are now, and where we’ll be in the future. Something like that… I should also disclose that this post was authored under the influence of rum.

I think it’s important to first mention what the goal is. It’s not a lofty nor noble goal. I set out to get some of my Linux notes online. My plan has been to write an article for every other day. So far, so good. I’ve even had some help along the way, for which I am forever grateful.

(Don’t worry, we’ll cover some ways you personally can help elsewhere!)

When I think of about a summary of how the site is doing, it’s just “Holy crap!” I didn’t expect the site to do as well as it has. I really didn’t. For example, the site already has an Alexa ranking. Many sites never achieve that level of use. I get a ton of traffic (to me) from search engines, so the site is legitimately answering questions and helping people solve their Linux problems. To me, that’s pretty sweet!

Some Linux Tips metrics:

  • About 400 of my hours have been invested.
  • We chew through 4 to 5 GB of bandwidth per month.
  • We average about 120, and growing, unique visitors a day.
  • 93 articles have been published.
  • That’s about 75,000 words.
  • Which would take almost 5 hours to read.
  • Some 207 tags exist.
  • Only 44 people have commented so far.
  • The longest article is about should you use Linux.
  • The highest ranking article is Screenfetch vs Neofetch.

If you recall, one of the reasons from moving from the old site was that Google hated the .gq domain name (it’s a ‘free’ or paid domain) and those domains are so full of crap content that no reputable email provider would let the email notifications though its filters.

On this site, Google straight up loves us, as do email providers. The ads are doing better than I expected, but not great. Then again, I have no frame of reference, so maybe the ads are doing great. Speaking of which, maybe you could opt to show ads on this site. They’re just Google ads. They’re mostly harmless.

Beyond that, in the past few months Google has shown this site in the results (not very high) like 40,000 times. Only 600 have clicked through, but that’s actually a pretty respectable click-through-rate. 

Bing, of course, is the exact opposite. They mostly refuse to index the site, regardless of what changes I make. I have no idea what I’m missing. To make it even more confusing, Bing kinda liked the previous site.

Linux Tips’ Future:

We’ve come a long ways since the first article six months ago. People keep participating, signing up for the newsletter, registering for the site, and writing articles.

When I started this, I said I’d keep it up for a year. At this point, I can say that’s pretty likely. In fact, if I were to speculate, I’d be inclined to say I’ll keep going even after the year is over.

As far as my notes go, we’ve just barely scratched the surface. Beyond that, there’s always new stuff to learn and share. So, it seems pretty likely that I’ll keep going. After the year is up, I may change the publication schedule a bit. 

I won’t make any commitments until I get there, but I’m enjoying the project and having fun with the hobby. The every other day publishing thing is a bit much, but it hasn’t made me burn out yet. I think a part of that is the lovely feedback that I get.

You can help:

How can  you help? Above every article are some links where you can easily share the articles on your favorite social media platform. It’s nice and easy. You can do that without investing much effort, just share with your friends and groups who are also tech-minded.

There is the donations thing, but I don’t really need donations. The site’s going to stay online regardless. Still, it’s there if you want. If you do donate, I’d consider it more a motivator than a source of income. Who knows, maybe I’ll save all the donations and we can decide on something fun to do with them?

You too can participate. Go ahead, register. It won’t hurt. Leave a comment now and again. A small number of you are coming in from Linux.org, but you can still comment here. You can even write an article. It’s not that hard. If I can do it, you can figure it out. Heck, you don’t even have to register to write an article. I’ll even do the proofreading, formatting, and scheduling.

Most of those ways mentioned above are things that motivate me, things that make me more inclined to keep going. If nothing else, I’ll certainly finish the year – but it’d be nice to be motivated the whole way. It’d be nice to keep going and stay motivated even after the year has ended. For whatever reason, the interactions and climbing metrics make me enjoy it more.

As I mentioned above, you can still do that whole whitelisting this site in your ad blocking extension. 😉

Closure:

Yup. It has really been a full fix months already. It has probably been a full year if you count the previous site. I’ve invested a ton of hours into this hobby. It is pretty fun, as well. I encourage you to hop in and get involved. If you don’t want to do so here, start your own site with Linux tips. The more the merrier. 

Thanks for reading! If you want to help, or if the site has helped you, you can donate, register to help, write an article, or buy inexpensive hosting to start your own site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.

How To: Find Out Which Kernel Version You’re Using

The Linux kernel‘s progress is marked by versioning, and this article tells you how to find out which kernel version you’re using. There are all sorts of ways to do this, but this article is going to just cover a few of them.

You might want to know which kernel version you’re using for when you ask for support. It may be that your hardware is best (or only) supported after or before a certain kernel. It may be that you want to know which kernel you’re using because you want to upgrade or downgrade the kernel.

For example, I recently didn’t want to switch to the new kernel. I saw that there was a kernel update, learned which kernel version I was now using, and promptly decided to return to an older LTS kernel. Yes, different kernel versions will have different support lengths. I opted for a more stable and consistent kernel as none of my hardware required a newer kernel.

There are any number of reasons why you’d want to know which kernel version you’re using. And, as stated, there are any number of ways to get that information. This article only covers some of them.

Find Out Which Kernel Version You’re Using:

This article will only show you how to determine which kernel version you’re using with the terminal. Of course, this means you need an open terminal. You can do so with your keyboard – just press CTRL + ALT + T and your default terminal should open.

With your terminal open, you can try:

The information is also contained in the output of ‘hostnamectl’, so working with grep you’d have this command:

You can also use cat on/proc/version in a command that looks like:

If you have screenfetch or neofetch installed, the output contains the kernel version that you’re using. An output from those would look kinda like this:

neofetch in action
Neofetch in action, showing the kernel version number. See? It’s all over the place!

So, there are any number of ways to find which kernel version you’re using. There are surely other ways to find the kernel version, so feel free to leave a comment letting us know how you find your kernel version.

By the way, if you’re having problem with your current kernel, your distro probably has at least the previous kernel installed and you can use that as a fallback. Even if it automatically deletes old kernels, it usually leaves at least one older kernel as a way to recover should the proverbial poop hit the aerator.

Closure:

See? That wasn’t so painful! It’s another article that’s said and done. We’re getting closer to the halfway point, but I’m legitimately having fun getting my notes online. I admit, I pretty gleefully monitor the increasing (or sometimes consistent) traffic. It makes me happy to know my notes are helping.

Thanks for reading! If you want to help, or if the site has helped you, you can donate, register to help, write an article, or buy inexpensive hosting to start your own site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.

Delete Directories From The Terminal In Linux

In your Linux journey, you’ll eventually want to delete directories as you do some housecleaning. Keeping your computer tidy makes you more efficient. Deleting directories you no longer need helps keep your system tidy. 

It’s easy enough to manage and remove directories while you’re in your graphic file manager. Though sometimes, if you’re managing files in the terminal, you might just as well learn to manage directories while you’re in there. It’s not too terribly difficult.

As an example of why this is worth knowing, you may be working with a headless system, something without a GUI desktop environment. In that case, you will have no choice but to delete directories from the terminal. It’s just something you’ll come up against as you learn file management.

Either way, being able to delete directories from the terminal is a skill that comes in handy, a skill that you should know. And so it should be something you have in your toolbox.

The tools we’ll be using for this article are rmdir and rm. They’re both basic commands that have existed since the earliest of Unix days, and they’re both useful commands today.

The rmdir command describes itself as:

rmdir – remove empty directories

And rm describes itself as:

rm – remove files or directories

So, with that in mind, let’s jump into the exercise.

Delete Directories From The Terminal:

Deleting directories from the terminal obviously requires said open terminal. If you don’t know how to open the terminal, you can do so with your keyboard – just press CTRL + ALT + T and your default terminal should open.

The first command is really simple. If it’s an empty directory that you want to delete, you can use the rmdir command. As you read in the intro, the directory MUST be empty for this command to work. It’s also really simple to run:

So long as the directory is empty, you should be all set to go. If the directory you want to delete is not empty, you have to use the rm command. It’d look like this:

If you’re curious, the -r flag means recursive – it’ll even delete directories (and the files within them) within the directory. The -f flag means force – it should delete all files and directories no matter what and without any confirmation.

If you’re curious about either of those two commands, and there should someday be an article about ‘rm’, and for now you can just check the manual. You’d use either man rmdir or man rm. There’s not much to the first, and the latter is complex enough to warrant its own eventual article.

Closure:

Whoop! There it is! It’s another article in what’s turning into quite a long list of articles. If I’m going to keep this up for a full year, I might just as well have fun with it – and this was a nice, easy, and fun article. It’s mostly aimed at new users, as long-term users would hopefully already know how to delete directories from the terminal.

Thanks for reading! If you want to help, or if the site has helped you, you can donate, register to help, write an article, or buy inexpensive hosting to start your own site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.

A Little About The ‘tail’ Command

Today’s article is about the ‘tail’ command, seeing as the last article was about the ‘head‘ command. The tail command is the head companion’s counterpart. It only makes sense to cover one after covering the other, so today’s article will do just that.

Like the head command, the tail command has been with us for a long time, since pretty much the earliest days of Unix. Where head shows you the first lines in a file, the tail command shows you the lines from the end of the file. The man page describes tail as:

tail – output the last part of files

The tail command is pretty handy, often used by sysadmins to monitor log files. It can also be used like the head command to quickly check the contents of a text file, but it shows the material at the end of the file and not at the start of the file. That’s useful for remembering where you left off, for example. Anyhow, there are all sorts of ways to use it and this article will explain some of them.

Getting Started With The ‘tail’ Command:

I don’t think it’s all that important for this article (I’m not sure, I haven’t written it yet!), but we can start on the same page like we did with the head command. 

We’ll need to get started with the terminal open. You can do open your terminal with your keyboard – just press CTRL + ALT + T and your default terminal should open.

Once you get the terminal open, you can run the following two commands. Be sure to press the enter button after each of them and it will download a handy text file (just some random numbers) so that we’re all working on the same file.

With that complete, we can head on into the main article! It shouldn’t be all that long or difficult.

The ‘tail’ command:

Seeing as you’ve already got the rnd-num.txt file downloaded and your terminal is already open, I think we can just jump into using the tail command. If you just want to view last 10 lines of a file, you can use this command:

On the other hand, you can use the -n flag to show a specific number of lines. If you only wanted to see the bottom 5 lines, you’d use this command:

Assuming you’re all playing the home game, and just to show a good example, the output from the final command would look similar to this:

tail with the -n flag
As you can see, it only shows the last five lines of text. Pretty neat, huh?

Along the same lines, but not necessarily as useful, is the -c command. It works the same way it does in the head command, namely showing the specified number of bytes. If you wanted to see the final 5 bytes, the command would look like:

You can also use tail on more than one file at a time. If you do so, you can also use the -v flag and it will helpfully show the names of the files. The command would look a little like this:

The output would look similar to this:

tail being used on multiple files
It helpfully shows you the file names, which can be handy if you’re using multiple files.

One of the command options available with tail isn’t available with head. That flag is the -f mostly used for logs. What happens is you use the -f flag and then tail keeps running, outputting new lines to your terminal as the occur. In that case, it’d be something like:

That should show the last 10 lines of the log file and then update when new lines are added to the log file you’ve opened. Use man tail for more usage information.

Closure:

And that’s it! There’s another article for the site and another article closer to reaching the project’s goals. This article covers the tail command, seeing as the head command was covered in the last article. Feel free to leave a comment sharing how you use the tail command, or maybe even just a comment or question to motivate me.

Thanks for reading! If you want to help, or if the site has helped you, you can donate, register to help, write an article, or buy inexpensive hosting to start your own site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.

It’s Time To Learn A Little About The ‘head’ Command

Today’s article is about the ‘head’ command. The head command is a tool for viewing a file’s contents (or piped data), starting from the top. There’s not a whole lot to the command, and this will make be a pretty short article that’s fit for a beginner.

The head command has been with us since the heady days of Unix (See what I did there?) and is still a useful command today. In fact, the man page defines it like this:

head – output the first part of files

As you can guess, it does exactly what it says on the tin. There are any number of circumstances when you might want to use it, but I often use it when I don’t remember the exact filename I’m after and just want to see the first few lines of text as a reminder. There are better uses.

Anyhow, there’s not a whole lot to it, but I’ll show you the basics. Like we did recently, let’s see if we can all get started on the same page. So, open your terminal and enter the following:

Doing that will put you in the Downloads directory and will download a text file (it’s perfectly harmless) and it means we are all working with the same settings. You do not need to do this, but it could help.

About The ‘head’ Command:

Seeing as you’ve already got the terminal open, and that you figured it out without me having to repeat it like I do in almost every article, we’ll just jump right into the first command.

That should output the first ten lines of the rnd-num.txt file, looking something like this:

head in action
If you used the rnd-num.txt, your output should be the same. Pretty neat, huh?

That’s the first ten lines from the rnd-num.txt file or, in other words, the head of the file has been outputted to the terminal. This has a number of uses, including the pipe. You can easily pipe it to another command. It’d look something like this:

That’s not all that head can do, it can output a specified number of lines. To do that, you use the -n flag. It looks like this:

You can also use the -c flag to show the first x-number of bytes in a file. That’s not very complicated. In this case, we’ll look at the first 25 bytes.

You’ll find the output looks pretty similar to the output from the previous head command. You can even work with multiple files and the head command will handle them easily. If you’re going to use multiple files, you should use the -v flag.

It’ll helpfully preface the start of each file with the name of the file. In this case, the first line of the output would look like this:

head with multiple files
See? It’ll handily list the filename before listing the output.

See? Pretty helpful!

As shown in the image, you can easily deal with multiple files and whatnot, but there’s really not much more to be done with the head command. If you’re curious, you can also enter man head to get more usage information.

Closure:

Yup… There’s another article. This is about the head command, a command that’s not used often but worth having in your toolbox. If you use it more often, feel free to leave a comment explaining what you do with it.

Thanks for reading! If you want to help, or if the site has helped you, you can donate, register to help, write an article, or buy inexpensive hosting to start your own site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.

Linux Tips
Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License.