Day to Day with Linux



bob466

Well-Known Member
Joined
Oct 22, 2020
Messages
1,532
Reaction score
1,165
Credits
11,196
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
 

dos2unix

Well-Known Member
Joined
May 3, 2019
Messages
2,221
Reaction score
1,861
Credits
16,648
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.
 

azmabd

New Member
Joined
Nov 1, 2023
Messages
6
Reaction score
1
Credits
39
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 ????
 

wendy-lebaron

Active Member
Joined
May 3, 2023
Messages
516
Reaction score
176
Credits
6,994
$ sudo shutdown -h now
(as regular user, must give that user's password)

or

# shutdown -h now
(as superuser)
 

camtaf

Active Member
Joined
May 14, 2023
Messages
350
Reaction score
224
Credits
2,336
Also, sudo halt -p will shutdown the filesystem & switch off the power too.
 

KGIII

Super Moderator
Staff member
Gold Supporter
Joined
Jul 23, 2020
Messages
11,204
Reaction score
9,719
Credits
92,974
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.
 

azmabd

New Member
Joined
Nov 1, 2023
Messages
6
Reaction score
1
Credits
39
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
 

camtaf

Active Member
Joined
May 14, 2023
Messages
350
Reaction score
224
Credits
2,336
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.
 

KGIII

Super Moderator
Staff member
Gold Supporter
Joined
Jul 23, 2020
Messages
11,204
Reaction score
9,719
Credits
92,974
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.
 

KGIII

Super Moderator
Staff member
Gold Supporter
Joined
Jul 23, 2020
Messages
11,204
Reaction score
9,719
Credits
92,974
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.
 

Vimmer

Member
Joined
Nov 29, 2023
Messages
76
Reaction score
39
Credits
581
You don't need the -h option for the "now" parameter, and the shutdown cammand doesn't work for debian unless you have installed it.
 

wizardfromoz

Administrator
Staff member
Gold Supporter
Joined
Apr 30, 2017
Messages
9,769
Reaction score
8,629
Credits
43,740
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
 

wizardfromoz

Administrator
Staff member
Gold Supporter
Joined
Apr 30, 2017
Messages
9,769
Reaction score
8,629
Credits
43,740
@T/av-122 - English only on this website, thanks.

Welcome to linux.org.

Wizard
 

Members online


Top