cd command has stopped working in Ubuntu

1

After installing gem files on my system, cd command has stopped working and throws the following error when I try to open any dir

     robus@lucy:~$ cd /starterkit
    -bash: cd: /starterkit: No such file or directory

please show me how to solve this problem

Robus

Posted 2014-04-16T14:05:25.457

Reputation: 115

1Try cd starterkit or cd ./starterkit – Alex McKenzie – 2014-04-16T14:18:11.337

Is starterkit in the root directory or in your home directory or elsewhere? – jliv902 – 2014-04-16T14:25:40.787

@AlexMcKenzie Tried ! Throws the same error – Robus – 2014-04-16T14:25:43.590

@jliv902 Its in the HOME directory – Robus – 2014-04-16T14:34:02.277

Try cd ~/starterkit – jliv902 – 2014-04-16T14:37:01.800

@jliv902 cd ~/starterkit works !! but why !! what happened to cd /starterkit – Robus – 2014-04-16T14:41:05.177

@KuldeepBhatt See my answer. – jliv902 – 2014-04-16T14:45:03.773

Answers

0

/ is the root directory, so when you type cd /starterkit, you are looking for the directory starterkit in the sub-directory /. Since starterkit is in your HOME folder, cd will not find it in the / directory.

~ is a shortcut to /home/robus. So when you type cd ~/starterkit, you are actually doing cd /home/robus/starterkit.

jliv902

Posted 2014-04-16T14:05:25.457

Reputation: 112

How can I revert this back to cd /starterkit !? I was able to access such way ! – Robus – 2014-04-16T14:49:07.900

@KuldeepBhatt Try sudo mv ~/starterkit /starterkit or sudo cp ~/starterkit /starterkit or sudo ln -s ~/starterkit /starterkit. – jliv902 – 2014-04-16T14:50:09.300

You can move the directory to your root directory, or make a symbolic link in your root directory which links to the directory in your home directory. – Tero Kilkanen – 2014-04-16T14:51:01.287

Any short code to make a symbolic link in root dir linking ALL dir in home dir ? – Robus – 2014-04-16T14:59:01.087

@KuldeepBhatt I'm not sure. I would consider asking a new question. In my opinion, if you need to do that, then you are probably doing something wrong. – jliv902 – 2014-04-16T15:11:32.707

0

cd is an builtin command in bash.

The directory you are trying to cd into most likely just dont exist.

Peter Lamby

Posted 2014-04-16T14:05:25.457

Reputation: 362

actually it does exist and it shows in ls -al. with all perfect permission to excess – Robus – 2014-04-16T14:20:03.980

1Can you post the ls -al output? – mtak – 2014-04-16T14:24:47.943

http://i60.tinypic.com/28ujwat.png – Robus – 2014-04-16T14:31:31.093

0

Based on the output you posted you should be able to cd into that directory. There might be a problem if the directory name is followed by one or more spaces. Try doing cd starter* and see if you end up in the directory.

mtak

Posted 2014-04-16T14:05:25.457

Reputation: 11 805

yes it does work – Robus – 2014-04-16T14:52:04.060