hostsed command not found

In this troubleshooting guide we learn how to fix hostsed command not found error message

Introduction

When you run more command in linux terminal / console, you get the following error message

hostsed: command not found

or when using sudo you get the following error message

sudo: hostsed: command not found

Solutions to hostsed: command not found

How To Fix hostsed: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu hostsed is provided by hostsed package.

hostsed is:

Tool for editing hosts file(default /etc/hosts), you can add or delete a DNS entry via command line shell. Hotsed provides an idemponent command line experience with its ‘add’ and ‘delete’ commands avoiding duplicated or missing entries in the hosts file.

To fix this problem, we can install more using the command below.

sudo apt-get -y install hostsed

This command might take some time to finish depending on your machine internet connection.

You can also use apt command to install hostsed.

sudo apt -y install hostsed

Or if you have aptitude installed you can use the following command.

sudo aptitude install hostsed

Summary

In this tutorial we learn how to fix hostsed command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.