Glam Prestige Journal

Bright entertainment trends with youth appeal.

I am using Ubuntu 14.04.3 LTS, when I try to run command hostnamectl I get error:

bash: hostnamectl: command not found

Which library shall I install to use hostnamectl ?

6

2 Answers

hostnamectl is provided by systemd-services package in Ubuntu 14.04. You need to install that package to get the command line utility

sudo apt-get install systemd-services
2

To find out which package a file is you can use apt- file:

sudo apt-get install apt-file
apt-file update

After using it it is as simple as :

ricardo@zeus:~$ apt-file search hostnamectl
cdist: /usr/lib/python3/dist-packages/cdist/conf/type/__hostname/explorer/has_hostnamectl
systemd: /usr/bin/hostnamectl
systemd: /usr/share/bash-completion/completions/hostnamectl
systemd: /usr/share/man/man1/hostnamectl.1.gz
systemd: /usr/share/zsh/vendor-completions/_hostnamectl

Once apt -file package tells you that the file is found , you just have to install it:

sudo apt-get install systemd
3

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy