Day to Day with Linux

Most (probably all) distros provide some sort of graphical shutdown widget. But really, if you're shutting down or rebooting, why worry about the screen space?

Even though my distro has a graphical shutdown dialog, I usually just pop open a terminal and type sudo reboot or sudo poweroff (after making a backup, of course, 'cause all my shtuff lives in RAM). To me, that's actually easier than using the mouse.
 


It depends on your distro and distro, as mentioned above. In my signature is a link to learn how to ask a good support question. That will help you more than anything else right now.

There should be an application menu with the options to shutdown, reboot, and log out.

The terminal is easy and fun, even if you're intimidated by it at first. It's rather intuitive much of the time and can be faster and easier than using a GUI. In some instances, you don't even need sudo with the reboot or poweroff commands.
 
Shutting down Linux

At this point you should have installed Linux, and you've looked around at what you have. And then when you're finished you'll have to shut off your computer. Actually, there are computers that are never shut off. Imagine if your ISP shut off the computer every night! The Internet is a 24/7 business so that wouldn't be practical. There are also people who probably just shut off their monitor. As you probably get some sleep occasionally, so we should maybe let our machine have a rest too once and a while. For this, we'll use the shutdown command

As anyone who's used a computer knows, if you shut off you're computer before you've finished saving work, or if there's a power outage that shuts it off for you, data will be lost. At first, if you shut off Linux incorrectly or there was an inopportune thunder storm and you lost electrical power, you could do severe damage to your Linux file system. That will very rarely happen these days, but you should always use the shutdown command when you want to shut off your computer. Linux will tell you about it if you don't - it will run a check on your hard disk automatically when you use it again. If you have a big hard disk, you might as well go and make yourself a sandwich because it's going to take a while. Linux will also run a routine check every once and a while automatically. You also have our permission to fix yourself a sandwich in these cases too.

Shutdown a single computer

The most common way of shutting down a single user Linux system is for you as root to issue the command:

Code:
shutdown -h now

You use this when you plan on shutting your computer off at that moment, as opposed to some later time.

Linux is going for system halt NOW

It will start to shut off programs that you're computer is using and you'll see it all happening. That's because Linux is a transparent system. It lets you see everything it's doing. It won't give you a simple message telling you to wait and then another one telling you you can shut it off now. If something is causing a problem, it will tell you about it when it starts up and when it shuts down. That way, if you are having a problem, you may be able to track it down. If you don't know how to solve it, you can tell another person what you saw and he or she may be able to help you.

With the shutdown command, you must wait until you see the message:

System halted
Power down before you shut off the computer.
Re-booting the computer

Rebooting Your Computer

Code:
shutdown -r now

If you have installed a dual-boot system and you want to use the other operating system, (why would you want to do that?) you would use this command. You will get a similar message as with the -h (halt) option that will say something like:

System going for reboot NOW

The basic reason behind all of these messages is that Linux was conceived to be a networked operating system. You have people at workstations on the network busily doing their work. The last part of the shutdown commandnow is fine for a single-user home PC, but on a network system this would be changed to indicate a time. That way people would have a chance to finish what they were doing before the system went down for maintenence. Using 'now', in a network, would probably be hazardous to the health of the person who sent that command.

The next time you shutdown your system, you may want to try using some time options instead of just now. For example, you may want to try shutting down the computer at a given time.

Code:
shutdown -h 20:01

Which will shutdown the computer at 8:01 PM. You could also try:

Code:
shutdown -h +5

That shuts down the computer in 5 minutes time.

Now you know the correct way to shutdown your Linux system.
Loved to switch to linux !
 
I tried (on Debian) “shutdown -h now” and I got this:
bash: shutdown: command not found
 
Last edited:
I tried (on Debian) “shutdown -h now” and I got this:
bash: shutdown: command not found
shutdown command is deprecated.
Replacement is systemcl poweroff
 
this thread is 12 years old, although much is still the same , some things have changed,
for debian based distros I use

sudo shutdown now [or you can use sudo shutdown to add a time ]
 
Hi, I thinking about "How it works?".

I know the command make some function, but how?

For example? How can work the "shutdown -h +5".
It's "actual datum from real time and give +5 minute to actual date time and save it to memory and when it is true activate the shut down command?
That's a tip... I'm not serious in this example... Really I don't know how it work on backend and that's it what interest me.

Or something else?

Really I'm interested in how it worksm

Where I can find information like that?

I am sorry but without information about how it works at back-end I don't understand the basic skill and functions.

I am interested in about how OS work but this information say me how can I OS use... Do ooh.

That's it.

Where I can find the information about how the OS worked? Because I don't find it. Every where are information how can I OS use.

But with out information how the OS work, I can't OS used effectively.
 


Members online


Latest posts

Top