1. Overview

LaTeX is a robust typesetting program that is frequently used to create technical and scientific papers. It’s the standard for writing research papers and theses and is very popular among scholars. Furthermore, it’s particularly useful for creating complex mathematical equations and formatting large documents.

In this tutorial, we’ll discuss the steps involved in installing LaTeX in Linux using the command line. The first step before installing LaTeX on Linux is determining which distribution of Linux we’re using. We’ll primarily focus on the Ubuntu/Debian distribution system, but the steps we’ll discuss should also be similar for other distributions.

2. Using the Command Line to Install LaTeX

Before we proceed with installing LaTex, let’s make sure that our system is up to date:

$ sudo apt-get update
Hit:1 http://ke.archive.ubuntu.com/ubuntu jammy InRelease
Hit:2 http://ke.archive.ubuntu.com/ubuntu jammy-updates InRelease                                    
...                            
Fetched 110 kB in 2s (65.5 kB/s)
Reading package lists... Done

In the above example, we update the lists on our system and ensure we have the latest versions of all installed software.

Once our system is up to date, we’ll install LaTeX into our system:

$ sudo apt-get install texlive-full 
Reading package lists... Done 
Building dependency tree... Done 
Reading state information... Done
... 
Building format(s) --all. 
        This may take some time... done.

The above command will install all the packages and tools we need to create professional-quality LaTeX documents. Remember, we have to ensure that we’ve got 6GB of space when installing the full version of LaTeX because it takes up a lot of space.

Alternatively, if we don’t need all the packages that come with the full version of LaTeX, we can install a lighter version:

$ sudo apt-get install texlive 
Reading package lists... Done 
Building dependency tree... Done 
Reading state information... Done
... 
Building format(s) --all. 
        This may take some time... done.

When we install the lighter version of LaTeX, we only require a minimum of 2GB of space.

Now that we’ve installed LaTeX in our system, we’ll need a way to create and edit LaTeX documents. There are various advanced LaTeX editors we can use, such as TeXmaker, Kile, and TeXstudio**.** In particular, we’re going to focus on the TeXstudio editor. TeXstudio is a powerful LaTeX editor that offers many features, such as syntax highlighting, code folding, and an integrated PDF viewer.

Let’s install TeXstudio:

$ sudo apt-get install texstudio
Reading package lists... Done
Building dependency tree... Done
...
Processing triggers for mailcap (3.70+nmu1ubuntu1) ...
Processing triggers for libvlc-bin:amd64 (3.0.16-1build7) ...

Once we’ve installed LaTeX and TeXstudio, we can create our first LaTeX document.

3. Conclusion

In this article, we’ve discussed how to install LaTeX on Linux, which we saw is a straightforward process that we can complete in just a few steps. Once we’ve installed LaTeX and a LaTeX editor (TexStudio), we can start creating professional-looking documents with ease. We should have no issue launching LaTeX on Linux with the aid of the installation guidelines and advice offered in this article.