crash command not found

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

Introduction

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

crash: command not found

or when using sudo you get the following error message

sudo: crash: command not found

Solutions to crash: command not found

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

In Ubuntu crash is provided by crash package.

crash is:

The core analysis suite is a self-contained tool that can be used to investigate either live systems, or multiple different core dump formats including kdump, LKCD, netdump and diskdump.

o The tool is loosely based on the SVR4 crash command, but has been completely integrated with gdb in order to be able to display formatted kernel data structures, disassemble source code, etc.

o The current set of available commands consist of common kernel core analysis tools such as a context-specific stack traces, source code disassembly, kernel variable displays, memory display, dumps of linked-lists, etc. In addition, any gdb command may be entered, which in turn will be passed onto the gdb module for execution.

o There are several commands that delve deeper into specific kernel subsystems, which also serve as templates for kernel developers to create new commands for analysis of a specific area of interest. Adding a new command is a simple affair, and a quick recompile adds it to the command menu.

o The intent is to make the tool independent of Linux version dependencies, building in recognition of major kernel code changes so as to adapt to new kernel versions, while maintaining backwards compatibility.

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

sudo apt-get -y install crash

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

You can also use apt command to install crash.

sudo apt -y install crash

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

sudo aptitude install crash

Summary

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