# [Tex/LaTex] About texhash and proper installation of TeXlive

installinglinuxtexlive

So, I'm running linux Mint (but I guess the same applies to Ubuntu) and as is common knowledge, their TeX distribution tends to be slightly outdated. Now I can't have none of that and decide to install it with the install-tl from the TeXlive homepage. Somehow, I cannot install it as a normal user (this I find normal as it is installing in the root directory), so I proceed to install TeXlive

sudo perl ./install-tl


and add the paths to .bashrc. All is well and my TeXlive installation works. Except for the texhash option. Running it as a normal user is no problem, except that I installed TeXlive as root, and so running texhash as normal user doesn't do anything (directory not writable. Skipping...). No problem I think, I'll just do it as root. But somehow texhash isn't installed for root.

Now, texhash is somehow connected to updating the directory tree, but I don't really know what it does. I use it on my ~/texmf/ folder to add my packages to a global path (I think), but when looking at info for this question I see in a comment for this question that this is apparently not needed, though I don't understand what I'm to do now.

So if I'm not adding new packages from CTAN or updating, I really don't need texhash and all is good?

To summarize: I'd like to know:

• Why should I need texhash?
• Can I avoid installing as root on linux Mint/ubuntu (here they say you don't have to be root, that it's even discouraged)?
• Should I somehow install texhash for root?

I realize this might be a vague question at best, but I didn't find an answer I readily understood, so I'd appreciate any thought on this.

Why should I need texhash?

TeX has lots of tiny files, .tfm files for instance. So finding something involves a lot of disk activity. Texhash looks once and remembers the locations of all the files in a simple single-file database, and then when TeX programs need to find those files the only reading is of that database. Roughly, it remembers where your TeX-relevant files are.

The downside is that when you add or move files you need to run texhash.

Can I avoid installing as root on linux Mint/ubuntu (here they say you don't have to be root, that it's even discouraged)?

I have installed as not-root on Ubuntu. (At the moment, I use the debian packages though.) If you have a one-person system probably root is the easiest.

Should I somehow install texhash for root?

What does whereis texhash say? (Mine says /usr/bin/texhash.) What are the permissions? For comparision, mine says this.

ftpmaint@millstone:~$ls -l /usr/bin/texhash lrwxrwxrwx 1 root root 8 2011-05-25 08:01 /usr/bin/texhash -> mktexlsr ftpmaint@millstone:~$ ls -l /usr/bin/mktexlsr
-rwxr-xr-x 1 root root 6885 2011-04-10 15:52 /usr/bin/mktexlsr