/Users/name/myFolder/appOr you can navigate to its folder with
cd /Users/name/myFolder
and then use
./app
to run it.
Another way would be to move that application to a folder that is in the system's
$PATH
. But if you don't want to move the application (and assuming you don't want to change your
$PATH
either), then you can add a shortcut for your application to a folder that is included in
$PATH
. To see the list of these folders, type
echo $PATHand then pick one of the folders displayed. For example,
/usr/local/bin
. Now we will add a symbolic link (like a shortcut) to our application in this folder.
This can be done by
ln -s /Users/name/myFolder/app /usr/local/bin
Perfect! now you can run your app by simply typing
app
in any terminal! (Of course,
app
should be the specific name of your app.)
No comments:
Post a Comment