xelatex command not found

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

Introduction

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

xelatex: command not found

or when using sudo you get the following error message

sudo: xelatex: command not found

Solutions to xelatex: command not found

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

In Ubuntu xelatex is provided by texlive-xetex package.

texlive-xetex is:

Packages for XeTeX, the Unicode/OpenType-enabled TeX by Jonathan Kew, http://tug.org/xetex.

This package includes the following CTAN packages:

arabxetex – An ArabTeX-like interface for XeLaTeX

awesomebox – Draw admonition blocks in your documents, illustrated with FontAwesome icons

bidi-atbegshi – Bidi-aware shipout macros

bidicontour – Bidi-aware coloured contour around text

bidipagegrid – Bidi-aware page grid in background

bidipresentation – Experimental bidi presentation

bidishadowtext – Bidi-aware shadow text

book-of-common-prayer – Typeset in the style of “Book of Common Prayer”

businesscard-qrcode – Business cards with QR-Code

cqubeamer – LaTeX Beamer Template for Chongqing University

fixlatvian – Improve Latvian language support in XeLaTeX

font-change-xetex – Macros to change text and mathematics fonts in plain XeTeX

fontbook – Generate a font book

fontwrap – Bind fonts to specific unicode blocks

interchar – Managing character class schemes in XeTeX

na-position – Tables of relative positions of curves and asymptotes or tangents in Arabic documents

philokalia – A font to typeset the Philokalia Books

ptext – A ’lipsum’ for Persian

realscripts – Access OpenType subscript and superscript glyphs

simple-resume-cv – Template for a simple resume or curriculum vitae (CV), in XeLaTeX

simple-thesis-dissertation – Template for a simple thesis or dissertation (Ph.D. or master’s degree) or technical report, in XeLaTeX

tetragonos – Four-Corner codes of Chinese characters

ucharclasses – Font actions in XeTeX according to what is being processed

unicode-bidi – Experimental unicode bidi package for XeTeX

unisugar – Define syntactic sugar for Unicode LaTeX

xebaposter – Create beautiful scientific Persian/Latin posters using TikZ

xechangebar – An extension of package changebar that can be used with XeLaTeX

xecjk – Support for CJK documents in XeLaTeX

xecolor – Support for color in XeLaTeX

xecyr – Using Cyrillic languages in XeTeX

xeindex – Automatic index generation for XeLaTeX

xelatex-dev –

xesearch – A string finder for XeTeX

xespotcolor – Spot colours support for XeLaTeX

xetex – An extended variant of TeX for use with Unicode sources

xetex-itrans – Itrans input maps for use with XeLaTeX

xetex-pstricks – Running PSTricks under XeTeX

xetex-tibetan – XeTeX input maps for Unicode Tibetan

xetexconfig – crop.cfg for XeLaTeX

xetexfontinfo – Report font features in XeTeX

xetexko – Typeset Korean with Xe(La)TeX

xevlna – Insert non-breakable spaces using XeTeX

zbmath-review-template – Template for a zbMATH Open review

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

sudo apt-get -y install texlive-xetex

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

You can also use apt command to install texlive-xetex.

sudo apt -y install texlive-xetex

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

sudo aptitude install texlive-xetex

Summary

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