Adding something to my $PATH permanently

Hi folks. I want to add /usr/local/bin to my $PATH, permanently. After reading the threads in here, I still am confused about how to do it.
This is what I am trying:
PATH=/usr/local/bin:$PATH
export $PATH
So when I do this:
echo $PATH
...it comes back fine. Then I close the window, she goes back to the normal value without /usr/local/bin.
Any ideas? I'm running the bash shell.
Cheers

Hi BioRich,
   If you read the invocation section of the bash man page you will find the following:
When bash is invoked as an interactive login shell, or as a non-inter- active shell with the --login option, it first reads and executes com- mands from the file /etc/profile, if that file exists. After read- ing that file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.pro- file, in that order, and reads and executes commands from the first one that exists and is readable. ... When an interactive shell that is not a login shell is started, bash reads and executes commands from ~/.bashrc, if that file exists.
What the man page doesn't tell you is what a login shell is. It is generally the first shell you open and it usually suffices to set the PATH in that shell because subsequent shells opened in the same terminal application will inherit the environment of the login shell. However, shells opened in other terminal applications will not inherit the environment. The bash shell fails to consider this now common situation.
   To get around this shortcoming, it is common to put all of your configuration commands in a file sourced by a login shell, such as the ~/.bash_profile as suggested by Asher, and then to source that file from the ~/.bashrc.
   That gives rise to a new problem: redundant path elements. If a non-login shell does inherit the environment of the login shell then the sourcing the ~/.bash_profile will add path elements a second time. A solution to this problem is to test the environment before sourcing the ~/.bash_profile to see if the environment has already been "fixed." A slightly more elegant solution is to check the path before adding to it. This can be done with functions like "append_path" or "prepend_path" functions like those defined in FInk's init.sh file.
Edit: They stopped respecting the <BLOCKQUOTE> tag in the stupid forum software! This just gets worse and worse.
Gary
~~~~
   When Marriage is Outlawed, Only Outlaws will have Inlaws.

