FAQ: Environment - Bash Profile

This community-built FAQ covers the “Bash Profile” exercise from the lesson “Environment”.

Paths and Courses
This exercise can be found in the following Codecademy content:

Web Development

Learn the Command Line

FAQs on the exercise Bash Profile

There are currently no frequently asked questions associated with this exercise – that’s where you come in! You can contribute to this section by offering your own questions, answers, or clarifications on this exercise. Ask or answer a question by clicking reply (reply) below.

If you’ve had an “aha” moment about the concepts, formatting, syntax, or anything else with this exercise, consider sharing those insights! Teaching others and answering their questions is one of the best ways to learn and stay sharp.

Join the Discussion. Help a fellow learner on their journey.

Ask or answer a question about this exercise by clicking reply (reply) below!
You can also find further discussion and get answers to your questions over in #get-help.

Agree with a comment or answer? Like (like) to up-vote the contribution!

Need broader help or resources? Head to #get-help and #community:tips-and-resources. If you are wanting feedback or inspiration for a project, check out #project.

Looking for motivation to keep learning? Join our wider discussions in #community

Learn more about how to use this guide.

Found a bug? Report it online, or post in #community:Codecademy-Bug-Reporting

Have a question about your account or billing? Reach out to our customer support team!

None of the above? Find out where to ask other questions here!

Hello. I’m stuck on the “Bash Profile” exercise. I was able to get past step 1 but I’m not able to get past step 2. What should I do differently? The message at the bottom keeps saying, “Did you use to create a greeting in the bash profile that begins with ?”

Same here, but I first wrote plain echo Mamma. Then I changed that to be echo “Mamma” which worked.
I tried on my computer, but this does not recognise nano at all.

Same here; i started out by moving back and forth between by computers’ gitbash and codeacademy - big mistake, i ended up with a 3 line welcome on my nano!
2nd, try not to overthink it. just type the exact steps (.ctr + o…). There needs to be much more explanation of what’s happening for this nano tool!

I had the same issue and as the error message was not clear it took me a while to figure it out! The issue for me was that when i opened nano is was typing nano ~/ .bash_profile but this did not open the correct file. It worked when i didn’t use a space between / and . (nano ~/.bash_profile)

Did you passed in the exercise of Bash Profile.?
I was getting some errors while submitting the step-2 of the BashProfile Exercise! :pensive: Please help me with this

Welcome to the forums!

What errors are you getting?

Greetings everyone. I just solved the problem for step number two. On step one you have to type
$ nano ~/.bash_profile. But on step two you have to write the same thing but everything has to be together. Don`t leave any spaces in between.


Hi Admin/Forum peers,

I ran into the same issue with task 3, step 2 - following the instructions exactly step by step would always prompt this error "Did you use to create a greeting in the bash profile that begins with ?"

Please kindly advise what to do as I really need to finish this command line stuff to brush up on it and get prepared for a job interview. Very frustrating at the moment as I have literally tried any other way and researched on google and none could solve this issue, which is apparently a bug. Thanks in advance.

have you typed string starting with echo ?


I have a question about step 2. In the end, it says:

Then, once you’ve exited nano and are back in the terminal, press the Enter (or return for Mac) key onto a new line.

Why do I need to press Enter here if the command prompt is already available for typing a new command?

1 Like

If I had to guess it’s probably to trigger some sort of background check which allows you to complete the task. It’s not a requirement of the shell itself.

1 Like

I think you’re right. At the same time, it would be nice to explain such things explicitly in the course itself. Anyway, thanks!

1 Like

You saved my life) It worked. it is almost a guessing situation instead of knowledge. What’s up w/that?

guys, rewrite without any space nano~/.bash_profile in step 2 terminal and THEN continue to echo “Welcome, Jane Doe” steps

  1. Why should I use bash profile?
    For example if I can use “nano hello.text” to edit edit and store file, why I have to use bash profile to edit and store?
  2. What is the deference between a bash profile and a normal text file, and What is the deference between a bash profile and a profile?


nano is used to create files (such as a .txt file for text).

The Bash Profile is used to store environment settings.
You shouldn’t use it to store regular file content but instead information about what to do when bash runs.
For example, one of the exercises modifies the bash profile so a statement is written to the screen whenever the bash is loaded.

By ‘profile’, if you mean a .profile file, it acts similarly to the bash profile. However, as the Bash Profile is specific to bash only, you should use this to create commands for when bash starts.

Hope that explains the difference.


Thank you very much for answering! You explained the concepts very clear. It is really helpful!

1 Like

The work around solution that I discovered was to reset this entire section, not the exercise solely.

Go to the first slide > click Get Unstuck > click Reset Exercise


Hate the fact that this worked lol completely correct… just chance…not knowledge .-.

Was anyone able to get their bash profile actually print out anything when opening a new terminal?
I had to edit the .bashrc profile has well to get it t work, I did this in my separate ubuntu environment

1 Like