Installing on Ubuntu

I am using the following guide:

Under the heading “Using rbenv” the first line instruction is “cd”

What is the purpose of this command?

Hi McHenry,

from your question I gather that you should perhaps start by going through one/two articles on the basic Linux commands - just to keep you a-float :wink:

ls list directory

cd change directory

sudo execute som command as another user (superuser unless otherwise specified)

pushd cd and remember where you were at

popd cd to the remembered directory prior to the pushed one



In case you asked about the meaning of the command being used there, instead of what it does, it might be, correct me if I’m wrong, just to make sure you’re in your home directory, just to make it is easier to follow.


Diego Dillenburg Bueno

Hi Walther and thank you once again for your prompt reply. My questions was probably not as clear as it could have been.

What I meant to ask was what is the purpose of the “cd” command on a line without any further parameters?

I understand the “cd” command however the command alone makes no sense?

Hi Diego. The command “cd ~” returns the user to their home directory however “cd” alone does nothing as far as I know.

On Ubuntu (at least) it takes you to your home directory. It is
probably my most used command. Try it.


Hi McHenry & Diego

according to ( cd on its own does alternate between two directories like

~ $ cd /tmp

/tmp $ cd

~ $ cd

/tmp $

and so on ….

However! I’ve tested it on Mac and Fedora 20 — and the shell (Bash on Fedora) returns the user to the $HOME in both environments (hmmm)

Good spot, Diego!



You learn something new everyday.

After tears of using Ubuntu since Dapper Drake I never knew this. I have always used cd ~ to return to the home directory.

Thanks for the insight. (back to my Rails installation now…)

“Hello World” :slight_smile: