Tutorials

Let’s Reboot Your Linux Computer

Today is another article with one of those things you probably already know, it’s about how you can reboot your Linux computer. Specifically, we’re going to reboot from the terminal. You can use the GUI to reboot easily enough, but if that’s frozen and you don’t really want to do a hard restart, you might as well reboot it if you can.

If you can’t reboot your computer because it appears frozen, consider the Magic SysReq Keys. (More specifically, the REISUB method.)

If you aren’t already aware, there are all sorts of ways to reboot your Linux computer. Like oh so many things in Linux, there’s a multitude of ways. We’re just going to cover a few of them, because you really don’t need to know more. Well, if you do need to know more,  you probably already know those ways to reboot your Linux computer!

It’s also another fairly simple article. That’s good (for me) as it’s a bit like work lately and I don’t want the site to really be about work but rather being about a hobby. If it’s work, I wanna get paid… 

This is also useful information if you’re working on something remote. You don’t want to shut that system down and have to have someone go physically turn it back on, so you reboot the system – making sure to reboot the right system and not the system you’re physically using. I’ve done that more times than I care to share – and I’ve done the reverse as well. It’s seldom good if you enter the reboot command and immediately follow it with a verbal, “Oops.”

Reboot Your Linux Computer:

This article requires an open terminal, because we’ll be learning how to reboot your Linux computer from said 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.

With your terminal now open, let’s start with the easiest of the commands to reboot your Linux computer:

reboot

With some distros, that’ll be all you need. With others, you may need to have elevated permissions. This is also often true if you’re connected remotely, via SSH. So, in those instances, you’ll need to preface it with sudo and use your password when asked. Like so:

sudo reboot

If you want,  you can also use the shutdown command. That’s pretty easy, you can just use:

sudo shutdown -r now

The -r flag tells the system to reboot and the ‘now‘ means to do so right now – immediately. You can play around with that ‘now’ bit, like so:

sudo shutdown -r 1

Instead of ‘now‘ you’ll see there’s a ‘1‘ and that’s how many minutes you want to wait before rebooting the system. You can change that to any number you’d like, I suppose.

Finally, you can use systemd to reboot. Why? Because of course you can! It’s systemd, and you can do anything with it! (Kinda like zombo.com, I guess.)

sudo systemctl reboot

That’ll happily reboot your Linux computer, all nice and neat and proper. It does exactly what you’d expect it to do, so there’s that.

Closure:

There you have it. You now have a few ways to reboot your Linux computer from the terminal. There are other ways, including init or whatnot. You can also just use the GUI if you’re working locally. It’s Linux. There are all sorts of ways to accomplish a given task. That’s a good thing.

I find myself rebooting from the terminal more often than not, simply because I’ve already got a terminal open and it’s just as quick for me to type the reboot command as it is for me to go clicking around. I’m also often testing other systems and really don’t want to have to go fishing around to find the command, then click on some sort of secondary agree menu or the likes.

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.

KGIII

Retired mathematician, residing in the mountains of Maine. I may be old and wise, but I am not infallible. Please point out any errors. And, as always, thanks again for reading.

Recent Posts

A Quick Look At The Shutdown Command

This is going to be just a quick article about a command many of you…

23 hours ago

Setting Up Coding Environments on Linux for Educational Use

With so many strong attributes, such as robustness and flexibility, Linux stands as a powerful…

3 days ago

View Detailed Hardware Information

There are many tools for showing your hardware information and today we'll get to view…

5 days ago

How To: Install Wine In Lubuntu

Today's article isn't going to be complicated or long as we are going to cover…

7 days ago

Update Python Packages (PIP)

We've had a run of Python packages recently and you can tell that I'm a…

1 week ago

Save A Command’s Output To A File (While Showing It In The Terminal)

The title is the best I can come up with to describe this exercise as…

2 weeks ago