The officially official Devuan Forum!

You are not logged in.

#1 Re: Other Issues » [SOLVED] How do I shutdown » 2022-01-30 19:51:29

For those coming here from the interwebs

How to shutdown devuan from cmdline

# su -
# shutdown -h now

#2 Re: Other Issues » [SOLVED] How do I shutdown » 2022-01-30 19:38:55

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.

#3 Re: Other Issues » [SOLVED] How do I shutdown » 2022-01-30 18:29:08

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

#4 Re: Other Issues » [SOLVED] How do I shutdown » 2022-01-30 18:25:48

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

#5 Other Issues » [SOLVED] How do I shutdown » 2022-01-30 18:03:35

Wavepirell
Replies: 8

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

Board footer

Forum Software