Terminal Question

Joined
Jun 22, 2011
Messages
9
Reaction score
0
Points
1
Hi All,

I have installed some software and no matter what directory I am in i can run the software by typing the name.

What I want to know is I have some other software where I wish to do the same so no matter where I am I can just type the name and it will run.

Is this possible ? Do I have to put it in certain file ? or is it just case adding the path to my env ?


Any help would be really appreciated

Thanks :)
 
Joined
Jun 22, 2011
Messages
12
Reaction score
1
Points
3
From what i know if you want to open an application through terminal, you need to write the full directory path,

eg: open /Applications/Facetime.app
 
Joined
Feb 20, 2010
Messages
45
Reaction score
0
Points
6
Location
Canberra, Australia
Your Mac's Specs
MacBook Pro (Retina, 13-inch, Late 2013)
Hi All,

I have installed some software and no matter what directory I am in i can run the software by typing the name.

What I want to know is I have some other software where I wish to do the same so no matter where I am I can just type the name and it will run.

Is this possible ? Do I have to put it in certain file ? or is it just case adding the path to my env ?


Any help would be really appreciated

Thanks :)

Open up /Users/YourUserName/.profile in something like textwrangler, which can handle hidden files. Then add something like:

Code:
export PATH="path/to/application":$PATH

I think that should work, let me know how you go.
 
OP
J
Joined
Jun 22, 2011
Messages
9
Reaction score
0
Points
1
Thanks I will try that

I have another question on terminal you get computername: username and when you change directory you get

computername: ect username is there anyway to get rid of the computername and directory ?

Thanks
 
OP
J
Joined
Jun 22, 2011
Messages
9
Reaction score
0
Points
1
ok I have another question might well keep in same thread.

I added path so I can type ./script anywhere is there way to get it to auto complete using tab ?
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
It should autocomplete the name if it is recognized. If it's in your path, you shouldn't need to type the './' and since you seem to need to still do it, I have to think that the app is not in your path. If you execute the following, do you see the directory that the app is in listed?
Code:
echo $PATH
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top