[Solved] Locate executable for newly installed program?

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
tallyrand

[Solved] Locate executable for newly installed program?

Post by tallyrand »

Hi,
I'd like to use latex at the command line on mint. I issue the command 'latex' and am told

Command 'latex' not found, but can be installed with:
sudo apt install texlive-latex-base

I issue the suggested command and latex appears to install successfully. However, re-entering 'latex' then just leads to the same response as before. I'm guessing that I somehow have to add the directory where latex has been installed to my search path, but i don't know how to find that directory. Can anyone help?
tally
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
xenopeek
Level 25
Level 25
Posts: 29597
Joined: Wed Jul 06, 2011 3:58 am

Re: Locate executable for newly installed program?

Post by xenopeek »

That package installs the binary /usr/bin/latex. If the directory /usr/bin is not in your PATH you have a real issue.

Check what is in your PATH:
echo $PATH
Check that the file /usr/bin/latex exists and is an executable:
file /usr/bin/latex
Image
tallyrand

Re: Locate executable for newly installed program?

Post by tallyrand »

xenopeek wrote: Wed Sep 12, 2018 7:16 am That package installs the binary /usr/bin/latex. If the directory /usr/bin is not in your PATH you have a real issue.

Check what is in your PATH:
echo $PATH
Check that the file /usr/bin/latex exists and is an executable:
file /usr/bin/latex
Thank you. I ran the installation command again then used 'file /usr/bin/latex' to find that /usr/bin/latex is a symbolic link to pdftex and now all seems to be working. I'm not sure why it wasn't after my first installation attempt.
User avatar
BenTrabetere
Level 7
Level 7
Posts: 1890
Joined: Sat Jul 19, 2014 12:04 am
Location: Hattiesburg, MS USA

Re: [Solved] Locate executable for newly installed program?

Post by BenTrabetere »

Use the which command to locate commands. It will provide the full path to the executable.

Code: Select all

$ which latex
/usr/bin/latex
Patreon sponsor since August 2022
Image
Locked

Return to “Beginner Questions”