Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have this as the last line in my .profile:

alias gl="cd /home/jrenner/glances/glances"

yet even after reboot I get command not found when typing gl. What is happening? I am logged in as the correct user.

share|improve this question
Where are you typing gl? The terminal? The GUI? –  Thomas W. Mar 26 '13 at 2:58

2 Answers 2

up vote 1 down vote accepted

I'm pretty sure that lpanebr's idea will work, but here's a more elegant solution. Do that alias command in .bashrc That's how I do it, or some people prefer to add a file dedicated to alias. Call it .allias or whatever and add .allias to your .bashrc

Wish I could do formatting like @lpanelbr. I wonder if there is a wiki?

share|improve this answer
As for the formatting askubuntu uses markdown. Please check out askubuntu.com/editing-help for the details. –  saji89 Mar 26 '13 at 4:23

If you are using bash (echo $SHELL) as a shell interpreter I think it is best (or maybe the only way) if you define your own CD function.

Edit your .bashrc file and add the following at the end:

# my custom functions:
function gl () {
   cd /home/jrenner/glances/glances/

You could also extend it like so:

# my custom functions:
function cdw () {
   cd /home/jrenner/glances/glances/$1

and change directly to a sub directory and list it's contents.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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