Red Hat / Fedora :: Appending A Path To PATH Variable Permanently?
Oct 21, 2010
how to add a path to PATH variable permanently so that it remains persisent even after closing shell and rebooting the system when i added a path, to variable it remained there as long as i didn't closed the shell. but when i reopened it ,changed were undone.
Experimenting with shell variables, accidentally deleted the path variable how could I return to the original path value. What kinds of problems will I have if I don't have a path variable.
I am trying to figure out how i can add the path /usr/sbin/ into the $PATH variable. I want this to be used from the normal account. I am bored settinh this manualy each time my computer starts.
I am failing to set PATH for all the users on a linux box(Fedora 8), permanently. Basically, I have installed two different versions of python(2.5 & 2.7) Python2.5 path is /usr/bin and it is set by default for all users(not by me, also i don't know how ) and it is working fine.
Python2.7 path is /usr/bin/Python27/bin, so tried this:
PATH=$PATH:/usr/bin/Python27/bin
And it worked only for that particular session and for only root, as I set path from root user. So, i need this to be set for all the users on the linux box, including root, more importantly as permanent. So if any user types "python27" at the command prompt, it should give python2.7 prompt.
I have added the smbd file location to the path of root. I can now execute it from any location. I noticed after reboot of the machine (RHEL 5) that this file location is no longer in the path. How do I make this permanent?
Originally Posted by Gekitsuu you should be able to do NEWSTRING=$STRING1$STRING2 it works but i can't use it for creating a path variable / file name.
e.g. $STRING1 = path $STRING2 = filename cat $STRING1$STRING2 will not work. so how to get this working?
I'm fairly new to Fedora (only been using it for about a month) and I'm installing the Android plugin for Eclipse so I can do some development. I am following the directions at the android website and it says to put the path of my downloaded SDK into the system PATH variable. I know how to do this on windows but I have never done it in fedora.
I want to add following variables to PATH. I am doing following steps.
1- I open terminal window. 2- I write following commands : export GOROOT=/home/linux/go/hg export GOOS=linux
[Code].....
My problem is that , env is not showing above mentioned variables in PATH. Or I am using wrong command to get stored paths or I am storing my path variables in wrong file ?
how I store above mentioned variables in PATH permanently.
I'm working on my first .deb package. I need to add the /usr/sbin directory to $PATH for root. I think the easiest way to accomplish this is to add a little code to the postinst file.
After saving above changes, I enter the command: source ~/.bashrc Now if I do echo $PATH, the path shows both the old PLAY_HOME and new PLAY_HOME. This is really bad and messes up a lot of things in my project. This problem only goes away if I logout or reboot, a rather very long process. What is happening is that the old path is added to new path element and the old path includes the old path element you want to remove.
I have just installed Ubuntu onto my machine and my question is if it automatically comes with the PATH environment variable?If so, how do I add something such as python.exe to the PATH environment variable?
I need to set PATH environment variables so they will be set every tie I startup ubuntu. Is there a startup script that will do this, and where is it located?
I was changing my sudoers file to give permission of using "sudo" command to all root commands, asking for the password. It works, it's fine. The problem I'm having is with the variable PATH to my user, I think.
In terminal: normal user:
Code:
ataias@ataias-notebook:~/Downloads$ echo $PATH /usr/local/bin:/bin:/usr/bin super user:
I want to add my current working directory to the PATH variable and make it permanant in my .bash_profile so I can run my testscript without using the ./ charactors.can this be done?
I didn't find this question in the FAQ or through the Search button.I added a server application and would like to update the PATH env't variable so that I don't have to type the full path for its binaries. I'd like to make sure I do it right: Do I just need to edit /etc/profile or is there another file somewhere in CentOS that I should use instead?
I'm taking here about tins of directories, thousands of files. I'm looking to find a command that makes me able to move the results above to another path, and to create that path once it doesn't exist like below:
Java applet not loading image with relative path(e.g. images/1.jpg) but loads image with absolute path(i.e. from /root/user/images/1.jpg) . This is a problem when i want to host the applet on web server
I have been trying to change my PATH environment variable to no avail. I am using Jessie i386 with MATE. Using my .bashrc file works but not well because with subshells the modifications get repeated. I want the change to occur on login.
I tried modifying ~/.profile ~/.bash_profile /etc/profile and /etc/environment and one or two others but in no case did my change get picked up even after logging out and in again and even after rebooting. I searched the Internet and found each of the above places to make the change but they don't seem to work with Jessie.
I want to add a path (/usr/sys) to the global $PATH. I will use this to test commands and scripts, which I don't want to be mixed up with regular commands. I've added the path to /etc/environment. When I start a terminal session under my user account, the path is included in the $PATH variable. However, when I start a root terminal, it is not. Is there a way to to change $PATH on one place where it will also affect the root terminal, or do I have to change it on 2 locations?
What steps have to be followed for having customized contents of PATH environment variable whenever new users are created? I require this in order to include a special directory into PATH variable; and this has to be a default one for all the newly created users.
I have downloaded java and installed it with chmod +x and then ./bin package.
Hereunder is an output from CLI (putty)
I understand that the system knows the java is in a wrong place but if I do java -version it finds it correctly. I don't know and I don't understand how do I need to tell the OS that the java is somewhere else, I just did that with export java home and java path but still dosen't work, it keep tells when I do whereis java "java: /usr/share/java"
I'm having a strange issue with the PATH variable when running the command 'sudo su'. When executing this command the PATH variable changes. No problems there, but it changes to:
Code:
Looking at this, there are two weird entries (//sbin and //bin) which should both start '/usr' instead. I'm not sure how I've managed to change this, or how a piece of software I'm using has done it (more likely it was me I expect), but could anyone suggest which file to look in to correct it? If it makes a difference the machine is running CentOS 5.
I'm trying to pass a path as a string to an array, but its evaluating it as a command instead. I want to take the literal string "/mnt/accounts/user/temp/*.jpg" and assign it to an array{1}, but when i echo the array variable, it displays it as
pic1.jpg pic2.jpg pic3.jpg
[code]....
I just want it to be the actual text "/mnt/accounts/user/temp/*.jpg" which i will be combining with other text to create a longer path elsewhere in the code.