The caret is mightier than the up arrow

I learned a fun bash trick about a week ago that I thought I would share. In a bash shell you can use the caret ^ symbol to find and replace a sequence of characters in your previous command.

For instance if you type:

sudo systemctl restart httpd

and then want to look at the status of the httpd service all you need to do is:


Bash will look at the last command in your history and replace the first occurrence of “restart” with “status” and run the new command.

Over the last week or so I’ve found that I get the most use out of this trick from my atrocious spelling. More often than not I spell “systemctl” as “systemclt”, or instead of “sudo something” I type “sodu something.” Using the caret syntax I can quickly fix my spelling mistakes in the command line without having to retype long strings  that had a couple of letters out of place.

The other thing this is useful for, is to show off your awesome command line skills and see the looks of adoration you get from your fellow Linuxy people. In fact, to be honest, that is probably the best reason to learn these kinds of things. 🙂

So next time you are about to press the up arrow and fix a spelling mistake, or change a command option try using the ^oldstring^newstring trick instead.

Till next time

— Luke


I’ve been spending quite a bit of time learning about LXD/LXC containers on Ubuntu. There is a lot of really good information available about how to get started with these containers so I’m not going try to reproduce that content here, however, I will provide links at the bottom that I think are relevant to learn more about LXD and LXC.

Below I outline what it is that I like about LXC these reasons are also the driving factors behind my decision to use LXC for web hosting as opposed to other container technologies. Though I should note that LXC and Docker are not mutually exclusive. If you are comfortable using Docker you may want to consider using both of these technologies.

Continue reading “LXD/LXC”

Lets talk about Containers

So, lets talk about containers.

Lately, I’ve been spending quite a bit of my time trying to learn as much about containers as I can. Truth be told I don’t really like containers, for the most part I think they tend to add an unnecessary layer of complexity into my infrastructer and become just one more thing to firewall, patch, and maintain a separate lifecycle for. However, it seems that I am in the minority opinion regarding this technology so I’ve been making an honest attempt to learn about the various container technologies and see if I can apply any of it to my day to day activities. I am open to the possibility that, maybe, I haven’t put in enough work to gain an appreciation of Docker, or LXC, or Atomic, or CoreOS, or whatever other new fangled technology these young folk are into 🙂 To that end I’m hoping over the next few months to identify some portion of this site that can be moved into a container to find out what I’ve been missing! Who knows maybe I’ll find out I like containers.
Continue reading “Lets talk about Containers”

Working with logical Volumes (part 3)

Following this tutorial assumes that you have followed along with the other two parts in this series. However, if you already have some familiarity with Linux you should be able to follow along.

Working with logical volumes (part 1)

Working with logical volumes (part 2)

Add a disk to the volume group

One of the great things about lvm is that you can add and remove physical volumes on the fly without data loss and without interrupting services.

If you haven’t already done so, add a new hard disk to your virtual machine. I created an additional 10 GB disk but you can make the disk any size you want. It doesn’t have to match the previous disk that we created.

Continue reading “Working with logical Volumes (part 3)”

About the ad’s

Why are there suddenly ad’s on this site?

So, recently I enrolled this site into Google’s AdSense network. It’s something that I really didn’t want to do, and am still a little torn about it.

I don’t like ad’s on web pages for a number of reasons:

  1. I think pages with ad’s feel less credible. So I’m going to try to limit the number of ad’s on each page to one or two. ( I know there are some with more than that right now… I’m still experimenting with how it works.)
  2. They can be annoying.
  3. The advertisement revenue model rewards click bait that generally has crap content.

So why did put ad’s on my pages? I have a few reasons for doing so that I hope the two or three people who read my blog regularly this can empathize with.

  1. The cost of keeping this site up and running is not insignificant. Hosting charges add up and I’m hoping to generate enough revenue to break even.
  2. It’s the easiest way to fund this account at the moment. I’ve kicked around the idea of using Patreon and I still might, but for now I’m going to stick with the advertising and see how it goes.

If you notice an ad that is offensive or if you find them too distracting let me know in the comments and I’ll try to either refine the placement of the ad’s or in the case that something is offensive I will do my best to remove it.