Parent: Alternate Main Page
The previous contents of this page was moved to LQWiki:Linux concepts, since everything in it so far is a solution of a Windows usability problem rather the a report of a Linux usability problem. However, it had to be moved back here because of a copyright problem.
Please put Windows usability problems here, with links to LQWiki:FAQ - operating systems or an appropriate page reachable from there.
The first question that a new Mepis user asked me was,"Where are the drives?" He meant C: and so on, because he's an MSWindows user. Mentioning "partitions" probably doesn't mean much to MSW users either, since they don't see the word in day to day computer use. Pointing out that there's no drives, just "directories or file folders" might make more sense. It also conforms to the original UNIX concept:- everything is a file, not that they'd care.
This is a good point. See the "Partitions" section below. But I'll flesh this out for newbies.
In Windows, the "top level" (called root in Linux because everything branches out from it, like tree roots) is a mystical collection of driver letters. you can never be at a place that you can list your drive letters from. Windows Explorer instead provides a pretend top level that lists "C:", "D:", and "Control Panel" it's an ad-hoc collection of things.
In Linux "/" is the root (top level) directory. If Microsoft did things the Linux way, you'd have "/a" (floppy) "/c" and "/d" (CDROM usually) and you could from /, see all drives and partitions.
Linux has the added ability to map these drives to any letter - or name that you want. For instance, say I don't want a "/c" but instead I want to call it "My Documents" I can tell Linux to call that drive "My Documents" and I can have it put anywhere in the computer. I'll get back to this in a minute.
The Joys of Mounting
This is a foreign concept to Windows users because Windows mounts your drives for you. See the presence of a harddrive does not make it instantly available. The drive has to be prepared by 'partitioning' and 'formatting' which is discussed later. But after the disk is prepared it is ready for use. Windows looks for any ready partitions and automatically assigns them a drive letter. You don't get a whole lot of choice in the letter though. Say you have a C drive, and a CDROM drive, D. The harddrives get assigned first, then the CD. Now lets add another harddrive to your computer. That will bump D to E and you have to learn that E is the new CD drive letter. Now lets add a DVD drive. That may be E or F, depending upon where on the cable you put it. It' not very consistent is it? Imagine putting USB drives on. If you move them around and have more than one connected at a time, the drive letter it gets depends on what order you plugged them in.
Linux on the other hand will let you assign a unique label to each disk and you can have it "mount" it anywhere you want. for instance, I have a USB drive full of MP3s. When I have it plugged in it is /home/Jason/MP3s. When the disk is not "mounted" the MP3 directory is empty. No matter what drives I add or what order they are plugged in, it always appears in the same place.
"Mounting" is then is defined as taking an available partition and assigning it a location in your file system.
Another example is when you run out of space on your computer. Most people buy a new disk and start moving file over to the new drive letter, or they install Windows from scratch. In Linux, you can just throw that disk anywhere in your file system, so it appears exactly the same. A common thing I do is make /home its own disk. /home changes a lot, while the rest of the computer doesn't change size much unless you install software. Of course, I work on computers that are shared so there are a lot of users in the /home directory. TODO: Clean up and possibly make a new page?
Feedback: I like it so far. This is the english that I'm trying to inspire at Mount and at another page that references mounting. If I'm going to plug in a device, how do I know how to mount it? Are USB ports named like hard drives? e.g. /dev/usb0 Are there issues I need to be aware of with formatting, i.e. what will it take to use a FAT32 formatted USB drive?
Windows has a "superuser" account called "Administrator". This user can do anything on the computer. Linux has one, it is called "root". But these two operating systems differ in how these who accounts behave.
In windows, you can do anything to the computer unless explicitly not allowed by the windows security system. For instance, a windows user can delete core operating system files that will result in a non-usable computer. Viruses have free reign of the computer as well.
In Linux, you can only do things to files that are assigned to you. Core operating system files (all of them) are assigned to the "root" account. You can't delete them unless you are root. And other people's files are owned by them and not you, so if you get a virus, the damage is limited to your files only. This makes viruses very hard to spread.
Logging in as root is highly discouraged. Most Linux utilities will ask you for the root password only when root access is needed, and will let that specific utility run as root for as long a it is running. That is the accepted way to do things. Only run as root when you have to, because it minimizes the chance for something important to get screwed up.
Linux's file security model is as follows: there are three levels of permission:
- User - (first 3 letters) the person who owns the file
- Group - (second 3 letters) the group this file belongs to (a group can also be a user if it is not for a group)
- World -(last three letters) everyone else who is not the user or the assigned group.
Each of these three classes has 3 attributes, which are either set or not set.
- Read - (r) reading the file
- Write - (w) writing the file
- Execute - (x) running the file
Lets take a look at the permissions on a typical file's permission: -rw-rw-r-- jason jason 103 8:32 myfiles.txt The line is split up into user, group, and world: (-rw, -rw-. r--) Here, we can see user and group have read and write permissions. World can only read the file. We can see the file is not a program because the execute (x) bits are not set, they are dashes (-). The rest fo the line from left to right is: owner, group, size, last modified time, and the file's name.
A file's owner can change these permissions. You can make the file world-writable if you wish. But that is beyond the scope of this page.