Welcome to the Linux Foundation Forum!

Lesson 3 - User Environment

In Setting Environment Variables:

the:

  1. $ vi .bashrc <-- added "export MYVAR=myvalue"

Is this an error?, It should be echo 'MYVAR=myvalue' >> .bashrc?

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Comments

  • Posts: 916
    edited December 2022

    the "<-- .." is a comment. Perhaps it would have been better to say "edit .bashrc to include the statement 'export MYVAR=myvalue' " and never mention "vi". You read the line too literally. It doesn't matter if you use vi, emacs, nano etc, as long as you include the line and start a fresh bash to make sure it is read in. Indeed another method of editing would be the >> command you show. :)

  • Posts: 7

    Maybe it's just a typo because the comment in the shell it's #

  • Posts: 916

    it's not a typo. It is just something on the printed page pointing to something else, not intended to be interpreted as a command or output. Perhaps poorly phrased as it confused you.

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Categories

Upcoming Training