General :: Setting PATH Variable To Bin Directory In Ubuntu
Feb 18, 2011
I installed java in my pc by running the following on the shell
./jdk-6u24-linux-i586.
I need to set the path to the bin directory and also a new environmental variable JAVA_HOME.
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 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.
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.
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.
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 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 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 am using CentOS5.5 & everytime it is showing command not found. If I export the path as below it will be working fine until a reboot. Again same error i.e command not found if I open new terminal. Every time I am exporting as below:
How can I set these permanently as that the paths should automatically be exported for everyone user whenever the system boots. And command completion also should happen for eg. #fdi (press tab), then it should show available options such as fdisk, etc.
Whenever i want to start tomcat server I need to go totomcatdir>inand execute startup.sh file.How would i make this happen whenever i start my machine?Also want to know How would i set the variable at startup.
I have program (command line) that requires another program be installed and in its path. So I downloaded the file (.tgz), and extracted. I followed the compile and make instructions and ended up with a folder on my desktop that contains the excutable but is not in the path of the the other program. How can I do this..I think that I have about 20 more .tgz files to do this with.
I'm trying to define a variable, CHAN, by dividing another variable, FREQ, by a number. FREQ is a value from a file (called header.txt). What I think I'm doing with this bit of code is reading a number from header.txt whose location is specified by the head and tails, assigning it to FREQ and then defining CHAN with bc.
I installed "jdk1.6.0.bin" and "jre1.6.0.bin" successfully. But I don't know where they are installed. I can't find anywhere. What is the default path they are installed.I want to set JAVA_HOME.
I've been looking around the net for executing a shell script. My basic understanding is that after setting executable permissions and providing a path (#!/bin/sh) in the first line of the script, I can type ./myscript to execute instead of sh myscript. This is not working for me. I can run "sh myscript" but not "./myscript" even though I know for sure I have across the board execute permission and my sh path is correct. I'm working on a redhat linux station.
I'm trying to write a script in python to extract data from maillogs in gz format. I wrote a shell script but i now want to do this in python, as thats the preferred method where i work. anyway does anyone know how to specify directory paths for example the maillogs exist in /var/log so i want the script to go to that directory would LOG_DIR="/var/log/" work?
I am using Apache/2.2.3 on Centos 55. I am having an issue that is pretty strange to me. Whenever I navigate to a url on my webserver from outside my network. I have to put a '/' in the directory path for example When I type in: mydomain.com/directory1 it winds up redirecting to the hostname for my server HOWEVER When I type in mydomain.com/directory1/ it works, since I am adding the '/' at the end of the path. I suspect it is because I do not have my FQDN set up correctly.I did not have this issue when I was using Ubuntu 10.04 , I suspect because Ubuntu automagically set this up for me. Is there a particular way I need to setup my FQDN in centos to get this to work properly? I have tried going into /etc/hosts and adding my FQDN in there, but I do not think I did it properly, is there a particular way the /etc/hosts file needs to be setup?
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 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?
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 get this every time I try to run a game eg pacman Command 'pacman' is available in '/usr/games/pacman' The command could not be located because '/usr/games' is not included in the PATH environment variable. pacman: command not found