Find the answer to your Linux question:
Results 1 to 3 of 3
coded this line in my .profile alias cddb2='cd /opt/ibm/db2/V9.7/bin' after I save ,exit the session and come back and try it outs its saying cddb2 not found. Help please...
  1. #1
    PRA
    PRA is offline
    Just Joined!
    Join Date
    Apr 2011
    Posts
    1

    Alias not working for me

    coded this line in my .profile
    alias cddb2='cd /opt/ibm/db2/V9.7/bin'

    after I save ,exit the session and come back and try it outs its saying cddb2 not found.

    Help please

  2. #2
    tpl
    tpl is offline
    Linux User
    Join Date
    Jan 2007
    Location
    cleveland
    Posts
    452
    welcome to the forum

    try "sh .profile"
    the sun is new every day (heraclitus)

  3. #3
    Trusted Penguin Cabhan's Avatar
    Join Date
    Jan 2005
    Location
    Seattle, WA, USA
    Posts
    3,230
    There are two files that are automatically read by Bash when you start a shell: .bash_profile and .bashrc.

    .bash_profile is only read for the initial login shell, and .bashrc is read for every shell that you start. .bash_profile often only contains a single line:
    Code:
    source ~/.bashrc
    Which effectively makes your .bash_profile and your .bashrc the same file.

    So add the line to your ~/.bashrc file and it should work.
    DISTRO=Arch
    Registered Linux User #388732

Posting Permissions

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