Day to Day with Linux



I've never used a shut down command... must have been a thing back then. I go Menu Quit and click Shut Down and never have problems and always have my Tower plugged in to a power surge protection board.
m1212.gif
 
With poweroff... it turns off the computer, right now. That's it.

With shutdown, you can halt the computer, you can shutdown, you can reboot, you can notify any logged user that you are shutting down, and you "schedule" the shutdown, for example 1 minute or 5 minutes after notifying the users the system is shutting down.
 
shutdown -r now
Failed to set wall message, ignoring: Interactive authentication required.
Failed to reboot system via logind: Interactive authentication required.
Failed to open initctl fifo: Permission denied
Failed to talk to init daemon.

what happen this ????
 
Also, sudo halt -p will shutdown the filesystem & switch off the power too.
 
what happen this ????

Whenever you see messages like that, the operation you're trying to perform needs to be done with elevated permissions. So, be careful and know what the operation is going to do before moving further. You can always search online and in the man pages to find out what a command does - and, if you can't find anything on your own, you can always ask for help.
 
Whenever you see messages like that, the operation you're trying to perform needs to be done with elevated permissions. So, be careful and know what the operation is going to do before moving further. You can always search online and in the man pages to find out what a command does - and, if you can't find anything on your own, you can always ask for help.
I tried my best i can't solved it please help me
 
I tried my best i can't solved it please help me
In a terminal,
Code:
sudo halt -p
will close all files, shutdown the system, & power off your computer.

System commands need to use sudo, or the root account.
 
I tried my best i can't solved it please help me

These, or similar messages, are what you'll get when your account doesn't have permission to perform the activity. I was just expanding on this, making sure you know that this is true for some other operations.

As others have said, use sudo.

For example: sudo shutdown -h now

It will then ask you for your password. Type your password. If nothing appears on your screen as you type your password, that's expected behavior. Just type your password and press the enter button.
 
Its working bro sudo key word is must so thanks to all

Only use 'sudo' when you absolutely need to use sudo. Using sudo is basically running the command as an administrator. It can and will bite you in the butt.
 
You don't need the -h option for the "now" parameter,

Correct on that part.

...and the shutdown cammand doesn't work for debian unless you have installed it.

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
 

Members online


Top