shar command not found

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

Introduction

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

shar: command not found

or when using sudo you get the following error message

sudo: shar: command not found

Solutions to shar: command not found

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

In Ubuntu shar is provided by sharutils package.

sharutils is:

shar' makes so-called shell archives out of many files, preparing them for transmission by electronic mail services. unshar’ helps unpacking shell archives after reception. Other related utility programs help with other tasks.

uuencode' prepares a file for transmission over an electronic channel which ignores or otherwise mangles the eight bit (high order bit) of bytes. uudecode’ does the converse transformation.

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

sudo apt-get -y install sharutils

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

You can also use apt command to install sharutils.

sudo apt -y install sharutils

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

sudo aptitude install sharutils

Summary

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