2

How do I create a shortcut/alias in fedora? For example this is the path to my netbeans IDE

netbeans-8.2/bin/netbeans

I am a lazy person, and I don't want to type all this out in the terminal, is there a way so I can type something else and it "equals" whatever I want? Example If I type

SOMECOMMAND = netbeans-8.2/bin/netbeans

Whatever somecommand actually is, it will act as though I actually typed out the full

netbeans-8.2/bin/netbeans
bit.con
  • 23

1 Answers1

2
alias nb='netbeans-8.2/bin/netbeans'

will probably do what you want.

Then nb gets expanded to the full command.

To see all the aliases you have set, type alias. To unset the alias, you want unalias nb.

This alias won't be saved permanently. To do that you will need to edit your shell configuration. For bash, which is the default shell under Fedora, that's .bashrc in your home directory.

SauceCode
  • 2,345