Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

This question already has an answer here:

I want to run a program, for example gedit from terminal.

How can I run gedit through terminal by just typing ge on terminal?

share|improve this question

marked as duplicate by Radu Rădeanu command-line Aug 12 '14 at 8:31

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

@RaduRădeanu I don't see any question on how to edit ~/.bashrc here, that is only one of the options. – Jacob Vlijm Aug 12 '14 at 9:11
type 'ged' + 'Tab' key? – Wilf Aug 12 '14 at 9:12
@Wilf and there is another good option! – Jacob Vlijm Aug 12 '14 at 9:13
@JacobVlijm The question is not about how to edit ~/.bashrc as you noticed very well; the main problem is to create a custom name, an alias, for one command. – Radu Rădeanu Aug 12 '14 at 12:40
@RaduRădeanu Aha, I kind of agree. Surely when it comes to the title of the original question, the body however is about editing ~/.bashrc (as well as the answers there). Also the way the alias is applied in his case excludes some soulutions that would fit here. – Jacob Vlijm Aug 12 '14 at 12:54

2 Answers 2

up vote 5 down vote accepted

You can add an alias for the command. Open your terminal with ctrl+alt+t and type:

nano ~/.bashrc

Find alias section and add alias:

alias ge='gedit'

Changes will take affect in the new terminal.

share|improve this answer
I was read article regarding my question and found that it was temporarily. Is is possible to make it permanently ? – Dika Aug 12 '14 at 8:05
With alias it will work for your user permanent. To add this for all users on the system add alias to the /etc/profile – Alex Kondratiev Aug 12 '14 at 8:09
Thanks. I'll check this out – Dika Aug 12 '14 at 8:32
Will this method work on any directory folder or just on /usr/bin folder that contain application ?? – Dika Aug 13 '14 at 1:44

An option is to create a directory ~/bin, and make a link from there to gedit:

ln -sf /usr/bin/gedit ~/bin/ge

You can do that with any application; to find out where to link to, type:

which [applicationname]


$ which gedit
share|improve this answer
Thank you for reply. I'll check this later – Dika Aug 12 '14 at 8:41
N.B. if $HOME/bin is not in the users path, it won't work. – Wilf Aug 12 '14 at 9:13
@Wilf That is a bit faint to mention; it is practically impossible that it won't work if the user didn't specifically remove it from $PATH. By default ~/bin is in $PATH – Jacob Vlijm Aug 12 '14 at 9:15

Not the answer you're looking for? Browse other questions tagged or ask your own question.