PATH settings don't seem to persist across sessions
I recently installed LaTeX on my linux machine and I attempted to add a directory to the PATH as the instructions say to do. They tell me to give the following command:
After I do this I can use commands such as "pdflatex" anywhere, but if I close that terminal and open a new one, it's as if I never added that to the PATH. That directory no longer shows up when I give the command "echo $PATH".
I have read multiple sources regarding this process and they never mention my problem. I am pretty new to linux so I don't have any clue what's happening. Any help would be appreciated.
you have to add that to either of these files depending on your linux distro
these are usually under /root
.profile, or .bash_rc or .bash_profile file
If you add the entry into the /etc/profile file then it will remain persistent between all sessions for all users, you should not be using /root for running programs, you should have other users created with sudo access so they will need to have this directory in their PATH too.
I tried adding the lines to /root/.bashrc and /root/.bash_profile but that didn't do anything.
I looked at /etc/bashrc and /etc/profile and neither of them seemed like the appropriate places to be putting that stuff (b/c system-wide functions and were being defined and I didn't wanna mess anything up).
Finally I looked again and found a couple promising looking files in my home folder. When i added the lines above to ~/.bashrc it worked!
From the replies I assume that this means that these PATH settings will not be usable for all users?
I looked at /etc/bashrc and /etc/profile and neither of them seemed like the appropriate places to be putting that stuff (b/c system-wide functions and were being defined and I didn't wanna mess anything up).
These are no different to the ~/.bashrc or ~/.bash_profile, they just get applied to all users, as long as you append to the bottom of them you wont break anything. And they are not setting any system functions, it is all settings in a users environment.
If you use the local profile to set the PATH settings you need to do it for each user you want to have access to.
and just change the username, instead of manually doing vi on each script.
Currently I am using this laborious command
lvdisplay | awk '/LV Path/ {p=$3} /LV Name/ {n=$3} /VG Name/ {v=$3} /Block device/ {d=$3; sub(".*:", "/dev/dm-", d); printf "%s\t%s\t%s\n", p, "/dev/mapper/"v"-"n, d}'
Would like to know if there is any shorter method to get this mapping of... (2 Replies)
Solaris 10
I am trying to delete a route using the command:
route -p delete 192.0.0.0 192.1.3.254
The route gets delete but for some reason the route pops back up in the routing table after reboot. I also deleted the /etc/inet/static_routes file and the route still persists after reboot.... (6 Replies)
I'm wondering if it is possible to use Exceed as a remote desktop and have my session persist after I close it down (ala VNC Viewer). I find it annoying to always have to reopen my windows and files when I shut it down.
Thanks! (0 Replies)
Just i want to ask How to search and display name of zero byte file
I have used find command but it is showing complete file path
Thanks
find . -size 0
giving me zero byte file with location
1)/home/user/a (4 Replies)
Hello,
On Aix 5.2, we changed the parameters tcp_keepinit, tcp_keepintvl and tcp_keepidle with the no command.
tunrestore -R is present in inittab
in the directory /etc/tunables we can clearly see the inclusion of parameters during reboot, including the file lastboot.log
... (0 Replies)
Hello All,
In the output of the command "mpdcontrol -no xlist", I found that, some of the preferred paths are marked as "err". You can see the output below:
# mpdcontrol -noxlist
Unit Dev# MPD_ID/Policy DeviceName FC_AL DevMajMin IOcnt State... (0 Replies)