If i run in terminal sudo pdflatex file.tex it works and compiles but not if i dont add sudo nor use texstudio?
I tryed to add pdflatex to my $PATH:
PATH=$PATH:/usr/bin/pdflatex
export PATH
but it didnt help.
$ sudo which pdflatex
/usr/bin/pdflatex