[ubuntu-uk] Just noticed something..not sure if its an error.....
Bruno Girin
brunogirin at gmail.com
Thu Feb 18 19:58:34 GMT 2010
On Thu, 2010-02-18 at 17:51 +0000, John Matthews wrote:
> Oh wow, thanks everybody for the replies, that has helped. I just
> wondered then, what is the difference between the /desktop and
> ~/Desktop. Sorry for being so thick. Why is it used in the Terminal?
John,
Part of the confusion arises because the name of your computer has the
word "desktop" in it. To give you a counter example, the machine I am
currently writing this email on is called "nuuk" (after the capital city
of Greenland),so when I open a terminal, I see this:
bruno at nuuk:~$
As several people have said before, the first part, before the '@'
character is my user name, bruno; the second part, between the '@'
character and the ':' character is the name of my computer, nuuk; the
last part, between the ':' character and the '$' character is the name
of the directory in which I am. This directory is abbreviated to a
single '~' when you are in your home directory: this is an old UNIX
convention that is still in use today. The real name of that directory
is /home/bruno in my case, /home/jakewc2 in your case. You can check
this by typing the following in the terminal:
pwd
This will give you the fully qualified name of the directory you are in.
Now, if you type the following:
cd Desktop
This tells the shell to change your current directory to a directory
called "Desktop" and that is located in the directory you are currently
in. When I do this, my prompt changes to:
bruno at nuuk:~/Desktop$
This tells me that my user name is still bruno, my computer is still
nuuk but the directory in which I am is now ~/Desktop.
Finally, to answer your question above (at last!), /desktop is a
completely different directory from ~/Desktop for two reasons:
* First, it doesn't have the '~' character at the beginning, which
means that it should be a directory directly under the root of
the file system: all directories are arranged in a tree
structure that starts with a directory called / (or root) so
when you see a directory called /home/jakewc2/Desktop, it means
it is a directory called "Desktop" inside a directory called
"jakewc2" inside a directory called "home" under the root of the
file system. On the other hand, if you see a directory
called /desktop, it means it is a directory called "desktop"
directly under the root of the file system.
* Second, Linux is case sensitive when it comes to file and
directory names so the directory "desktop" is different from the
directory "Desktop".
I hope this explanation has not confused you further :-)
Cheers,
Bruno
More information about the ubuntu-uk
mailing list