Find Your Last Boot Time In Linux

It’s a weekend so today’s article will be short and easy, an article for when you want to find your last boot time in Linux. If you want to know when you last booted your computer, there are many ways to get that information. We’ll just cover one way…

We’ve covered a couple of ways to do this in the past. If you want, you can read the following article:

When Did I Last Reboot My Linux Box?

I wrote that article more than two years ago. It was one of my earliest articles. In that article, I covered a couple of different ways that you can find out when you last rebooted your Linux computer. 

In that article, we covered commands like:

There are some advanced commands you can use, so do read the previous article to learn more about how you can find your last reboot time.

In that article, I also mentioned that you could see how long your computer has been on since the last reboot with the uptime command. That’s simply done:

Speaking of the uptime command:

How To: Find Your Uptime In Linux
The Meaning Of “Load Average” On Linux?

Those articles might be of interest. This is a simple article, but it does allow you to read quite a bit more related content.

Find Your Last Boot Time In Linux:

You guessed it. We’ll be doing this in the terminal. That means you’ll need an open terminal. If you’re not sure how to do that, look in your application menu or press CTRL + ALT + T and your default terminal should open.

For this article, we’ll be using the who command. You can check the man page with man who to learn more about the command. If you do that, you’ll learn that the who command is described as:

who – show who is logged on

That may not be as descriptive as it could be. If you just run the following command, you’ll be able to see everyone who is currently logged into your system. That’s just this command:

That simply tells you who is logged in. Your output might look a little like this:

As you can see, I am logged in both on tty7 (the desktop) and tty3.

If you did check the man page, you’d have possibly seen the -b flag. That flag is described accurately:

-b, –boot
time of last system boot

See? Now it should be obvious why I’ve chosen to write this article about how you can find your last boot time with the who command. The command is simply:

Which will output something similar to this:

See? That’s all you need to know if you want to find your last boot time! It’s not all that difficult to get started with the Linux terminal. This is a command any Linux user can learn. It’s also a pretty easy man page to decipher. So, that’d be good for new users as well!

Closure:

It’s a weekend and I’m lazy today. So, you have an easy article. It doesn’t have to be all that easy. I gave you plenty of links that you can (re)visit. Visiting those links will also show you how much the site has changed – specifically with how I write the articles. This particular article is a lot like how I wrote many of the articles, but I’ve been mixing it up quite a bit. I was just really in the mood for an easy article today, so you got this one about using the who command to show when you last rebooted your system.

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 site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.

How To: Find Your Uptime In Linux

This article will do a bit more than help you find your uptime. There are a number of other thing that’ll be covered, but they all have to do with your uptime.

So, what is uptime? Uptime is how long your system has been up and available. It’s a useful metric, especially if your system is public facing or providing some sort of service that people depend on. In fact, Wikipedia has a definition!

For example, it’s a metric that matters a great deal in web hosting

That link is a link to my small hosting offering, but scroll down to the bottom at said link and you’ll see a link to check the uptime. In fact, I’ll save you a click and you can just click here.

That link is one way of examining system uptime and availability over the internet over a period of time that’s expressed in a pretty manner. You too can find the uptime of at least the system that you’re using, but we won’t be covering pretty graphs or network availability.

In this article, you’ll find your uptime by using the terminal. We’ll cover a few different ways as well as examine the uptime command.

By the way, you can just type man uptime and see how to use the command. It’s not exactly complicated. Anyhow, uptime defines itself as:

uptime – Tell how long the system has been running.

And that’s a pretty accurate statement. So, let’s examine that first!

Find Your Uptime:

For this exercise, you’ll need an open terminal. To open the terminal, just press CTRL + ALT + T and your default terminal should open.

Once the terminal is open, let’s start with the basics:

That’ll give you a basic output, along with your load averages. If you want a more easily readable output, you can just use the -p flag.

If you want to know when it’s counting from, when your system became available, you can do that. To do so, it’s just the -s flag.

That’s pretty much everything that the uptime command can do. That’s not the only way to find your uptime, however. For example, you can open top or htop and see your uptime. If you use htop, it looks like this:

htop showing the uptime
See? It’s right there! It’s in ‘top’ as well. Now you know!

You can also use just a ‘w’ easily enough. It too will find uptime it looks like this:

You can also use ‘screenfetch‘ or ‘neofetch‘ to get your uptime. If you have one or both installed, the commands would look like one of the below:

Both of those will find your uptime and display them.

As you can see, there are many ways to find your uptime. In fact, I’m sure I missed some ways that you might use. If you use a different method, or know of another method, please feel free to leave a comment below!

Closure:

Well, this is it. It’s another article. I must be approaching the halfway point. The goal is to keep this project going for a year and to reassess at that time. If it’s something that’s popular, beneficial, and I’m not burnt out, I’ll keep going with it. Maybe by then someone else will want to take over or help write some stuff? Who knows? We’ll find out at the end of the year!

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.

When Did I Last Reboot My Linux Box?

If you want to know when you did your last reboot on your Linux box, it’s actually pretty easy. This article explains how. I’m still not feeling quite up to snuff, so a quick and easy article is the call for the day!

You can run uptime in the terminal, and that will tell you how long your system has been up and running. The output will look something like this:

At this point, you could do the math and find your last reboot time. Of course, this being Linux, there’s an easier way to do this. This will be a quick (and easy) article and hopefully I’m doing a bit better tomorrow.

Find Last Reboot:

Like so many of these things, we need to start with the terminal open. You can do that by using your keyboard. Just press CTRL + ALT + T and your default terminal emulator should pop right up!

With that open, you can start with:

Which will give you an output similar to:

But, the command’s usefulness doesn’t stop there. No, no it does not! You can modify the command in a couple of ways to get some more refined response. Let’s say you only want the last three results? If so, you’d use this command:

This will give you an output like this:

You can also use ‘grep’ for your refining needs. Let’s say you want to know when you last rebooted in the month of May? Well, you can easily do that!

The output of which would look similar to this:

And, there you see it. As you can see, there were three reboots in the month of May on that box. This information may be useful for debugging reasons or even compliance reasons. How you use the information is up to you! Ain’t my job to tell you how.

Closure:

There. There’s your darned article for the day!

Seriously, yesterday’s article was really messed up. Fortunately, the kind folks at Reddit chimed in and were eager to help! The folks at Linux.org are usually good at catching the mistakes, of which there were many, but probably didn’t as the article is one from the old site and probably only skimmed it if they read it at all.

This leads me to think that I’m eventually going to have issues with getting an article up every other day. I’m still going to try, and I’ve done so since the start, but it’s pretty likely that I’ll eventually miss a day. I’ll try to take steps to not let that happen, but the real world is a fickle mistress.

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.