Similar Messages

  • When logging in into yahoo mail after typing in password Firefox is adding something, login fails all the time. At yahoo mail Notepad does not work because it is impossible to close the list of items and they cover information, so I have to go to IE.

    When logging in into yahoo mail after typing in password Firefox is adding something, probably remembered password and login fails all the time. At yahoo mail Notepad does not work because it is impossible to close the list of items and they cover information, so I have to go to IE.

    Only when i go to a different browser (like IE) after i clear it , then all that shows up is the pages i visited in IE , that is what bugs me , why is IE browsing history sowing up in Firefox ??
    Basically , i can clear the history in Firefox , and then for a example , go to Craigslist , using IE7 (launching it from a complete different Icon , in other words at that time i never open Firefox) , then after closing out , or even leaving open as it does not seem to matter , i go into Firefox , and hit History , and there is every place i visited in IE7 , on my History in Firefox

  • I was adding something to one of my notes when half of my notes disappeared, how can I find them again, they are not even in my iCloud?

    i was adding something to one of my notes when half of my notes disappeared, how can I find them again, they are not even in my iCloud?

    http://support.apple.com/kb/HT1848  Did you transfer your purchased item, take a look at the link

  • Application Path Member will be deleted after adding a new Application Path Member in another Application Path List

    I expirienced the behaviour that the first item in the Application Path Member from a Application Path List will be deleted as far as the first item in the Application Path Member List will be selected in anather Application Path List without saving. This is according to severals peripherals as well.
    Example:
    Configuration Manager > Application Path List
    In the Application Path List "McalMediaRouting" the following Application Path Members are configured.
    For this example, the first Media Routing Domain for the Peripheral is Chat.
    Now, adding a new Application Path Member for the Application Path List "SiebelMediaRouting" with a new Media Routing Domain, which is not yet assigned to a Application Path List.
    Select the same Peripheral PG1A_CCM and choose the new MediaRouting from the list. At this point the Application Path Memeber with the Media Routing Domain "Chat" will be deleted in the Application Path List "McalMediaRouting". This will be deleted even without saving it.
    UCCE Version 9.0.2 used.
    Is this per design or is this a defect?
    Kind regards
    David

    HI
    add that fileds in the all locations where you need it like
    in internal table declaration , write statement , select statement
    these are the main areas where you have to add that 2 fileds

  • Best practice for adding application to $env:Path in PowerShell?

    I'm trying to figure out the best way to add a program to PS's path. When I look at $env:Path, I see tons of different entries pointing to various programs on the system that seem to have been added by their installers. This would suggest that I could just
    add another entry pointing to the .exe I want to have available in the path, but if I do this every time I want to have an application available at the shell my path is going to get hideously cluttered.
    In bash, I would normally make a bin directory within my home directory, add it to the path at startup in my .bashrc, and then make symlinks in that directory for anything I wanted available. This keeps the path clean and easy to manage. Is there a way to
    do something like this in PS, or is the standard solution just to add a new entry to the path for every application you want until it's like a million miles long and unreadable? Putting symlinks or shortcuts in directories already in the path hasn't worked
    so far.

    I'm trying to figure out the best way to add a program to PS's path. When I look at $env:Path, I see tons of different entries pointing to various programs on the system that seem to have been added by their installers. This would suggest that I could just
    add another entry pointing to the .exe I want to have available in the path, but if I do this every time I want to have an application available at the shell my path is going to get hideously cluttered.
    In bash, I would normally make a bin directory within my home directory, add it to the path at startup in my .bashrc, and then make symlinks in that directory for anything I wanted available. This keeps the path clean and easy to manage. Is there a way to
    do something like this in PS, or is the standard solution just to add a new entry to the path for every application you want until it's like a million miles long and unreadable? Putting symlinks or shortcuts in directories already in the path hasn't worked
    so far.
    You can't put symlinks in a folder to a folder but you must put a link or shortcut to the executable.  Links to folders are not scanned. Only the root folder in the path is scanned.  No programs wil lever be found through the path if it is in the
    current folder in a PowerShell session.
    You can quickly alter the patch for the current session like this:
    $env:path+='c:\myprogramfolder'
    When you exit PowerShell it will not reamian.  It will only change the PowerShell process path for that PowerShell session.
    ¯\_(ツ)_/¯

  • Pkg com.sap.aii.proxy.framework.core don't exist even added in the JRE path

    Hi All,
    I am facing some error while activating the activity. I have checked-in the activity but getting the error while trying to activated the activity. there are two DC's in one of them i am gettign this error. i have not noticed this while check-in.
    After checked in - i am not getting the  any such option --Revert activitty or delete activity.
    This activity is alreday closed.. what i can do with this activity??  After this error i am not able to activate any activity. I am getting the below error in all the activity.
    package com.sap.aii.proxy.framework.core does not exist even though i have added this into the  JRE path in NWDS. Do i need to import the same version file somewhere into J2ee server or somewhere else??
    Regards,
    Narpal

    Hi,
    javac ERROR: class file has wrong version 49.0, should be 48.0
    This error means that the class file in question is being built with JDK1.5 (49), however it should be built with JDK1.4.2 (48).
    In other words, as per the class the build expects a class file built with 1.4.2, but in your track JDK1.5 is configured for the build tool.
    You need to therefore :
    A.) review the CBS service settings, as most likely the parameters BUILDT_TOOL_JDK_HOME and JDK_HOME_PATHS are set up improperly.
    B.) plus the build variant is incorrect in the track in question.
    I'll refer below to the corresponding points with the letters A and B.
    Some more explanation on the error:
    If you check any class file with a hex editor, you'll see at the beginning of it this:
    example: CA FE BA BE | 00 00 |00 31  ...
    JDK 1.6 = 50 (0x32 hex)
    JDK 1.5 = 49 (0x31 hex = (161)*3 + (160)*1 = 49)
    JDK 1.4 = 48 (0x30 hex)
    JDK 1.3 = 47 (0x2F hex)
    JDK 1.2 = 46 (0x2E hex)
    JDK 1.1 = 45 (0x2D hex)
    On the first 4 bytes there's a magic number (CAFEBABE) which ensures this is a java class file, then on 2-2 bytes you'll see the minor and the major version (in this order). In the above example 00 00 | 00 31. This is what displayed as major.minor i.e. 49.0 what you can see in error messages. See also the attachment I've put to this thread minormajor.JPG.
    More information on the class file structure:
    http://java.sun.com/docs/books/jvms/second_edition/html/ClassFile.doc.html
    For point A)
    See the guide for doublechecking the CBS parameters
    help.sap.com u2013 CBS Service Properties
    http://help.sap.com/saphelp_nw70/helpdata/EN/53/75b3407e73c57fe10000000a1550b0/frameset.htm
    Further explanation to the paramters
    BUILD_TOOL_JDK_HOME and JDK_HOME_PATHS
    BUILD_TOOL_JDK_HOME = <path to highest JDK>
    JDK_HOME_PATHS = JDK1.3.1_HOME=<path of jdk131>;JDK1.4.2_HOME=<path of jdk142>;JDK1.5.0_HOME=<path of jdk150>JDK1.6.0_HOME=<path of jdk160>;default=<path of the JDK as default>
    Some simple rules with examples:
    - for BUILD_TOOL_JDK_HOME you simply enter the path to your JDK, e.g.: /opt/IBMJava2-amd64-142
    - for JDK_HOME_PATHS you have to follow the scheme "key=value" e.g.: JDK_1.4.2_HOME=/opt/IBMJava2-amd64-142
    - for BUILD_TOOL_JDK_HOME you always specify the highest JDK,
    - for JDK_HOME_PATHS you list the available JDKs.
    - JRE is not allowed, specify always JDK!
    For point B)
    Regarding the build variant in your track: check the page 13 for the paramter com.sap.jdk.home_path_key as per the guide :
    How To... Setup an NWDI Track for Composition Environment Developments
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/7014086d-3fd9-2910-80bd-be3417810c6f
    Summary:
    A. The first part of the solution is then to doublecheck the CBS service parameters. CBS service must be restarted after changes.
    B. The second part is to doublecheck the build variant in the track (see the Build Variants tab on the Track Data tab on the CMS webui  - Landscape Configurator).
    I recommend you to have
    A) BUILD_TOOL_JDK_HOME = <highest available JDK, I recommend here to set the path to JDK1.5>
    JDK_HOME_PATHS = JDK1.4.2_HOME=<path of jdk142>;JDK1.5.0_HOME=<path of jdk150>;default=<path of the JDK as default, set it to the same path as you did for 1.4.2_HOME>
    B) set the com.sap.jdk.home_path_key in the build variant to 1.4.2_HOME, or leave it for the default. Do not forget to set this build variant explicitly for >= 7.1 tracks to JDK1.5.0_HOME
    I hope this helps.
    Best Regards,
    Ervin

  • Adding symbols to a path

    sorry to ask such a stupid question but i cant waste more time on this.
    i'm trying to make a wreath.   i've made my leaves which look like this.
    now i want to add them to a path that i can manouvre into place.
    i've tried adding them as a brush however it keeps putting 2 "vines" in the brushes template.
    sorry but i need really simple steps to follow - just a beginner - cant you tell !! 
    thanks in advance.   

    You'll have to create a pattern brush onsisting of only one of those elements. Create a no-fill-no-stroke-rectangle in the background of the element before creating the brush. This element should mark the area you want to repeat.

  • Set the PATH permanently windows vista 32-bit

    I need to set the PATH variable permanently for running JDK without specify the full path to the executable every time with windows vista 32-bit but I don't know how to do it. Someone can help me?
    I tried what this site said but it doesn't work (or I do it wrong)
    http://java.sun.com/j2se/1.5.0/install-windows.html

    hi,
    via setting environment variables
    steps for windows 2000, but you to try the same in vista also, may be steps only differ,
    place your cursor on my computer -> right click -> properties -> advance -> environment variables -> system variable -> path->edit
    add " ;drivename:\path "
    ex:
    ;c:\jdk1.5.0\bin

  • Can I increase swap size by just adding a swap file for permanent?

    Hello,
    I am doing installation of oracle 11gR2 database on Linux.
    the swap area size is not enough. so can't go thought OUI's pre-system check before installation.
    the system administrator says, he really feel hard to find out any free uppartitioned disk space for adding more to current swap.
    he wants me to see if he can add a swap file (rather than an entire device/partition) for swap space.
    I checked docs:
    How to Create a Swap Device on Enterprise Linux [ID 432991.1]
    it says,
    "If no free, unpartitioned disk space exists, a swap file (rather than an entire device/partition) can be used for swap space as a *temporary*"
    but why temporary? why not permanent (I don't want to have trouble in future) is there anyone can help me to confirm?
    Thank you very much in advance.

    995137 wrote:
    HI Osama,
    thank you for answering.
    To my understanding, there should be no harm for database in future, f we increase swap size by adding a swap file, right?
    many thanks !!!Right!
    add another swap file

  • Making a compound path permanent

    I am trying to cut holes permanently out of an solid oblong and although I have made a compound path I need to make this permanent please can you help?

    yikes,
    What Doug said.
    As long as you keep it as a Compound Path in Illy, it will be editable (the same applies to a Compound Shape). I can think of a few silly and destructive ways of making it permanent.

  • A message saying new vault could not be added. ensure that destination path has appropriate permissions. What does this mean and what do I do about it?

    Adding new vault a message saying "New vault could not be added. Ensure that destination path has appropriate permissions and that vault has a unique name.
    What do I do?

    Check to make sure you have write permissions on the folder you are trying to make the vault in and that there are no other vaults in that folder using the name you are trying to use to make this new vault.

  • Setting Path Permanently

    This problem is taking up way too much time...
    So, I, like many others, want to set a global PATH variable for all users. I know you should do this in /etc/profile, but it doesn't work. In my etc/profile (before the last two lines) I have:
    export PS1="[\u@\h \w]\$ "
    export PATH=$PATH:/opt/csw/binThe PS1 variable is always changed (i.e. it looks like I told it to look), but the PATH variable never includes the folder I appended to it. (This is with root and nonroot users). I don't want to mess with .profile, .bashrc, etc. because this is supposed to be for all users. If I can help it, I'd also like to avoid editing /etc/default/login. Thanks in advance for the help.
    -Andy

    Also, I have another question. When I login to
    fluxbox or something, and I open up a terminal
    (loading sh), my PATH isn't set because sh doesn't
    source .profile or /etc/profile when invoked like
    that. Is there some file it does source, or some
    other way to set PATH?Ok, you logon locally to the box. You type sh to
    invoke bourne shell and your PATH does not carry over
    to the new shell?
    What shell do you originally log into?
    alanHere's the problem: Say I log in via fluxbox. /etc/profile is run, setting PATH, etc. Now I open a terminal which loads into sh, but does not run /etc/profile or .profile. Unfortunately, there is a script I want run every time I open a new shell session/terminal, and I want to set a few variables, including PATH via .profile. For some reason, probably logical because /etc/profile has already been sourced, opening a shell via terminal doesn't source either .etc.profile or, more importantly, .profile. Is there a way to get it to execute .profile every time I open a terminal? If you answer is to edit the menu and change the actual command opening the terminal, how do you do that in JDS? I couldn't find a way to do it.
    Thanks.

  • Matlab is adding spare /bin to paths

    I’m running Matlab 2015A, with Modelsim 10.3b. I just loaded Vivado System Generator 2015.2 The first thing Matlab does after I click SysGen 2015.2, which starts matlab in sysgen mode, I get the following:
    Prepending following Xilinx Vivado path(s) to the system path: c:\xilinx\vivado\2015.2\bin
    Type xlDoc to open the Xilinx System Generator help documentation.
    Type demo blockset xilinx to view the demos available for Xilinx System Generator.
    Trial>> xlDoc
    My system path is now full of 2015.2/bins: c:\xilinx\vivado\2015.2\bin\bin;c:\xilinx\vivado\2015.2\bin\lib;c:\xilinx\vivado\2015.2\bin;C:/Xilinx/Vivado/2015.2/bin;C:/Xilinx/Vivado/2015.2/lib/win64.o;C:/Xilinx/Vivado/2015.2/tps/win64/jre/bin/server;C:/Xilinx/Vivado/2015.2/tps/win64/jre/bin;C:/Xilinx/Vivado/2015.2/ids_lite/ISE/bin/nt64;C:/Xilinx/Vivado/2015.2/ids_lite/ISE/lib/nt64;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;c:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files\TortoiseSVN\bin;C:\Program Files\MATLAB\R2015a\bin;C:\Program Files\Microsoft Windows Performance Toolkit\;C:\modelsim_dlx_10.3b\win32pe
    I then enter xlDoc and get:
    Warning - File or URL Not Found
    MATLAB cannot link to this file or URL: file:///C:/Xilinx/Vivado/2015.2/bin/doc/sysgen/html_help/index.html
    which is true. There’s no bin in the help path. I then try to start a simulink model with a sysgen block in it and get:
    Windows cannot find 'c:/xilinx/vivado/2015.2/bin/bin/loader'.
    Seems some variable is appending a spare bin/ everywhere. My only workaround is to copy everything in bin into bin/bin. Not nice.

    Check this ARs
    http://www.xilinx.com/support/answers/55830.html
    To Start Xilinx System Generator, select
    Start

    All Programs

    Development

    Xilinx

    Vivado

    System Generator

    Xilinx System Generator

  • HT1923 wen i try to install itunes  it say i have ti uninstall the old one so i try to uninstall it an it say something about the path

    wen i try to install itunes  it say i have ti uninstall the old one so i try to uninstall it an it say something about the path

    Download the Windows Installer CleanUp utility from the following page (use one of the links under the "DOWNLOAD LOCATIONS" thingy on the Major Geeks page):
    http://majorgeeks.com/download.php?det=4459
    To install the utility, doubleclick the msicuu2.exe file you downloaded.
    Now run the utility ("Start > All Programs > Windows Install Clean Up"). In the list of programs that appears in CleanUp, select any iTunes entries and click "Remove", as per the following screenshot:
    Quit out of CleanUp, restart the PC and try another iTunes install. Does it go through properly this time?

  • SHAPE BUILDER ADDING UNWANTED ANCHORS AND PATHS

    I am new to Illustator, just learning. My Shape Builder tool is exhibiting behavior that I cannot explain!
    I am doing a simple flower exercise and, having successfully created an 8 petal flower with my Ellipse and
    Shapebuider (minus) tool, I am trying to color the areas of the petals.  When I do this with the Shapebuilder (Color) tool,
    it colors the correct areas but then also creates, unevenly and seemingly at random, additional paths (with many anchor points) right along my edges
    all over my shape. It also appears to be shifting adjacent paths over slightly.
    3 images attached:
    • First, the basic shape I'm hoping to color.  Looks perfect.  No extraneous anchor points, etc. This was created step-by-step with a tutorial.
    • Next: The same shape after filling with the Shape Builder tool.  Notice the additional paths and anchor points.  Basically, this is a complete mess!
    • Finally, the colored shape with the stroke removed.  I'm completely stumped.  Help! And thanks much..
    A similar issue occurs when I try to merge areas of this shape with the Shape Builder Tool.
    Message was edited by: Mark Luthringer

    Turn off the align to pixel grid options in the transform panel and the prefs.
    Mylenium

Maybe you are looking for

  • @prompt not functioning in where clause

    I have attempted to use the following in a where clause of a dimension object: ORGANIZATION_DIM.ORGANIZATION_ID = @Prompt('Which Organization?','A','Cash Receipts\Organization ID',mono,constrained,not_persistent,{'ORG0001'}) When I use the object in

  • Should I seek a 3rd party for color/contrast?

    I installed Mountain Lion a couple months ago. Although there are a few feature I really like, Apple took away a lot of real basic stuff away for no apparent reason. One change in Mountain Lion is the lack of color in icons (like in the Mail SideBar,

  • Zoom in iphone4s

    can zoom in my iphone4s camera be fixed?

  • My apps will not open says i need ios4 but i can,t update my touch.

    My apps will not open says" need ios4" please help!

  • How to calculate WAN bandwidth?

    Hi Team, We have a customer who has the following: 2 sites 5000 users distributed on the 2 sites How do we calculate the bandwidth of the link between the 2 sites is what we need to calculate? Please advise.