Ubuntu – Terminal command cd (change directory)

command line

In Terminal (Xubuntu) I enter:

pwd

Terminal reply:

/home/mj

In the "Ubuntu Documentation: Using The Terminal" it says:

To navigate to the previous directory (or back), use "cd -"

I enter:

cd-

Terminal reply:

No command 'cd-' found"

How do I go back to home directory, using cd command?

In the "Ubuntu Documentation: Using The Terminal" it says:

To navigate up one directory level, use "cd .."

I enter:

cd..

Terminal reply:

cd..: command not found

How do I go up one directory level, using cd command?

Best Answer

You need add a space (at least) between a command and their argument(s) or option(s).

You are doing :

cd..

You need :

cd ..

Again you are doing :

cd-

while you need :

cd -

To go to your home directory you can do :

cd ~

or simply

cd