Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

not found SHUTDOWN - POWEROFF - Halt[SOLVED]

New to Debian (Or Linux in general)? Ask your questions here!
Message
Author
Thiago
Posts: 16
Joined: 2019-03-08 21:55

not found SHUTDOWN - POWEROFF - Halt[SOLVED]

#1 Post by Thiago »

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.

User avatar
ruwolf
Posts: 623
Joined: 2008-02-18 05:04
Location: Banovce nad Bebravou
Has thanked: 35 times
Been thanked: 26 times

Re: not found SHUTDOWN - POWEROFF - Halt

#2 Post by ruwolf »

And what about

Code: Select all

systemctl poweroff
?

User avatar
sunrat
Administrator
Administrator
Posts: 6412
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 116 times
Been thanked: 462 times

Re: not found SHUTDOWN - POWEROFF - Halt

#3 Post by sunrat »

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!

theblueplll
Posts: 154
Joined: 2019-04-29 01:17
Been thanked: 2 times

Re: not found SHUTDOWN - POWEROFF - Halt

#4 Post by theblueplll »

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.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: not found SHUTDOWN - POWEROFF - Halt

#5 Post by Head_on_a_Stick »

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.
deadbang

User avatar
sickpig
Posts: 589
Joined: 2019-01-23 10:34

Re: not found SHUTDOWN - POWEROFF - Halt

#6 Post by sickpig »

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.

Thiago
Posts: 16
Joined: 2019-03-08 21:55

Re: not found SHUTDOWN - POWEROFF - Halt

#7 Post by Thiago »

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.

L_V
Posts: 1477
Joined: 2007-03-19 09:04
Been thanked: 11 times

Re: not found SHUTDOWN - POWEROFF - Halt

#8 Post by L_V »

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

Thiago
Posts: 16
Joined: 2019-03-08 21:55

Re: not found SHUTDOWN - POWEROFF - Halt

#9 Post by Thiago »

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

#10 Post by Thiago »

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.

L_V
Posts: 1477
Joined: 2007-03-19 09:04
Been thanked: 11 times

Re: not found SHUTDOWN - POWEROFF - Halt

#11 Post by L_V »

???

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

Thiago
Posts: 16
Joined: 2019-03-08 21:55

Re: not found SHUTDOWN - POWEROFF - Halt

#12 Post by Thiago »

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

#13 Post by Thiago »

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

#14 Post by Thiago »

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

#15 Post by Thiago »

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 #

L_V
Posts: 1477
Joined: 2007-03-19 09:04
Been thanked: 11 times

Re: not found SHUTDOWN - POWEROFF - Halt

#16 Post by L_V »

Thiago wrote: # apt policy net-tools / N: Unable to find net-tools package
It is not the subject but ...... what say this

Code: Select all

grep -rh ^d /etc/apt/sources* 
(strange idea to look for net-rools in a power subject).

Thiago
Posts: 16
Joined: 2019-03-08 21:55

Re: not found SHUTDOWN - POWEROFF - Halt

#17 Post by Thiago »

L_V wrote:
Thiago wrote: # apt policy net-tools / N: Unable to find net-tools package
It is not the subject but ...... what say this

Code: Select all

grep -rh ^d /etc/apt/sources* 
(strange idea to look for net-rools in a power subject).
root@debian10:/home/thiago# grep -rh ^d /etc/apt/sources*
deb http://security.debian.org/debian-security buster/updates main contrib
deb-src http://security.debian.org/debian-security buster/updates main contrib

L_V
Posts: 1477
Joined: 2007-03-19 09:04
Been thanked: 11 times

Re: not found SHUTDOWN - POWEROFF - Halt

#18 Post by L_V »

When did you modify your sources.list....
It is certainly not the one you have had during installation.
Really not the subject here.

Thiago
Posts: 16
Joined: 2019-03-08 21:55

Re: not found SHUTDOWN - POWEROFF - Halt

#19 Post by Thiago »

L_V wrote:When did you modify your sources.list....
It is certainly not the one you have had during installation.
Really not the subject here.
Excuse me,
I expected a solution answer to the problems mentioned, did not understand their placement. (Really not the subject here.)
"When did you modify your sources.list ...."
The source list is the way it is in the installation, I just commented the lines of the cd-rom.

L_V
Posts: 1477
Joined: 2007-03-19 09:04
Been thanked: 11 times

Re: not found SHUTDOWN - POWEROFF - Halt

#20 Post by L_V »

Thiago wrote: I just commented the lines of the cd-rom.
Not the subject but, this makes a difference.
add this line in your /etc/apt/sources.list

Code: Select all

deb http://ftp.de.debian.org/debian/ buster main contrib 
Then, as root

Code: Select all

apt update
and you should find your net-tools, assuming you have access to the network

Post Reply