Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

472
Vistas
How to add multiple path in $PATH variable linux?

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 
over 4 years ago · Santiago Trujillo
3 Respuestas
Responde la pregunta

0

$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
over 4 years ago · Santiago Trujillo Denunciar

0

Set the $PATH environment variable to include the directory where you installed the bin directory with shell scripts and two consecutive export entries as in example.

Example:

export ANT_HOME=/path/to/ant/dir
export PATH=${PATH}:${ANT_HOME}/bin:${JAVA_HOME}/bin

To make them permanent entries update the bash_profile file.

over 4 years ago · Santiago Trujillo Denunciar

0

One way to add multiple executables to the $PATH variable is:

export PATH=/path/to/executable1:\
/path/to/executable2:\
/path/to/executable3:\
/path/to/executable4

If a $PATH already exists in .bash_profile, and you want them to take precedence over executables (like java and php), you can do:

export PATH=$PATH:/path/to/executable1:\
/path/to/executable2:\
/path/to/executable3:\
/path/to/executable4

If the path to any executable contains whitespaces, add the part / ... executableX in quotes.

Once you're done making changes in your bash_profile, source the file in a terminal session so that changes are effective immediately:

source .bash_profile
over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda