I installed the latest version of Debian (netinstall).
I have the problem, that the terminal does not know commands like shutdown
, reboot
, and so on.
When I do whereis shutdown
it tells me it is in /usr/sbin
.
I fixed this on a different installation try by writing /usr/sbin
into /etc/profile
where the $PATH
is written.
But this time it did not work.
I looked at this: https://wiki.debian.org/EnvironmentVariables, but either those files did not exist or I did not know where to put the path.
And doing export PATH=$PATH:usr/sbin
is not permanent, it's gone after reboot, so that is garbage as well.
Edit: Wait, maybe I have to change the PATH in /etc/environment
?!
I have to test this once I give Debian another try.
sbin
directories in thePATH
for a regular user, since the stuff isn't that usable for a regular user. Though with Policykit or such,shutdown
could be. So I guess an important part here is if it's just the search path or not -- doesshutdown
work for you if you run it as/usr/bin/shutdown
? For the path, see e.g. How do I set a user environment variable? (permanently, not session) – ilkkachu Mar 24 '21 at 11:11/usr/sbin/shutdown now
as root, but I want to use the commands without the whole path like in Ubuntu of course... – theerrormagnet Mar 24 '21 at 11:24usr/sbin
as the path, without the initial/
. You may want to make sure that your path contains/usr/sbin
rather thanusr/sbin
, and that/etc/profile
is correct too. Note also that you probably want to mention what shell you're using too, as some shells don't care about/etc/profile
(e.g.zsh
). – Kusalananda Mar 24 '21 at 11:31systemctl poweroff
- you could alias this. – FelixJN Mar 24 '21 at 11:37/
beforeusr/sbin
. I have now switched back to Ubuntu, it has/usr/sbin
in its path by default. But I'm still clueless why it doesn't work in Debian. – theerrormagnet Mar 24 '21 at 23:47