*** how to set up a variable in Linux? *** - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

*** how to set up a variable in Linux? ***

I am a newbie. I know this is a little off-stream of programming, but it is the problem when I tried to program in linux. I wonder if there is a way to set up a variable, say $VAR = /home/root, so that I can use
cd $VAR
instead of
cd /home/root

Comments

  • IDKIDK Posts: 1,784Member
    : I am a newbie. I know this is a little off-stream of programming,
    : but it is the problem when I tried to program in linux. I wonder if
    : there is a way to set up a variable, say $VAR = /home/root, so that
    : I can use
    : cd $VAR
    : instead of
    : cd /home/root
    :

    See man export
Sign In or Register to comment.