I have been using
Code: Select all
Code: Select all
sudo haltluan0ma wrote:I use "sudo init 0" to shutdown. save some typing.
Yes, that is true for Linux on the pi, but it can be very different for other similar operating systems. Here is just one example. Take Solaris UNIX for instance where you only want to do a Halt as an absolute last resort. That is why it is good practice to use the command that offers the cleanest shutdown among various Linux/UNIX operating systems so you don't make a fatal mistake:penguintutor wrote:Halt actually calls the shutdown command.
as taken from the Linux man page for halt:
"this simply invokes the shutdown(8) tool with the appropriate arguments"
This is very common in the corporate world. In my last few positions I worked with other system administrators who were many times simultaneously logged into the same machines from various locations in the building. In my most recent position we had 100 UNIX/Linux servers running a myriad of different applications, and all kinds of people were logged in from simple terminals simultaneously (system administrators, software developers, software testers, users running applications, outside vendors installing or running applications or repairing hardware, etc.).penguintutor wrote: It's true that the shutdown command can be used to send out a message to users about the impending shutdown, but how many people manage a system where multiple users are connected via a terminal / command shell session these days?
Do you have any source for this information? I have checked and I cannot find anything about an unclean shutdownandrum99 wrote:You should not get in the habit of using 'sudo halt' to shutdown your Pi as on other UNIX systems this performs an immediate unclean shutdown
How about this:SimonSmall wrote:Do you have any source for this information? I have checked and I cannot find anything about an unclean shutdown.andrum99 wrote:You should not get in the habit of using 'sudo halt' to shutdown your Pi as on other UNIX systems this performs an immediate unclean shutdown
I suggest that you give it a try. Get a job as a system administrator and make sure that this is the very first thing that you do on your first day at work. To kick it up a notch, open a bunch of terminals to various servers; a very common every day task for a system administrator (Open terminals to some Linux servers, Solaris servers, HP-UX servers, and throw in a couple AIX servers as well). Now run the halt command on all of them. The next day, when you are told to hold the lettuce on the Whopper you are making at Burger King, it will give you plenty of time to ponder what happened.SimonSmall wrote: Do you have any source for this information? I have checked and I cannot find anything about an unclean shutdown
No, halt takes very limited options, many of them dangerous. shutdown is the only method that allows to specify a time delay and message, and the only method that would be acceptable on a production server. (In a non-emergency.)SimonSmall wrote:* Using sudo halt with additional parameters can provide the message and other options to shutdown
There is a difference between "halt -f" (instant halt) and "poweroff -f" (instant poweroff). The Pi can have the SoC put into a low-power state.* The Pi cannot have the power turned off by the software, so halt / poweroff does not matter
Suspect that will get you fired regardless of whether you do a clean shutdown or not.Now run the halt command on all of them.
you have to power cycle it though on the later boards there is a reset headercantfindausername wrote:Sorry to take this topic on possibly another tangent, but once we've sent the shutdown command and its just sat there with the red PWR light on, how can we restart it? Is it a case of unplugging and plugging back in? Reason I ask is because I want it all hidden, so pulling power is not going to be easy. Is there any other way to restart the pi after shutdown?
Thanks RaTTuS for the reply. So sending the 'sudo shutdown -h now' will send it to a sort of hibernated state, which you can then reboot/restore from with the -r switch? And while its in the hibernated state you can still ssh to it?RaTTuS wrote: you have to power cycle it though on the later boards there is a reset header
but if it's hidden away then you don't need to
sudo shutdown - h now
sudo shutdown -r now
to reboot it.
Actually quite a few. Since one of the goals of the Raspberry Pi Foundation is to get them into classrooms, I could see a case where an entire school could be logged into one Pi.penguintutor wrote:how many people manage a system where multiple users are connected via a terminal / command shell session these days?
Users browsing this forum: markost and 27 guests