Command Line

Let’s Learn About Halt

Today’s article is about the halt command. The reason we’re writing about the halt command today is because I was halfway through another article before I realized I’d already written an article on that subject. So, this is going to just be a nice, easy article.

And, yes, yes I did write more than half of an article that I’ve already written. I ain’t even intoxicated!

The command we’re looking at using today is called ‘halt’. For such a little command, here’s an interesting post about the difference between halt and shutdown. And, if that’s not enough, you can read the other answers and comments on that page. 

Anyhow, halt is described like this in the man page:

halt, poweroff, reboot – Halt, power-off or reboot the machine

Of those three, we’ll just be covering the halt. Yes, the man page contains all three in just one page. They’re all related. As I said, we’ll just be covering the useful features of halt command today.

And, without further ado…

The Halt Command:

This article requires an open terminal, like many other articles on this site. 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.

Once you have the terminal open, the first use of halt would be just to halt the system:

halt

That will halt your CPU. It probably won’t shutdown your computer all the way, it will just stop it. So too won’t the -f (force) flag. If you force it, it just stops the CPU. It looks like and requires sudo:

sudo halt -f

Finally, of the options we’ll cover, is the -p flag, and the -p stands for poweroff. It’s just another way to shut down your computer, and it obviously looks like this:

sudo halt -p

Those are about the only ways you’re ever going to use it, if you use it at all. It’s not a command that you’re likely to bump into but now you know it exists and how to use it.

Closure:

There you have it, another article. This one covers the halt command in Linux. It’s not a major article, but I needed one in a hurry – just to ensure there’s one scheduled. While my health is mostly returned, I’m still not so caught up that I have a bunch of extra articles. Feel free to step up and write one or two!

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

Short: The Halt Command

Today's article is intentionally short because we're simply going to learn about the basics of…

8 hours ago

Installing Flatpaks In Linux

Today we're going to have a pretty easy article where you'll learn about installing Flatpaks…

2 days ago

A Quick Look At The Shutdown Command

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

4 days 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…

6 days ago

View Detailed Hardware Information

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

1 week ago

How To: Install Wine In Lubuntu

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

1 week ago