Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
06-14-2012, 08:08 AM
|
#1
|
LQ Newbie
Registered: Jun 2012
Posts: 5
Rep:
|
Devices/file system on linux
Hi,
I am trying to understand the device naming conventions in Linux. Looking for some information on mount points.
If someone can elaborate or direct me to some pointers/weblinks, it would be very helpful.
Thanks!
|
|
|
06-14-2012, 09:34 AM
|
#2
|
LQ Guru
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
|
The document here will give you a good overview for mount points (filesystems).
http://www.pathname.com/fhs/pub/fhs-2.3.pdf
Note that "mount point" and "device" are separate things when talking about filesystems.
mount point = The directory you mount the device on and from which you access the files in the filesystem. When the filesystem is NOT mounted this directory exists but is mostly empty (it should have only the . and .. hard links in it to pwd and parent directory). The one filesystem all UNIX/Linux systems will always have is "/" (root). There may or may not be others.
device = The partition, logical volume or media (e.g. usb or DVD) you mounted on the mount point. Examples would be /dev/sda2 for the second partition of your first hard drive, /dev/VolGroup03/lvol4 for the 4th logical volume of the 3rd volume group).
When you run df -hP you see the device in the left column and the mount point in the last column.
Note also that there are pseudo filesystems that are created at each boot (e.g. /proc, /sys on Linux with kernel 2.6 and greater).
Last edited by MensaWater; 06-14-2012 at 10:29 AM.
Reason: Finally had enough coffee to see my typos
|
|
1 members found this post helpful.
|
06-14-2012, 10:08 AM
|
#3
|
LQ Veteran
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809
|
A "mount point" is the same thing as a directory---the only difference is how it is used.
try this:
create a new directory (anywhere), called testdir and copy some files into it.
In the parent directory, do "ls testdir" and you will see a list of the files.
now, "mount" some other directory to the new one. eg "somedir" mounted to "testdir":
mount <path>somedir testdir
now, do "ls testdir", and you will see the contents of "somedir" The orignal contents of "testdir" are still there, but are hidden by the mounted directory. If you unmount somedir, then the original contents will reappear.
|
|
1 members found this post helpful.
|
06-14-2012, 11:57 AM
|
#4
|
LQ Veteran
Registered: Jul 2006
Location: London
Distribution: PCLinuxOS, Salix
Posts: 6,191
|
Let's have another go at explaining.
Linux, unlike Windows, keeps a single filing system: you don't have to keep track of c:, d:, e:, etc. The mount point is the place in the filing system used for a particular device. So, on my desktop
/dev/sda1 [first hard drive, first partition] is mounted at /
/dev/sda2 [first hard drive, second partition] is mounted at /home
/dev/sda3 [first hard drive, third partition] is mounted at /media/guest
and when I plug in a USB memory stick, I get
/dev/sdb1 mounted at /media/usb
Where things go in /media depends on your distribution, but you can fix it by altering /etc/fstab.
|
|
1 members found this post helpful.
|
All times are GMT -5. The time now is 06:57 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|