Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add multiple path in $PATH variable linux?

Tags:

linux

path

I want to add multiple path in $path variable like java path and php path . how to do that in linux?

I am doing something in bash_profile like :

PATH=$JAVA_HOME/bin:$PATH:/usr/java/jdk1.7.0_45/bin/:$AWS_AUTO_SCALING_HOME/bin  
like image 616
user3086014 Avatar asked Jan 15 '14 07:01

user3086014


People also ask

How do you add multiple paths to a variable?

In the Environment Variables window (as shown below), highlight the Path variable in the System Variable section and click the Edit button. Add or modify the path lines with the paths you want the computer to access. Each different directory is separated with a semicolon, as shown below.

Can you have 2 PATH variables?

Luckily, it is quite easy in Spring to configure multiple path variables. All you need to do is to adapt the mapping path and to annotate all method arguments whose values are expected from the user. In this example, we configured two path variables.

How do I permanently add PATH to PATH variable in Linux?

Manipulating your PATH variable To make the change permanent, enter the command PATH=$PATH:/opt/bin into your home directory's . bashrc file.


1 Answers

$PATH can have several paths separated by a colon (:). E.g.:

export PATH=/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/myuser/bin 
like image 59
Mureinik Avatar answered Sep 19 '22 07:09

Mureinik