not found SHUTDOWN - POWEROFF - Halt[SOLVED]

New to Debian (Or Linux in general)? Ask your questions here!

not found SHUTDOWN - POWEROFF - Halt[SOLVED]

Postby Thiago » 2019-07-26 21:57

Hello,

I needed help!

I installed Debian 10, GNOME, by DVD media, well I found some difficulties, where it does not find basic command to shut down or reboot (shutdown, poweroff, halt), I was wanting to use package commands (net-tools), I I know this package has not been in Debian since previous versions, the earlier it was possible to download, but now it cannot download too (apt install net-tools).

Could you tell me what it could be?
Last edited by Thiago on 2019-07-29 20:03, edited 1 time in total.
Thiago
 
Posts: 16
Joined: 2019-03-08 21:55

Re: not found SHUTDOWN - POWEROFF - Halt

Postby ruwolf » 2019-07-26 23:16

And what about
Code: Select all
systemctl poweroff
?
User avatar
ruwolf
 
Posts: 392
Joined: 2008-02-18 05:04
Location: Slovakia, Banovce nad Bebravou, Matice slovenskej 1260/4-7

Re: not found SHUTDOWN - POWEROFF - Halt

Postby sunrat » 2019-07-27 01:29

I don't know anything about Gnome, but net-tools is in the repo so something is wrong with your packaging setup if you can't install it with
Code: Select all
apt install net-tools


https://packages.debian.org/buster/net-tools
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!
User avatar
sunrat
 
Posts: 2796
Joined: 2006-08-29 09:12
Location: Melbourne, Australia

Re: not found SHUTDOWN - POWEROFF - Halt

Postby theblueplll » 2019-07-27 05:11

Thiago wrote: I was wanting to use package commands (net-tools), I I know this package has not been in Debian since previous versions, the earlier it was possible to download, but now it cannot download too (apt install net-tools).

Could you tell me what it could be?


And how do you "know" this if you have used Debian before?

I have 3 machines with Debian installed 1 Stretch and 2 Buster and that package is installed in all 3.

Did you possibly not give apt root access? If you don't it isn't going to install anything.

Those other 3 commands also need root access or they will say command not found.
theblueplll
 
Posts: 154
Joined: 2019-04-29 01:17

Re: not found SHUTDOWN - POWEROFF - Halt

Postby Head_on_a_Stick » 2019-07-27 11:37

Code: Select all
E485:~$ which poweroff
E485:~1$ sudo which poweroff
/usr/sbin/poweroff
E485:~$ ls -l $(sudo which poweroff)
lrwxrwxrwx 1 root root 14 May 24 21:58 /usr/sbin/poweroff -> /bin/systemctl
E485:~$

I think you need polkit to use them though.

Why don't you just use the graphical logout application provided by GNOME? Or the power button, which is what I use.
User avatar
Head_on_a_Stick
 
Posts: 10382
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: not found SHUTDOWN - POWEROFF - Halt

Postby sickpig » 2019-07-27 11:49

Thiago wrote:Could you tell me what it could be?


Yes the problem is with gnome(year of linux desktop). try another DE. Or ruwolf's suggestion.
User avatar
sickpig
 
Posts: 315
Joined: 2019-01-23 10:34

Re: not found SHUTDOWN - POWEROFF - Halt

Postby Thiago » 2019-07-29 13:10

ruwolf wrote:And what about
Code: Select all
systemctl poweroff
?

Hello,

This was the only command that worked, I had already tested.
however only the poweroff command does not work.
Thiago
 
Posts: 16
Joined: 2019-03-08 21:55

Re: not found SHUTDOWN - POWEROFF - Halt

Postby L_V » 2019-07-29 13:24

All power on/off operations are managed by systemd.
/sbin/poweroff is same as 'systemctl poweroff'

Code: Select all
ls -l1 /sbin/halt  /sbin/poweroff /sbin/reboot /sbin/shutdown   
           
 /sbin/halt -> /bin/systemctl
 /sbin/poweroff -> /bin/systemctl
 /sbin/reboot -> /bin/systemctl
 /sbin/shutdown -> /bin/systemctl
L_V
 
Posts: 1047
Joined: 2007-03-19 09:04

Re: not found SHUTDOWN - POWEROFF - Halt

Postby Thiago » 2019-07-29 13:28

sunrat wrote:I don't know anything about Gnome, but net-tools is in the repo so something is wrong with your packaging setup if you can't install it with
Code: Select all
apt install net-tools


https://packages.debian.org/buster/net-tools


Hello sunrat,
My area is network, so I am looking for this package, referring to other versions, yes already used other versions of Debian, which is not installed anymore I had no problem to install, and it is not news that this package is no longer kept entered as deprecated, and hasn't been updated for some time, and he has replacement however I like his commands.

and I'm not saying: https://wiki.linuxfoundation.org/networking/net-tools

test done
root @ debian10: / home / thiago # dpkg -l | grep net-tools
root @ debian10: / home / thiago # apt-cache search net-tools
iproute2 - networking and traffic control tools
root @ debian10: / home / thiago # apt install net-tools
Reading package lists ... Ready
Building dependency tree
Reading status info ... Ready
E: Unable to find net-tools package
root @ debian10: / home / thiago #
Thiago
 
Posts: 16
Joined: 2019-03-08 21:55

