You are not logged in.

#1 2012-10-26 13:07:45

jk121960
Member
From: Palos Hills, Illinois
Registered: 2011-12-09
Posts: 254

Can't locate hostnamectl to set hostname

Hi, I am converting my system over to some of the changes that are taking place with Arch to get it current and I went to change host name resolution over but I don't have the command that they are talking about "hostnamectl" what package to I have to install? I already have things like inetutils and net-tools installed what am I missing?

thanks you for your help

--jerry


Arch Awesome, Ranger & Vim the coding triple threat.

Offline

#2 2012-10-26 13:30:30

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,729

Re: Can't locate hostnamectl to set hostname

hostnamectl is part of the new nss-myhostname package. Have you updated recently? It should have been pulled in by the update in the filesystem package.

Offline

#3 2012-10-26 13:44:46

jk121960
Member
From: Palos Hills, Illinois
Registered: 2011-12-09
Posts: 254

Re: Can't locate hostnamectl to set hostname

Yes I installed that package when I read the wiki, so if it is in that package something else is wrong. I tried the command not found, I tried "which" not found I searched the filesystem for that file not found. Does anyone have an idea what might be happening?

thanks for all your help.

--jerry


Arch Awesome, Ranger & Vim the coding triple threat.

Offline

#4 2012-10-26 13:53:55

65kid
Member
From: Germany
Registered: 2011-01-26
Posts: 663

Re: Can't locate hostnamectl to set hostname

it's part of systemd but has only recently been added with version 195, 194 doesn't have it yet. Update your system.

Offline

#5 2012-10-26 13:56:43

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,729

Re: Can't locate hostnamectl to set hostname

I apologize. I assumed that command came with that package as they were mentioned together in the mailing list. Doing a pacman -Qo, I see that it's actually part of systemd.

Offline

#6 2012-10-26 14:15:30

jk121960
Member
From: Palos Hills, Illinois
Registered: 2011-12-09
Posts: 254

Re: Can't locate hostnamectl to set hostname

Scimmia wrote:

I apologize. I assumed that command came with that package as they were mentioned together in the mailing list. Doing a pacman -Qo, I see that it's actually part of systemd.

Hi and thanks, Yes I have that also installed as part of my "get caught up" day. How are you seeing it in systemd?

thanks

--jerry


Arch Awesome, Ranger & Vim the coding triple threat.

Offline

#7 2012-10-26 14:38:32

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,648

Re: Can't locate hostnamectl to set hostname

jk121960 wrote:

How are you seeing it in systemd?

Scimmia wrote:

Doing a pacman -Qo, I see that it's actually part of systemd.

pacman -Qo /usr/bin/hostnamectl

pacman -Qo shows which package "owns" a command -- this only works if you already have hostnamectl installed.

Last edited by 2ManyDogs (2012-10-26 14:43:29)

Offline

#8 2012-10-26 14:44:18

jk121960
Member
From: Palos Hills, Illinois
Registered: 2011-12-09
Posts: 254

Re: Can't locate hostnamectl to set hostname

2ManyDogs wrote:
jk121960 wrote:

How are you seeing it in systemd?

Scimmia wrote:

Doing a pacman -Qo, I see that it's actually part of systemd.

pacman -Qo /usr/bin/hostnamectl

pacman -Qo shows which package "owns" a command -- this only works if you already have the hostnamectl installed.


Yes I had tried this but it comes back with

[root@zenlinux ~]# pacman -Qo /usr/bin/hostnamectl
error: failed to read file '/usr/bin/hostnamectl': No such file or directory
[1]+  Done                    hostname zenlinux
[root@zenlinux ~]# 

The reference to hostname in the output is me setting it in bash till I figure this out.

--jerry


Arch Awesome, Ranger & Vim the coding triple threat.

Offline

#9 2012-10-26 14:45:07

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,648

Re: Can't locate hostnamectl to set hostname

2ManyDogs wrote:

this only works if you already have hostnamectl installed.

Update your system. Once you have systemd 195, you will have /usr/bin/hostnamectl.

You can tell which version of systemd you have with "pacman -Qs systemd"

Last edited by 2ManyDogs (2012-10-26 14:47:26)

Offline

#10 2012-10-26 14:48:26

jk121960
Member
From: Palos Hills, Illinois
Registered: 2011-12-09
Posts: 254

Re: Can't locate hostnamectl to set hostname

2ManyDogs wrote:
2ManyDogs wrote:

this only works if you already have hostnamectl installed.

Update your system. Once you have systemd 195, you will have /usr/bin/hostnamectl.

pacman is only offering me systemd 194-3 and I ran "reflector" this morning. Do you think I am just getting an old repo image?

thanks


Arch Awesome, Ranger & Vim the coding triple threat.

Offline

#11 2012-10-26 14:52:57

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,648

Re: Can't locate hostnamectl to set hostname

Did you run "pacman -Syy" or preferably "pacman -Syu" after you ran reflector ?

Offline

#12 2012-10-26 14:55:25

jk121960
Member
From: Palos Hills, Illinois
Registered: 2011-12-09
Posts: 254

Re: Can't locate hostnamectl to set hostname

2ManyDogs wrote:

Did you run "pacman -Syy" or preferably "pacman -Syu" after you ran reflector ?

Yes I always run my update as -Syu

--jerry


Arch Awesome, Ranger & Vim the coding triple threat.

Offline

#13 2012-10-26 14:57:55

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,648

Re: Can't locate hostnamectl to set hostname

Try a different mirror.

Offline

#14 2012-10-26 15:02:38

jk121960
Member
From: Palos Hills, Illinois
Registered: 2011-12-09
Posts: 254

Re: Can't locate hostnamectl to set hostname

