Tuesday, March 9, 2010

BASH :: Set binaries in Home directory

Edit the file
$ vim ~/.bashrc
write the lines
PATH=$PATH:$HOME/bin
export PATH

restart the bash
$source ~/.bashrc

To check your current shell
$ echo $SHELL

If the current shell is not bash, it can be changed using
$ chsh
- enter password
- enter the path, usually /bin/bash

Log out and Log in.

Now go to home directory
- if the bin is already present skip the next command, else
$ mkdir bin
- now link a command to the binary
$ ln -s /path/to/the/binary binary_name

No comments:

Post a Comment