Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 07-03-2004, 03:34 PM   #1
Registered: Jun 2004
Distribution: Gentoo
Posts: 102

Rep: Reputation: 16
wo to set up executable so i can run it without typing whole path?


I wonder on how i can make it so that I can type just "programname" from anywhere and it runs, rather than "/whole/path/programname"?

Kinda like vim filename works from anywhere...

thank you
Old 07-03-2004, 03:41 PM   #2
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 67
If the script is in the current directory:

If it is not then put it in one of the directories that is in your $PATH:
echo $PATH

To add a new directory to your path:
export PATH="/path/to/new/path:$PATH"
Old 07-03-2004, 05:40 PM   #3
LQ Addict
Registered: Dec 2003
Location: Maine, USA
Distribution: Slackware/SuSE/DSL
Posts: 1,320

Rep: Reputation: 45
Another option, say if the application has to remain in its original directory, is to make a symlink in a directory which is already in your path, or you could make an alias to the program.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Set the path systemwide/Set the path for a user with Slackware jayhel Slackware 1 06-12-2005 01:24 AM
Cannot not run executable jar file after set content type for download antony_csf Programming 1 12-08-2004 01:22 AM
Path of the executable brainstormingin Programming 4 03-25-2004 10:24 PM
Executable, but not in path. Sledge Red Hat 0 12-03-2003 09:48 PM
How to set PATH How do I set PATH environment variable? Tranquil Linux - Newbie 3 11-02-2003 03:52 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:00 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration