Thread: Ubuntu Linux
View Single Post
Old 2007-06-04, 07:33   Link #13
AS Oji-kun
Join Date: Nov 2006
Location: Mucking about
Age: 64
Originally Posted by Dhomochevsky View Post
The only thing that really confused me when first installing a linux was the way it handles pathes and hd names.....

Oh and HDs (the real hardware parts) are given complicated names like sda0, sda1, or even sda01..2...4 and so on for partitions on sata hds.
Once you get used to having a single directory tree that spans all devices and filesystems you'll come to appreciate the power this simple method offers.

First rule about Unix systems in general: everything is a file. This includes disks, partitions, USB mass storage, printers, you name it. "Devices" like disks, keyboards, etc., live in the /dev subtree. The first SATA or SCSI drive in the chain is /dev/sda, the next /dev/sdb, and so forth. If you plug in a USB storage device like a camera or portable media player, it'll be assigned the next available /dev/sdX name. Specific partitions are referenced by adding a number from 1-N to the end of the device name like /dev/sda2, the second partition on the first SATA drive. Treating everything as a file gives Unix enormous power. For instance, you can clone an entire hard drive by using the command "dd if=/dev/sdc of=/dev/sdd" which makes a bit-for-bit copy of /dev/sdc onto /dev/sdd ignoring details like partitions, filesystems, etc.

Rather than assigning "drive letters" as DOS/Windows does, Unix has the concept of "mount points." A mount point is simply an empty directory in the tree. Each filesystem outside the root tree is attached to the tree at a mount point. For instance, all our home directories live on our server which I then attach to the mount point /home on our workstations using a technology called the "Network File System," or NFS. (Invented by Sun, NFS is the most-common method for accessing network filesystems in Unix.) That means my personal configuration travels with me across workstations. Network filesystems are thus treated identically to local filesystems. Think about this as like mounting a "network drive" in Windows. Instead of mounting a remote share to a drive letter like H:, I mount it to /home.

The most-common problem I see new Unix users having with all this is using the wrong slash. After years of using "\" to represent levels in a tree in Windows, they now have to use "/". ("\" is used as an "escape" character on the command line and tells the command processor, or "shell" in Unix-speak, to treat the following character as itself even if it might have some other special meaning.) This slash issue has become less of a problem since the advent of the Internet because people are now used to URLs which employ the Unix slash. But I still have to remember to tell people which slash to use if I have to give them instructions about typing commands.

@hobbes: As others have said here, good desktop distributions like Fedora or Ubuntu hide all the command-line stuff. My daughter uses Linux every day and never types a command. (Of course, she does have excellent technical support available.) I recommend getting a live-CD version of, say, Ubuntu, and taking it for test drive.

Edit: Fedora 7 was released over the weekend and now includes a live-CD version as well. Torrents here.

Last edited by SeijiSensei; 2007-06-04 at 10:47. Reason: Fedora 7
SeijiSensei is offline   Reply With Quote