symlink via command line

Karl Auer kauer at
Mon Dec 2 04:51:01 UTC 2013

On Sun, 2013-12-01 at 21:42 -0600, Wade Smart wrote:
> On Sun, Dec 1, 2013 at 9:28 PM, Jared Greenwald
> Im working with a guy who has a raspberry pi
> for a project and he wants to shortcut to a
> app. Didnt realize couldnt do that.

Sure you can! Almost nothing is impossible. The right answer does depend
a lot on what you mean by "shortcut".

If you want an app to run on a click, you put an icon on the desktop and
run the app through that. "man gnome-desktop-item-edit"

If you want the app in a menu, use the menu editor and add the app into
the menu structure. Run "alacarte".

If you want the app to have another name, add a symlink as your
surmised, but you can't put arguments (parameters) in the symlink. To
have "fred" run "mary" do "sudo ln -s /usr/bin/fred /usr/bin/mary". Be
warned that some program behave differently when named differently!

If you want the app to have another name and have particular parameters,
create a script that runs the program with the desired parameters, then
just run the script. and of course you can run the script via an icon on
the desktop too :-)

   sudo bash
   cat > /usr/bin/mary
   # Run "fred -p -q -z --footle"
   /usr/bin/fred -p -q -z --footle
   chmod u+x /usr/bin/mary

If you want a pure command line solution, use "alias" to give your
command a new name, but this will only work in the one user's shell.
Other users will have to set up the same alias themselves - though there
are usually global .profile-style files so you can give all users the
same settings, environment, aliases and so on. "man bash" and look for
"ALIASES" and "FUNCTIONS". You'll need functions for anything
complicated, though simple stuff works:

   alias fred="ls -la"

Some shells don't support aliases.

So - what EXACTLY do you want to achieve? Describe the desired situation
so people can help. If you leap to the conclusion that "what I need is a
shortcut" it just confuses people.

Regards, K.

Karl Auer (kauer at

GPG fingerprint: B862 FB15 FE96 4961 BC62 1A40 6239 1208 9865 5F9A
Old fingerprint: AE1D 4868 6420 AD9A A698 5251 1699 7B78 4EEE 6017

More information about the ubuntu-users mailing list