$PATH used by
sudo is different from the one used by
$USER, so if the
$PATH does not include, in your case, the path
sudo will not be able to find
I highly recommend that you can install texlive via
apt. See the Ubuntu package database for a list of all packages related to texlive. Also, from the same domain as you provided, they have a page specifically written for Debian-based (which Ubuntu is based on) systems. If you choose to install the full distribution of texlive, you will not have to install texlive packages using
tlmgr and just let
apt (the package manager for Debian-based systems) handle that for you. Otherwise, you will only need to run
tlmgr with the
sudo command, except now the distribution from
apt should provide a symlink (or equivalent) to a path that your root account refers to.
However, as pointed out in the subcomments, texlive on
apt is possibly outdated.
If disk space is a serious concern, and/or if you are comfortable with the command line, I highly recommend that you install
tlmgr as a user instead of root. Follow the guide from Wikibooks for a minimal installation process. Last time I checked, the guide is still up to date. The important point to install
tlmgr so that it does not require root access is the following:
- You may want to change the directory options. For example you may want to hide your personal macro folder which is located at TEXMFHOME. It is ~/texmf by default. Replace it by ~/.texmf to hide it.
You will need to change the default
/usr/local/ to your home directory.
If disk space is not of your concern, then just choose the full distribution schema.
See also @daleif's comment under this reply, especially these two sentences:
Ubuntu texlive is quite out of date and split into a myriad of Ubuntu packages. So a lot of users do not recommended using the apt version
Just more information for you to watch out for when deciding which installation path you wish to go down.