You are not logged in.
Pages: 1
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
Try
loginctl poweroff
And also read my signature. *sighs*
Brianna Ghey — Rest In Power
Offline
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
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
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.
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
...I've posted about this on these boards approximately 7,482 times
I think it was more like 7,497 times?
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.
Offline
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
For those coming here from the interwebs
How to shutdown devuan from cmdline
# su -
# shutdown -h now
Offline
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
Pages: 1