LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 01-14-2006, 09:12 AM   #1
fieldyweb
Member
 
Registered: Jun 2005
Location: Wycombe, England
Distribution: Mepis 3.4.3 , Ubuntu & Damm Small Linux
Posts: 119

Rep: Reputation: 15
Launching apps from the command line


OK, this is a stupid question

I have just installed an app, a really cool clone of rick Dangerous XRICK

the program works fine, however to launch it u have to type ./xrick

question is what is the difference from the command line between typing

./<program name>

and

<program name>

Sorry for the stupid question, and i am willing to read more if you want to tell me to googleoff...
 
Old 01-14-2006, 09:29 AM   #2
phil.d.g
Senior Member
 
Registered: Oct 2004
Posts: 1,272

Rep: Reputation: 154Reputation: 154
the ./ forces bash to look in the current working directory for the program, if you don't specify it then bash will search all the paths on $PATH for the program

typing a path starting with a . means that the path is relative to the current working directory. `cd /usr/bin; ./mail` has the same result as typing `/usr/bin/mail` for example
 
Old 01-14-2006, 09:31 AM   #3
tuxrules
Senior Member
 
Registered: Jun 2004
Location: Chicago
Distribution: Slackware64 -current
Posts: 1,158

Rep: Reputation: 62
Quote:
./<program name>
Speciafically looks in current directory for the program. This is called relative path. Alternatively, you can give it an absolute path like /some/directory/program_name.

Quote:
<program name>
Looks for the program binary in user's path.

Code:
echo $PATH
Type the above command in the shell and you'll see what directories are in your path.
 
Old 01-14-2006, 10:09 AM   #4
fieldyweb
Member
 
Registered: Jun 2005
Location: Wycombe, England
Distribution: Mepis 3.4.3 , Ubuntu & Damm Small Linux
Posts: 119

Original Poster
Rep: Reputation: 15
Cheers, so if i create a symbolic link with ln -s from the program folder to the /usr/bin folder, then i won't need to type ./xrick i can just type in xrick correct?
 
Old 01-14-2006, 10:17 AM   #5
tuxrules
Senior Member
 
Registered: Jun 2004
Location: Chicago
Distribution: Slackware64 -current
Posts: 1,158

Rep: Reputation: 62
Quote:
Originally Posted by fieldyweb
Cheers, so if i create a symbolic link with ln -s from the program folder to the /usr/bin folder, then i won't need to type ./xrick i can just type in xrick correct?
Yes, a soft link would do.
 
Old 01-14-2006, 10:42 AM   #6
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
You can also put a link in you menu bar, panel, whatever your distro calls it.

in Ubuntu, eg, you right-click on the panel and follow the instructions
 
  


Reply



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
Launching Apps rjkfsm Linux - Newbie 3 07-11-2005 07:44 PM
launching programs from command line in FS dertien Linux - Software 1 11-26-2004 09:27 AM
Launching Programs From the Command Line Chryzmo Linux - Software 5 03-03-2004 08:00 PM
Command Line able to use GUI apps? shlok Linux - Newbie 5 06-28-2003 01:09 PM
launching multiple apps with one command hamsterdude Linux - General 4 09-13-2002 01:00 PM

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

All times are GMT -5. The time now is 11:28 AM.

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