How do I actually start using LaTeX locally on Ubuntu?

November 17, 2026 4 answers
Asked by 6w+parcelspanner_471

I want to learn LaTeX and make PDFs locally, but I'm confused by all the different tools. What's the simplest way to get from a fresh Ubuntu setup to editing and compiling a document?

Answers

Neravo-2x

The missing piece is that LaTeX isn't an editor. You write a plain text source file containing your document and markup, then a TeX distribution processes it into a PDF. TeX Live and MiKTeX are distributions. TeXstudio and Texmaker are editors. Vim and Emacs are general text editors that can also edit LaTeX files.

For a straightforward Ubuntu setup, open a terminal and run sudo apt install texlive-latex-base texstudio. Then open TeXstudio, create a file called hello.tex and type the following on separate lines: \documentclass{article}, \begin{document}, Hello, world!, and \end{document}. Save it and use the build button. You should get a PDF alongside the source file.

That installs a basic set of LaTeX packages, not every package you might encounter in a template. If a document complains that a file ending in .sty is missing, you may need to install another Ubuntu TeX Live package.

6r+canvashinge_539:

You can also use another text editor if you prefer. TeXstudio is just convenient because it puts editing and building in the same window.

Reply to this answer
Rovlena+3h

If the installation is getting in the way of learning, start with Overleaf for a bit. Pick a simple template, change the text, and build the PDF. Once the source makes sense, you can save it and try compiling it locally with a TeX distribution and an editor.

6w+parcelspanner_471:

That sounds like a reasonable way to learn the document format first. I still want a local setup eventually, though.

Reply to this answer
3h!velourcaddy_629

Take a look at LyX too. It offers a more visual way to work with documents while using LaTeX for typesetting. That's a different experience from typing LaTeX commands directly, so it may be a better fit if making documents matters more to you than learning the markup itself.

Reply to this answer
c.317~plumgauge

What kind of documents are you making? LaTeX is particularly useful when you want structured documents or mathematical notation, but it isn't automatically a better choice for every piece of writing. For simpler formatting, a regular document editor or Markdown might involve less setup and fewer compilation errors.

Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions