Background
Using xfce4-terminal
as an example, I want to run the program by just typing term
.
When I type which xfce4-terminal
it returns /usr/bin/xfce4-terminal
.
So, I created a symbolic link: sudo ln -s /usr/bin/xfce4-terminal /usr/bin/term
.
Now I can execute the program by typing term
.
Question
I've been wondering if this is a reasonable way to achieve the purpose. Asking for the best method (without even researching) may be a subjective question, but here I'm asking for a standard way if any, or any pros and cons my method may has.
I have thought of the following alternatives:
- Rename the program:
mv xfce4-terminal term
- Use environmental variables (but there are many ways to do this...)
- Avoid being lazy in the first place
I already know that:
- I can utilize Tab to auto-complete
- (In GUI) I can utilize shortcuts like Ctrl+Alt+T
- Creating symbolic link has risk of conflict if another program was named "term"
- Renaming has risk of breaking dependency
Environment:
uname --all
returns:
- Linux debian 4.19.0-18-amd64 #1 SMP
- Debian 4.19.208-1 (2021-09-29)
- x86_64 GNU/Linux
alias term=xfce4-terminal
$HOME/bin
(often in your$PATH
) under name of your choice ?update-alternatives