Environment vairiable

Hello everyone , I have a problem with the environment variablr exercice .
In that exercice they ask us to open bash profile with nano then update the bash profile with source and Finlay use echo to output the variable . i’ve done everything correcly but when i put echo $User it says type the command after the shell prompt .

I don’t understand what is the problem , could someone help me please ? :smiley: Thank you for your answer

Hi can you link to the exercise?

1 Like

Yes sir, this is here: https://www.codecademy.com/courses/learn-the-command-line/lessons/learn-command-line-environment/exercises/configuring-environment-environment-variables

Thank you for your help :slightly_smiling_face:

1 Like

So this is how you can check if it’s missing a step.

At the $ prompt: Type

cat ~/.bash_profile

It will output the .bash_profile contents if it has any, and if it doesn’t it will just output whitespace.
If you see your contents like this

$ cat ~/.bash_profile
export USER="Jane Doe" #this is the output you want

then simply type the 2 commands.

source ~/.bash_profile
echo $USER

if you got the whitespace, you have to open up the file.
One way to do it:

nano ~/.bash_profile
#open and edit your file

Type

export USER="Jane Doe"

make sure to save and quit the file.
And try the earlier steps again.

Hello , thank you it works ,have à good day