A
A
Alexander2020-04-19 16:01:46
Command line
Alexander, 2020-04-19 16:01:46

How to create an abbreviated path to a file in macOS Terminal?

I apologize for the wording of the question
. I installed symfony cli, but it says that it does not find the symfony command, while /Users/admin/.symfony/bin/symfony runs fine. How not to prescribe the full path to the file each time when calling from the terminal?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey, 2020-04-19
@AleksandrB

Make a link to this file in the folder with executable files. For example, for linux in the /usr/local/bin folder or similar on MacOS.
To be like this: /usr/local/bin/symfony -> /Users/admin/.symfony/bin/symfony
Or install symfony globally

P
paran0id, 2020-04-19
@paran0id

In my opinion, it would be most correct to add /Users/admin/.symfony/bin/ to $PATH
To do this, write the line in ~/.bash_profile or ~/.bashrc:
export PATH=$PATH:/Users/admin/.symfony/bin
And make source ~/.bash_profile, or re-enter the terminal.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question