I am having trouble adding current PATH permanently on my ubuntu server for a postgresql user.
Every time I ssh or restart the server I have to run export PATH="${PATH}:${HOME}/.local/bin"
, I am running a python script which will not work unless this command is done so I tried a a simple addition of this in python but it didn't solve.
import os
cmd ='''export PATH="${PATH}:${HOME}/.local/bin"'''
os.system(cmd)
... rest of my code
I also tried sudo export PATH="${PATH}:${HOME}/.local/bin"
but it gets removed after each restart what can I do to permanently add this path or make the python script run it.