How do I locate the package containing the "domainname" command and install it?

Hello and thanks for the help.
I'm running a fresh install of "manjaro-kde-17.1.2-stable-x86_64.iso".
Unfortunately, this fresh install is missing the "domainname" command.
How do I locate the package containing the "domainname" command and install it?

I've tried:
sudo pacman -Fy
pacman -Fs domainname
"pacman" did not find anything.

Next I tried Google. Google says that "domainname" should be in one of two packages: "yp-tools" or "net-tools".
Using "Octopi", I was unable to locate either "domainname" or "yp-tools".
I did locate "net-tools", but when I installed it, the "domainname" command was not installed.

Next, I've tried:
sudo pacman -Fy
pacman -Fl yp-tools
"pacman" did not find anything.

How do I locate the package containing the "domainname" command and install it?

Thanks for the help.

if you have a "" on your system, you can use

pacman -Qo <file name>

to look up, which package owns the "" in /usr/bin/ directory.
in your case, this does not help.

if you want to list, what files a package installs on your system, you can use (depending on, whether it is a local package you are looking for or not:

pacman -Ql <PACKAGE NAME>
sudo pacman -Fyl <PACKAGE NAME>

if you want to search for a package, which installs a certain file on your system, you can use:

pacman -Ql | grep <FILE NAME>
sudo pacman -Fysx <FILE NAME>

in your case,
sudo pacman -Fysx domainname
gives you a solution: the inetutils package installs a "dnsdomainname" file in usr/bin/ (all files in this directory will automatically get added to your PATH and you can start them without specifying their full path).
i am not sure, whether it is thing you are looking for.

one more point:
there is a package called yp-tools in the AUR. it might be worth checking out.

pacui is a script i have written, which does all of this for you. simply chose "list package files" or "search package files". it automatically searches all files/packages on your system and on the manjaro repositories. it is not possible to do these searches for AUR packages.

“search package files” finds ALL files you are looking for (and which get installed by packages), even .so files and other stuff. if you want to limit your search results to files, which you can actually execute, i strongly recommend to filter your search results for files contained in the usr/bin/ directory (simply start typing and pacui will filter the list you are seeing)!

"list package files" automatically filters the search results for usr/bin/. if you want to see all search results, delete the filter by using the backspace key.

1 Like

If you do not need IPv6 support it is in the AUR.. Maybe turn on AUR support in your software provider tool.

excalibur1234 and anika200, thank you for your help.

I used your command suggestions, and "pacui" script to search for "hostname" elsewhere, but failed to locate any other source besides "yp-tools" in AUR.

So I installed "yp-tools" using "yaourt yp-tools", which successfully installed the "hostname" command!
Unfortunately, during the install, I received the message: "( Unsupported package: Potentially dangerous ! )".
I'm uncomfortable using an unsupported package, because I'm looking for stability (hence using Manjaro instead of Arch).
So I'll look into alternative ways to create this command in Manjaro (example: alias domainname="cat /proc/sys/kernel/domainname" in .bashrc, or writing my own script).

Also, if you don't mind, I think I'm doing something wrong in configuring Octopi to search AUR.
I was not able to get the "yp-tools" AUR package to appear in Octopi.
I enabled AUR in Octopi using:
[CHECK] Yaourt
[CHECK] --noconfin
[CHECK] Search for outdated AUR packages
File->Sync database
Then I searched for "yp-tools", and nothing appeared.
What am I doing wrong in configuring Octopi?

Again, thank you both for the help. Much appreciated.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by