ug command not found

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

Introduction

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

ug: command not found

or when using sudo you get the following error message

sudo: ug: command not found

Solutions to ug: command not found

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

In Ubuntu ug is provided by ugrep package.

ugrep is:

Universal grep: ultra fast searcher of file systems, text and binary files, source code, archives, compressed files, documents, and more.

The main features include:

  • Written in clean and efficient C++11, built for speed
  • Ultra fast with new match algorithms beating grep, ripgrep, silver searcher, hyperscan, etc.
  • Multi-threaded search using high-performance lock-free job queue stealing
  • Multi-threaded task-parallel decompression and search
  • Optimized pattern matching (AVX, SSE2, ARM NEON/AArch64)
  • Optimized asynchronous IO for efficient concurrent searching
  • Thoroughly tested (includes over 1000 test cases)
  • Compatible with the standard GNU/BSD grep command-line options
  • Comprehensive how-to tutorial for beginners to advanced users
  • Interactive query UI to enter search patterns
  • Select files to search by file types, filename suffix, and “magic bytes”
  • Search archives (cpio, jar, tar, pax, zip)
  • Search compressed files (zip, gz, Z, bz, bz2, lzma, xz)
  • Search pdf, doc, docx, xls, xlxs, and more using filters
  • Search binary files and display hexdumps with binary pattern matches
  • Search UTF-encoded files with Unicode pattern matches (by default)
  • Search files encoded in ISO-8859-1 thru 16, CP 437, CP 850, MAC, KOI8, etc.
  • Search files excluding files specified by .gitignore etc.
  • Search patterns across newlines, matching multiple lines at once
  • Search patterns excluding negative patterns (“match this but not that”)
  • Includes predefined regex patterns to search source code, XML, JSON, HTML
  • Output results in CSV, JSON, XML, and user-specified formats
  • Sort matching files by name, size, and time
  • Portable, compiles and runs on Linux, Unix, Mac OS X, Windows, etc.

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

sudo apt-get -y install ugrep

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

You can also use apt command to install ugrep.

sudo apt -y install ugrep

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

sudo aptitude install ugrep

Summary

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