This question already has an answer here:
This question has been asked and supposedly answered before, but I can't make sense of the answers so I thought I'd ask my own question and hope for the best.
So, I use mcode.sty a lot and as things are now I have to copy that file into every folder where I have tex files that use mcode. What "central place" can I put it so I don't have to copy it all the time?
What I've tried:
sudo mkdir /usr/share/texlive/texmf-dist/tex/latex/mcode
sudo cp ~/.../mcode.sty /usr/share/texlive/texmf-dist/tex/latex/mcode
It doesn't work.