How to change from one partion to another?

Rick Stevens rstevens at vitalstream.com
Thu Sep 29 18:07:48 UTC 2005


On Thu, 2005-09-29 at 21:55 +0530, Bharadwaj wrote:
> I am new to Linux world? I came from windows back ground. I have
> understood that each logical partion in linux , is simlar to C: D:
> (or) E: drives in windows,
>  I am I correct? If so how to switch between these linux pations?

Well, sort of.  We don't use "drives" in Linux.  In Linux, everything
is a file.  Directories are just special files, as are raw disk drives,
serial ports, mice, keyboards, displays, everything!

A partition in Linux is mounted as a directory somewhere.  If you look
at my previous post of the output of my "mount" command, the first thing
you see on each line is the device (partition).  The bit after the word
"on" shows WHERE it's mounted in the filesystem heirarchy.  Here's two
lines we'll use as a reference:

	/dev/hda1 on / type ext3 (rw)
	/dev/hda7 on /usr type ext3 (rw)

The first one shows that partition "/dev/hda1" is mounted on the
directory "/" (or the "root" of the filesystem).  In the Windows world,
this may be considered the "C:" drive and is the ONLY directory you are
absolutely guaranteed exists.

The filesystem mounted on / has other directories in it.  One of them
happens to be called "usr" (or "/usr" to use the absolute path to it).
My /dev/hda7 partition is mounted on that directory, so if I go to /usr
and look at the contents, I'm actually seeing what's on /dev/hda7.

>From a Windows perspective, you only have one drive, and that's "/".
Everything else is a subdirectory under it and you get to them using the
same command you do in Windows, namely "cd" (change directory).
Remember also that in Linux, directories are separated by forward
slashes ("/") NOT backslashes ("\") as they are in Windows.

---------------------------------------------------------------------
- Rick Stevens, Senior Systems Engineer     rstevens at vitalstream.com -
- VitalStream, Inc.                       http://www.vitalstream.com -
-                                                                    -
-   Sarchasm: The gulf between the author of sarcastic wit and the   -
-                     reader...who doesn't get it.                   -
----------------------------------------------------------------------




More information about the Redhat-install-list mailing list