36

For reference, I know very little about Linux, and am using it to run a program written by someone else. The instructions say Add the executable 'ttt' to the search path. In most installations this can be accomplished by linking the file to the 'bin' subdirectory at user home.

How do I go about doing this?

This executable is currently in a subfolder in the host area, as it's running on a dual-boot computer I cannot change the fact that it is a dual boot, as it is a work computer.

Eugene
  • 361
  • 1
  • 3
  • 5

2 Answers2

42

To make this work for the command line (terminal):

I would suggest that you do the following steps in the terminal:

  1. Create a folder called bin in your home directory.

    mkdir ~/bin
    
  2. Add ~/bin to your PATH for all sessions of Bash (the default shell used inside of the terminal).

    $ nano ~/.bashrc
    
    # Add the following to the end of your .bashrc file while using nano
    # or your text editor of choice:
    
    export PATH="/home/$USER/bin:$PATH"
    
  3. Add either the executable files themselves OR symlinks to the executable into ~/bin

  4. Restart your terminal session by closing out the terminal and reopening it, or run source ~/.bashrc to reload the configuration for your session

That should allow your terminal to read the PATH variable for terminal sessions.

I do not know how to add it to the GUI, though, as I'm not certain of how the GUI manages the PATH variable(s), but it might be necessary to modify the path with other methods should this method here not work with the GUI.

muru
  • 197,895
  • 55
  • 485
  • 740
Thomas Ward
  • 74,764
1

to just temporary add the local directory to your path call this:

PATH="$(pwd):$PATH"
rubo77
  • 32,486