Re: not found SHUTDOWN - POWEROFF - Halt

Postby Thiago » 2019-07-29 13:35

theblueplll wrote:
Thiago wrote: I was wanting to use package commands (net-tools), I I know this package has not been in Debian since previous versions, the earlier it was possible to download, but now it cannot download too (apt install net-tools).

Could you tell me what it could be?


And how do you "know" this if you have used Debian before?
Yes, not only other versions of Debian, but other Distro.
https://wiki.linuxfoundation.org/networking/net-tools

I have 3 machines with Debian installed 1 Stretch and 2 Buster and that package is installed in all 3.
root@debian10:/home/thiago# dpkg -l | grep net-tools
root@debian10:/home/thiago# apt-cache search net-tools
iproute2 - networking and traffic control tools
root@debian10:/home/thiago# apt install net-tools
Lendo listas de pacotes... Pronto
Construindo árvore de dependências
Lendo informação de estado... Pronto
E: Impossível encontrar o pacote net-tools
root@debian10:/home/thiago#


Did you possibly not give apt root access? If you don't it isn't going to install anything.
As you can see from the previous answer, I am root.
Thiago
 
Posts: 16
Joined: 2019-03-08 21:55

Re: not found SHUTDOWN - POWEROFF - Halt

Postby L_V » 2019-07-29 13:37

???
Code: Select all
apt policy net-tools
net-tools:
  Installé : 1.60+git20180626.aebd88e-1
  Candidat : 1.60+git20180626.aebd88e-1

https://packages.debian.org/buster/net-tools
L_V
 
Posts: 1047
Joined: 2007-03-19 09:04

Re: not found SHUTDOWN - POWEROFF - Halt

Postby Thiago » 2019-07-29 13:42

Head_on_a_Stick wrote:
Code: Select all
E485:~$ which poweroff
E485:~1$ sudo which poweroff
/usr/sbin/poweroff
E485:~$ ls -l $(sudo which poweroff)
lrwxrwxrwx 1 root root 14 May 24 21:58 /usr/sbin/poweroff -> /bin/systemctl
E485:~$

I think you need polkit to use them though.

Why don't you just use the graphical logout application provided by GNOME? Or the power button, which is what I use.


Hello Head_on_a_Stick

I use virtual machines in production environment and terminal only access and these commands are essential for maintenance, in the case of this Debian 10 I installed to test and see what's new before using it in production.

root @ debian10: / home / thiago # which poweroff
root @ debian10: / home / thiago #
Thiago
 
Posts: 16
Joined: 2019-03-08 21:55

Re: not found SHUTDOWN - POWEROFF - Halt

Postby Thiago » 2019-07-29 13:46

sickpig wrote:
Thiago wrote:Could you tell me what it could be?


Yes the problem is with gnome(year of linux desktop). try another DE. Or ruwolf's suggestion.


Hello sickpig
I'm sorry but I did not quite understand your answer, you said the problem is related to GNOME, ie should I use another graphic interface or not use it?
Thiago
 
Posts: 16
Joined: 2019-03-08 21:55

Re: not found SHUTDOWN - POWEROFF - Halt

Postby Thiago » 2019-07-29 13:54

L_V wrote:All power on/off operations are managed by systemd.
/sbin/poweroff is same as 'systemctl poweroff'

Code: Select all
ls -l1 /sbin/halt  /sbin/poweroff /sbin/reboot /sbin/shutdown   
           
 /sbin/halt -> /bin/systemctl
 /sbin/poweroff -> /bin/systemctl
 /sbin/reboot -> /bin/systemctl
 /sbin/shutdown -> /bin/systemctl


What I need to do ?

root@debian10:/home/thiago# poweroff
bash: poweroff: comando não encontrado
root@debian10:/home/thiago# halt
bash: halt: comando não encontrado
root@debian10:/home/thiago# shutdown
bash: shutdown: comando não encontrado
root@debian10:/home/thiago# ls -l1 /sbin/halt /sbin/poweroff /sbin/reboot /sbin/shutdown
lrwxrwxrwx 1 root root 14 mai 24 17:58 /sbin/halt -> /bin/systemctl
lrwxrwxrwx 1 root root 14 mai 24 17:58 /sbin/poweroff -> /bin/systemctl
lrwxrwxrwx 1 root root 14 mai 24 17:58 /sbin/reboot -> /bin/systemctl
lrwxrwxrwx 1 root root 14 mai 24 17:58 /sbin/shutdown -> /bin/systemctl
root@debian10:/home/thiago#
root@debian10:/home/thiago# echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
root@debian10:/home/thiago#
Thiago
 
Posts: 16
Joined: 2019-03-08 21:55

Re: not found SHUTDOWN - POWEROFF - Halt

Postby Thiago » 2019-07-29 13:56

L_V wrote:???
Code: Select all
apt policy net-tools
net-tools:
  Installé : 1.60+git20180626.aebd88e-1
  Candidat : 1.60+git20180626.aebd88e-1

https://packages.debian.org/buster/net-tools



root @ debian10: / home / thiago # apt policy net-tools
N: Unable to find net-tools package
root @ debian10: / home / thiago #
Thiago
 
Posts: 16
Joined: 2019-03-08 21:55

Next

Return to Beginners Questions

Who is online

Users browsing this forum: No registered users and 9 guests

fashionable