• We had to restore from a backup today after a failed software update. Backup was from 0000 EDT and restored it at 0800 EDT so we lost about 8hrs. Today is 07/20/2024. More info here.

Day to Day with Linux

Correct on that part.



Incorrect with that part.

1. You can't install it because
2. It is a symbolic link to another command, eg systemctl

Try typing

Code:
man shutdown

and you will get the usage.

The default timeframe with just sudo shutdown (or shutdown as root) is 60 seconds, described as "+1" in the manual.

Bear in mind, too, that Rob wrote this tutorial 10.5 years ago, so cut him some slack with -h not being necessary, it undoubtedly changed over the years.

Cheers

Wizard
Respectfully, you could install it by creating the symbolic link yourself?
 


...you could install it by creating the symbolic link yourself?

You certainly can create a symbolic link yourself to provide that functionality, but you are not installing a package, and you would be duplicating a functionality that is already in Debian, and has been for years.

Hope that clarifies the subject.

Cheers

Wizard
 
You certainly can create a symbolic link yourself to provide that functionality, but you are not installing a package, and you would be duplicating a functionality that is already in Debian, and has been for years.

Hope that clarifies the subject.

Cheers

Wizard
I appreciate the feedback, i didn't say anything packages, yet i can see why you think "install" is not the right way to phrase making the symbolic link.
 
I think - if I'm totally honest about it! - that much of what we get up to in Puppyland would make most Linux user's hair curl with disapproval.

With "our Pup" being very much a 'hobbyist' distro, we employ a LOT of what would be regarded as "shady practices".......certainly stuff you're never taught about in official, or even semi-official tutorials. But invariably we get things working.....

.....which all goes to show that Linux itself is even more flexible than many veterans would have you believe. Not being tied to any kind of official package-management system DOES have its advantages..! :p

We just grab software from anywhere we can find it.....and 'tweak it' till it works.


Mike. ;)
 
Last edited:
If I am in Terminal, and wish to exit/reboot, I often use

Code:
init 6
Sounds like you're making your life harder than it should be. In any distro I've ever used or tried for a day or two the word "reboot" + Enter does exactly that. No need to stop and think "ugh, what was the command and the number? Sh*t, I forgot, now I have to Google it for a few hours". :D That plain and simple word "reboot" which means exactly what you need does it.
And no distro has ever asked me to use sudo in order to reboot, not even Arch.

As for the topic, I don't shut down my computer. I mostly suspend it to RAM (sleep). The only cases where I actually shut it down is to replace hardware, to clean it from dust or when I'm going on vacation for longer than 2 days.
 
Sounds like you're making your life harder than it should be.

Not particularly.

reboot - 6 letters
init 6 - 5 letters and a space = 6

Same length, and "init system" makes for easy remembering.

shutdown - 8 letters
init 0 (zero) - only 5 letters and a space = 6

So shorter.

On

And no distro has ever asked me to use sudo in order to reboot, not even Arch.

You have not tried enough distros :)

If you have tried and used regularly as many distros as I have, you learn "Never say never".

Arch-based distro Artix has

Code:
Artix-MATE-HDD:[chris]:~$ reboot
 * openrc-shutdown: you must be root

and so sudo must be used in it

(Artix Linux is a fork (or continuation as an autonomous project) of the Arch-OpenRC and Manjaro-OpenRC projects)

That being said, I have another dozen or so Arch-based distros, and I use reboot for them.

But wherever the init commands are recognised, I use them.

Cheers

Wizard
 
It's odd that this thread is titled, Day to Day with Linux and the only thing I've read in this thread is a debate on using Terminal to shut down the computer. I guess there is nothing else to do day-to-day on a Linux system?

Right, wrong or indifferent, I just sudo shutdown or sudo restart. But it's not a server and no one else is on my network.
 
Last edited:
I check my email with Thunderbird, surf the Net with Firefox-ESR, and do office stuff with LibreOffice - that's about my extent of Day-to-Day with Linux - oh occasionally run sudo apt update to check for updates
 
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.
Awesome start.
 


Top