• Empleos
  • Sobre nosotros
  • profesionales
    • Inicio
    • Empleos
    • Cursos y retos
  • empresas
    • Inicio
    • Publicar vacante
    • Nuestro proceso
    • Precios
    • Evaluaciones
    • Nómina
    • Blog
    • Comercial
    • Calculadora de salario

0

397
Vistas
How to list all Linux environment variables including LD_LIBRARY_PATH

How to list all the environment variables in Linux?

When I type the command env or printenv it gives me lots of variables, but some variables like LD_LIBRARY_PATH and PKG_CONFIG don't show up in this list.

I want to type a command that list all the environment variables including this variables (LD_LIBRARY_PATH and PKG_CONFIG)

about 3 years ago · Santiago Trujillo
3 Respuestas
Responde la pregunta

0

env does list all environment variables.

If LD_LIBRARY_PATH is not there, then that variable was not declared; or was declared but not exported, so that child processes do not inherit it.

If you are setting LD_LIBRARY_PATH in your shell start-up files, like .bash_profile or .bashrc make sure it is exported:

export LD_LIBRARY_PATH
about 3 years ago · Santiago Trujillo Denunciar

0

try

export LD_LIBRARY_PATH=/usr/local/lib:${LD_LIBRARY_PATH}

This will modify the variable.

To print it, type: echo $LD_LIBRARY_PATH and it should show the above value.

If you're seeing nothing when you print that, then the variable might not be set.

about 3 years ago · Santiago Trujillo Denunciar

0

The question in fact is a good question. when run env or printenv, the output will be the system environment, but LD_LIBRARY_PATH is not belong to.

For example, if you set a=1, you can't show it by env. Same as LD_LIBRARY_PATH, it is used by ld.so only(ld. so – this little program that starts all your applications)

about 3 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 Nuestro proceso Comercial
Legal
Términos y condiciones Política de privacidad
© 2025 PeakU Inc. All Rights Reserved.

Andres GPT

Recomiéndame algunas ofertas
Necesito ayuda