I have an Ubuntu installation and wanting to insert class and style files so that they will be picked up by texhash. Where do I put them? My system denies me permission (is this a consequence of texlive or my configuration?) to add subfolders to texlive and texmf folders, and texhash does not seem to recognise the directory in which I stored them. I have also tried to amend the ls-R file directory, but permission is denied. Alternatively, how can I change the permissions on either creating subfolders or editing ls-R?


  • ~/texmf/tex/latex/foobar.sty, then run mktexlsr or texhash as simple user (actually, this is not even necessary for ~/texmf, in the default config on current Debian). Use the TeX Directory Structure for the layout of your ~/texmf/ (you can mimic the layout of /usr/share/texlive/texmf-dist, or whatever system TEXMF tree you have). – frougon Oct 23 '20 at 22:33
  • 1
    @frougon IIRC, it is discouraged to hash ~/texmf, and as you already mentioned, it isn't necessary. – Skillmon Oct 23 '20 at 22:40
  • @Skillmon I'm always happy to take a few seconds to run a command that will later save me microseconds a few times. ;-)) (assuming my ls-R file in ~/texmf is actually used...) – frougon Oct 23 '20 at 22:42
  • 1
    @frougon well, I'm happy to spend hours of my life optimising packages which are currently used by 0 users... :) – Skillmon Oct 23 '20 at 22:43
  • You can't directly make changes to your installation as your user doesn't have write permission to the folders TeX Live got installed in. That is a good thing security wise. You can still make changes by using for example sudo (but there is no reason to play with your texmf-dist, instead, play with /usr/share/texlive/texmf-local, which needs to be hashed as well) – Skillmon Oct 23 '20 at 22:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.