jueves, 22 de enero de 2015

set environment variables in Ubuntu

This trick is useful, specially if you're using software outside of the repos, some of them need to set custom environment variables, in order to accomplish that you may follow these steps:

1. open a terminal
2. type: sudo nano /etc/profile.d/newvars.sh
3. adjust your vars like this: export MYVAR=/target/directory ; save it
4. give execute permissions like: sudo chmod 755 /etc/profile.d/newvars.sh
5. logout and login again

cool

so check it like this:
1. printev | grep MYVAR
 you should see an output with the MYVAR's value

that's all

No hay comentarios:

Publicar un comentario