The officially official Devuan Forum!

You are not logged in.

#1 2022-01-30 18:03:35

Wavepirell
Member
Registered: 2022-01-30
Posts: 5  

[SOLVED] How do I shutdown

I've installed the server cd 1 version of devuan to evaluate it.

When i do
> shutdown -h now
i get
bash: shutdown: command not found

Doing research I found but my understanding is that this is the whole point of devuan so of course:
> systemctl poweroff
bash: systemctl: command not found

I'm having a hard time finding any associated documentation to these features.
Any help to guide me to related documentation greatly appreciated.

Thanks,

SOLUTION

How to shutdown devuan from cmdline

# su -
# shutdown -h now

Last edited by Wavepirell (2022-01-30 19:56:17)

Offline

#2 2022-01-30 18:22:14

Head_on_a_Stick
Member
From: London
Registered: 2019-03-24
Posts: 3,125  
Website

Re: [SOLVED] How do I shutdown

Try

loginctl poweroff

And also read my signature. *sighs*


Brianna Ghey — Rest In Power

Offline

#3 2022-01-30 18:25:48

Wavepirell
Member
Registered: 2022-01-30
Posts: 5  

Re: [SOLVED] How do I shutdown

Head_on_a_Stick wrote:

Try

loginctl poweroff

And also read my signature. *sighs*

Not sure what the sigh is about, the su worked for me equally as su -

Unfortunately however

root@devuan:~# loginctl poweroff
bash: loginctl: command not found

Last edited by Wavepirell (2022-01-30 18:27:12)

Offline

#4 2022-01-30 18:29:08

Wavepirell
Member
Registered: 2022-01-30
Posts: 5  

Re: [SOLVED] How do I shutdown

I should add I'm really am trying the minimal linux approach. (no gui, minimal server installed)

I'm used to cmd line for centos and dabble in debian and popos.

I'm technically not a noob, but I think in this OS I am encountering something brand new so I'm a bit lost

Offline

#5 2022-01-30 18:37:02

Head_on_a_Stick
Member
From: London
Registered: 2019-03-24
Posts: 3,125  
Website

Re: [SOLVED] How do I shutdown

Wavepirell wrote:

Not sure what the sigh is about, the su worked for me equally as su -

No, it didn't. Using just su leaves /sbin/ out of PATH and that's where shutdown is located. The *sigh* is because I've posted about this on these boards approximately 7,482 times and it is also featured in the release notes. roll

Wavepirell wrote:

root@devuan:~# loginctl poweroff
bash: loginctl: command not found

That command is supplied by the elogind package.

EDIT: https://wiki.debian.org/WhereIsIt

Last edited by Head_on_a_Stick (2022-01-30 18:38:19)


Brianna Ghey — Rest In Power

Offline

#6 2022-01-30 19:36:13

MiyoLinux
Member
Registered: 2016-12-05
Posts: 1,323  

Re: [SOLVED] How do I shutdown

Head_on_a_Stick wrote:

...I've posted about this on these boards approximately 7,482 times

I think it was more like 7,497 times? tongue


I have been Devuanated, and my practice in the art of Devuanism shall continue until my Devuanization is complete. Until then, I will strive to continue in my understanding of Devuanchology, Devuanprocity, and Devuanivity.

Veni, vidi, vici vdevuaned. I came, I saw, I Devuaned. wink

Offline

#7 2022-01-30 19:38:55

Wavepirell
Member
Registered: 2022-01-30
Posts: 5  

Re: [SOLVED] How do I shutdown

I tested both su and su - with poweroff, however seems like i did not do the same test with su - for shutdown since I assumed it wasn't there after the first fail.

In my original reply I was typing out every listing from /sbin # ls but then found shutdown was in there all along.

Thank you for your patience and for pointing me to the right direction.

---

I am sorry to hear that you have the issue of constantly pointing people to certain parts of the docs.
I currently, kid you not, have the same exact issue at work.
I tell myself that if it isn't working then I need to look for another solution, but that's the hard part.

Hopefully I can try to tell you what made me a dumb user here and perhaps it will find a solution:

First: I would never think to look at the release notes to learn how to shutdown

Let me go read them now:

Google search devuan release notes gives me https://www.devuan.org/os/releases
I don't think I am in the release notes yet.
Click install because it is the closest to the Home screen I think I would find
Oh there it is, on the "home screen"

Woah!
Problem one: Users don't read

Release notes are 7.5 screens long - Lots of useful information in there though

su

   The behaviour of su changed in Devuan 3 Beowulf. These changes persist
   in Devuan 4 Chimaera. Use su - to get root's path or use the full path
   to commands if you use only su. See the following for more information:
   -
   [17]https://www.debian.org/releases/buster/ … -variables
   [18]https://wiki.debian.org/NewInBuster -
   [19]https://bugs.debian.org/905564

Link 17 Broken
Link 18 is the gold

The su command in buster is provided by the util-linux source package, instead of the shadow source package, and no longer alters the PATH variable by default. This means that after doing su, your PATH may not contain directories like /sbin, and many system administration commands will fail. There are several workarounds:

    Use su - instead; this launches a login shell, which forces PATH to be changed, but also changes everything else including the working directory.

    Use sudo instead. sudo still runs commands with an altered PATH variable.

        To get a regular root shell with the correct PATH, you may use sudo -s.

        To get a login shell as root (equivalent to su -), you may use sudo -i.

Yeah I see what you mean now, thats going to be a hard piece of tidbit to bubble up to the users who are just trying the distro for the first time, or who aren't aware of recent changes in Debian (aka me)

Before investigating this I would have said, a page on the website explaining the su difference would help, especially if it could grab search results like how to shutdown from cmdline for devuan, but it feels like this change is a bit outside the scope of the distro's website goals.

That's tough, I'm not seeing a solution for the sigh.
Sorry. I tried.

Last edited by Wavepirell (2022-01-30 19:58:52)

Offline

#8 2022-01-30 19:51:29

Wavepirell
Member
Registered: 2022-01-30
Posts: 5  

Re: [SOLVED] How do I shutdown

For those coming here from the interwebs

How to shutdown devuan from cmdline

# su -
# shutdown -h now

Offline

#9 2022-01-30 20:40:41

golinux
Administrator
Registered: 2016-11-25
Posts: 3,137  

Re: [SOLVED] How do I shutdown

There is also this solution from fsmithred:

su was moved from the shadow source package to util-linux, and the behavior changed at that time. To revert to the old behavior (from man su):

echo 'ALWAYS_SET_PATH yes' >> /etc/default/su

Online

Board footer