Installing on Ubuntu

29 views
Skip to first unread message

McHenry

unread,
Aug 5, 2014, 7:43:16 AM8/5/14
to rubyonra...@googlegroups.com
I am using the following guide:

Under the heading "Using rbenv" the first line instruction is "cd"

What is the purpose of this command?

Walther Diechmann

unread,
Aug 5, 2014, 7:54:12 AM8/5/14
to rubyonra...@googlegroups.com
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 ;)

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

cheers
Walther

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
To post to this group, send email to rubyonra...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/e93f0cf6-e201-4038-a6e8-19ce9c96b4e6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Diego Dillenburg Bueno

unread,
Aug 5, 2014, 8:02:33 AM8/5/14
to rubyonra...@googlegroups.com
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.

Regards,
Diego Dillenburg Bueno


McHenry

unread,
Aug 5, 2014, 8:04:38 AM8/5/14
to rubyonra...@googlegroups.com
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?

McHenry

unread,
Aug 5, 2014, 8:08:23 AM8/5/14
to rubyonra...@googlegroups.com
Hi Diego. The command "cd ~" returns the user to their home directory however "cd" alone does nothing as far as I know.

Colin Law

unread,
Aug 5, 2014, 8:39:54 AM8/5/14
to rubyonra...@googlegroups.com
On 5 August 2014 13:08, McHenry <he...@incred.com.au> wrote:
> 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.

Colin

Walther Diechmann

unread,
Aug 5, 2014, 8:42:36 AM8/5/14
to rubyonra...@googlegroups.com
Hi McHenry & Diego


according to (http://www.linfo.org/cd.html) 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!

Cheers,
Walther




McHenry

unread,
Aug 5, 2014, 5:05:57 PM8/5/14
to rubyonra...@googlegroups.com
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...)

McHenry

unread,
Aug 5, 2014, 6:05:58 PM8/5/14
to rubyonra...@googlegroups.com
"Hello World" :)
Reply all
Reply to author
Forward
0 new messages