LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 03-08-2005, 06:06 AM   #1
hari78
Member
 
Registered: Dec 2004
Distribution: FC3, RH enterprise 3
Posts: 46

Rep: Reputation: 15
opening a program from shell


i am unable to open some programs without cd-ing into the directory concerned. what shall be done to open a program directly from the shell whichever the pwd is?
thanking you
 
Old 03-08-2005, 06:10 AM   #2
cs-cam
Senior Member
 
Registered: May 2004
Location: Australia
Distribution: Gentoo
Posts: 3,545

Rep: Reputation: 57
Create a symlink to the file in /usr/local/bin. Like so
Code:
ln -s /path/to/executable /usr/local/bin/executable
 
Old 03-08-2005, 08:38 AM   #3
Boow
Member
 
Registered: Feb 2004
Distribution: Slackware 10.2
Posts: 669

Rep: Reputation: 32
Either that or type the full path to the executable.

/usr/bin/executable

put program directory in your path

put this in your .bash_profile

PATH=$HOME/bin:$PATH
PATH=/path/to/directory:$PATH

Last edited by Boow; 03-08-2005 at 08:39 AM.
 
Old 03-08-2005, 08:40 AM   #4
Gecko
Member
 
Registered: Oct 2003
Location: Ohio
Distribution: Gentoo
Posts: 47

Rep: Reputation: 16
whereis is your friend, also.

whereis program_name

Then just cut and paste the whole path.
 
Old 03-08-2005, 10:33 AM   #5
hari78
Member
 
Registered: Dec 2004
Distribution: FC3, RH enterprise 3
Posts: 46

Original Poster
Rep: Reputation: 15
thanks a lot for your replies.. it is fine now
 
  


Reply


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
opening file with .xls on linux shell prompt suchi_s Programming 1 07-28-2004 08:40 AM
Opening file with default application from shell script? bourbon_beast Programming 4 04-13-2004 02:52 AM
Program opening off screen garf12 Linux - Newbie 1 03-06-2004 09:58 PM
Program Not opening Neo22589 Linux - Software 22 03-10-2003 11:32 PM
opening a d/l program purelific Linux - Newbie 4 04-01-2002 12:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:27 PM.

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