2ManyDogs wrote:

Try a different mirror.

just did and the best I get is 194-4, I am going to run reflector again.

--jerry


Arch Awesome, Ranger & Vim the coding triple threat.

Offline

#15 2012-10-26 15:04:51

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,648

Re: Can't locate hostnamectl to set hostname

The Packages page says the current version of systemd is 195-2, but it was just updated today. You could just wait and update again later today or tomorrow...

Offline

#16 2012-10-26 15:07:33

jk121960
Member
From: Palos Hills, Illinois
Registered: 2011-12-09
Posts: 254

Re: Can't locate hostnamectl to set hostname

2ManyDogs wrote:

The Packages page says the current version of systemd is 195-2, but it was just updated today. You could just wait and update again later today or tomorrow...

OK thanks

I appreciate all the help.

--jerry


Arch Awesome, Ranger & Vim the coding triple threat.

Offline

#17 2012-10-27 00:51:32

jk121960
Member
From: Palos Hills, Illinois
Registered: 2011-12-09
Posts: 254

Re: Can't locate hostnamectl to set hostname

jk121960 wrote:
2ManyDogs wrote:

The Packages page says the current version of systemd is 195-2, but it was just updated today. You could just wait and update again later today or tomorrow...

OK thanks

I appreciate all the help.

--jerry


I got the update and ran "hostnamectl set-hostname myhostname" replacing my hostname and I got

Failed to issue method call: Launch helper exited with unknown return code 1

I appreciate any help that anyone can give.

--jerry


Arch Awesome, Ranger & Vim the coding triple threat.

Offline

#18 2012-10-27 01:39:46

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: Can't locate hostnamectl to set hostname

hostnamectl doesn't write to /etc/hostname. If you want to change the name permanently, hostnamectl isn't going to help you. Same goes for the other new utilities: localectl and timedatectl.

Offline

#19 2012-10-27 01:55:06

ataraxia
Member
From: Pittsburgh
Registered: 2007-05-06
Posts: 1,553

Re: Can't locate hostnamectl to set hostname

falconindy wrote:

hostnamectl doesn't write to /etc/hostname. If you want to change the name permanently, hostnamectl isn't going to help you. Same goes for the other new utilities: localectl and timedatectl.

Actually...

# cat /etc/hostname 
amaranth
# hostnamectl set-hostname example
# cat /etc/hostname 
example

Offline

#20 2012-10-27 12:23:41

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: Can't locate hostnamectl to set hostname

Ew. Guess I didn't read enough of the source to encounter that...

Offline

#21 2012-10-27 15:37:42

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,648

Re: Can't locate hostnamectl to set hostname

jk121960 wrote:

I got the update and ran "hostnamectl set-hostname myhostname" replacing my hostname and I got

Failed to issue method call: Launch helper exited with unknown return code 1

Sorry, I've never seen this error. Hopefully someone with more information will answer soon.

Does setting your hostname by editing /etc/hostname not work for some reason? I know the wiki says you should use hostnamectl to set the hostname, but I think you can just edit /etc/hostname and be done with it.

Offline

#22 2012-10-27 15:42:46

jk121960
Member
From: Palos Hills, Illinois
Registered: 2011-12-09
Posts: 254

Re: Can't locate hostnamectl to set hostname

2ManyDogs wrote:
jk121960 wrote:

I got the update and ran "hostnamectl set-hostname myhostname" replacing my hostname and I got

Failed to issue method call: Launch helper exited with unknown return code 1

Sorry, I've never seen this error. Hopefully someone with more information will answer soon.

Does setting your hostname by editing /etc/hostname not work for some reason? I know the wiki says you should use hostnamectl to set the hostname, but I think you can just edit /etc/hostname and be done with it.

Well from the post prior to you I am thinking you can, I was just trying to follow the wiki as written. I am currently running on a restored copy so I can work because it was messing with stuff I use. I will attempt update again as soon as AUR is back up.

thanks for everyones help with this

--jerry


Arch Awesome, Ranger & Vim the coding triple threat.

Offline

#23 2012-10-27 15:50:06

65kid
Member
From: Germany
Registered: 2011-01-26
Posts: 663

Re: Can't locate hostnamectl to set hostname

are you actually using systemd? maybe hostnamectl depends on the system being booted with systemd.
And yes, editing /etc/hostname should be fine, hostnamectl just has some advanced functionality like setting the "pretty" and "transient" hostname or setting an icon to represent the host in GUIs (didn't even know this stuff existed wink ).

Offline

#24 2012-10-27 16:21:30

jk121960
Member
From: Palos Hills, Illinois
Registered: 2011-12-09
Posts: 254

Re: Can't locate hostnamectl to set hostname

65kid wrote:

are you actually using systemd? maybe hostnamectl depends on the system being booted with systemd.
And yes, editing /etc/hostname should be fine, hostnamectl just has some advanced functionality like setting the "pretty" and "transient" hostname or setting an icon to represent the host in GUIs (didn't even know this stuff existed wink ).

Yea, I was transitioning over to the new approach as to not get to behind the curve, sometimes it's a pain to catch up. I will continue as soon as I get a a positive result from yaourt instead of smutz. There is currently somthing wrong at aur.archlinux.org so I can't update as the update series I have to reconcile includes the python name remapping and it foobars apps I need from the aur, that I will have to reinstall.

thanks again

--jerry


Arch Awesome, Ranger & Vim the coding triple threat.

Offline

#25 2012-10-27 18:44:49

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,648

Re: Can't locate hostnamectl to set hostname

You don't need to reinstall from the AUR if you still have the PKGBUILD files and the source. Just edit the PKGBUILD and rebuild the packages, as described in this topic.

Offline

Board footer

Powered by FluxBB