Environment variables remain

0

I'm following this tutorial, in Linux, but every time I restart I have to set everything up again

What do I have to do for the settings to remain globally?

I'm using Linux Mint Cinamon (Sylvia) 64 bits

[EDIT1]

For example:

I do this in the terminal, there when I run inside the terminal of PhpStorm, the command tsc -w for example it said: /usr/bin/env: “node”: Arquivo ou diretório não encontrado , there only the variables that works. But every time you want to open a new terminal window I have to set the environment variables again

In fact if I use the command ~/.profile it gives this message bash: /home/carlos/.profile: Permissão negada both in root and in my user

    
asked by anonymous 13.04.2018 / 22:21

1 answer

3

The ~/.profile quoted in the video is not a command and so when typing the message occurs:

  

Permission denied

It is a configuration document, ie you have to edit it with a word processor, such as Vim for example, then when you open it in your text editor on the last line something in it) add this (do not delete anything):

export NODEJS_HOME=/usr/local/lib/nodejs/node-v8.9.4/bin
export PATH=$NODEJS_HOME:$PATH

Then save the document, when saving it you may need to refresh (or log off), to do the refresh type exactly this (including the start point before the file path):

. ~/.profile

In the terminal it will look like something like:

$. ~/.profile

Ready should work, so to test if it had effect execute in the terminal this:

node -v
    
14.04.2018 / 03:36