P
P
P_Alexander2019-09-15 19:12:34
linux
P_Alexander, 2019-09-15 19:12:34

How to create an alias to a symlink in Fedora?

Good evening, the symlin for the file that I have is just in the home folder, I can run it like this ./run
Now I want to run it like this run. But for this I need to create an alias.
Created an alias in ~/.bashrc like this alias run="./run" . When I apply all source ~/.bashrc it says
bash: alias: run: not found
bash: alias: =: not found
bash: alias: ./run: not found
Where is the error?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Saboteur, 2019-09-15
@P_Alexander

Good evening, the symlin for the file that I have is just in the home folder, I can run it like this ./run

Not right.
You can only run it with ./run if you are in your home directory.
Add home directory to PATH, for example
now you can just "run"
For permanent effect, PATH can be set in .bashrc or .profile

P
pfemidi, 2019-09-15
@pfemidi

alias="./run" is an alias for what and where? alias run='./run' however.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question