Results 1 to 3 of 3

Thread: CDPATH environmental variable???

  1. #1
    Join Date
    May 2013
    Beans
    28
    Distro
    Ubuntu 12.04 Precise Pangolin

    CDPATH environmental variable???

    Hello Everyone
    I'm reading a book on Ubuntu,"Ubuntu Unleashed". I just read a section on the "cd" command. In it I read the following piece, ....CDPATH environmental variable'. What does this mean, CDPATH and environmental variable.


    Thanks

  2. #2
    Join Date
    Feb 2009
    Location
    Dallas, TX
    Beans
    7,758
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: CDPATH environmental variable???

    Hi emerson1979.

    Environment variables are global variables that are available from every program in a particular session. A common used variable is USER. That holds the name of the current user. That way if you write a script or a program, you can know which user is running the program.

    You can see what's in a variable by echoing its value. For instance:
    Code:
    echo $USER
    To see all environment variables run this:
    Code:
    env
    For more details on environment variables see this: Ubuntu Help on Environment Variables.

    I wouldn't worry much about CDPATH. It enable kind of an advanced (and maybe confusing) feature. It is not used by Ubuntu, in other words, it is not set.

    Does that help? Let us know how it goes.
    Regards.

  3. #3
    Join Date
    May 2013
    Beans
    28
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: CDPATH environmental variable???

    Thanks a lot. Environmental variables are now understood

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •