Linux-File System
Linux-File System
This is a beginner's course and one of the concepts that newcomers to Linux find different is the idea of a file system in Linux. That is to say, the way data is stored and managed in Linux. MS-Windows and Mac users are used to clicking on an icons and dragging the files they want copied to a floppy or another part of the hard drive. Linux users that use KDE or GNOME can also copy files in that way to different parts of the hard drive. However, if you would like to use floppies, we should talk here a bit about the type of file system Linux uses. MS-Windows, from Windows 95 on up uses a file system called 'vfat' Linux uses a different system called 'ext2'. There are also other types of file systems out there. You may have chosen to have both Windows and Linux installed in your computer. At one point, you might have to access files in the Windows partition of your hard drive. You would use a command called 'mount' to do that. You would also have to indicate as an option in that command that the file system you want to access or "mount" is a Windows 'vfat' file system. On the same idea, though floppies are becoming somewhat obsolete, you may want to store some files on a floppy or access data on a floppy that someone has given to you. You would also have to use the command 'mount' before you copied data to or got data from a floppy disk. If that person is a Windows user, then you would have to indicate once again that the file system is 'vfat'. If you want to copy data from your Linux partition to a floppy, you would have to format and then "mount" the floppy as a Linux 'ext2' file system.
The first one we should look at is 'cd'. Again MS-DOS users will be familiar with this. cd will get you in and out of directories. Try this one: cd / This will get you into the 'root' or main directory. It's the directory of directories, the king of kings, your show of shows. The root directory shouldn't be confused with root's directory. That is /root.
floppy mnt
you'll see: lilo.conf And you don't even have to type the whole thing. You could just type 'ls li' and push the tab key. Linux will type the rest for you. Isn't that cool!
hard disk is kept track of as a file that sits there. If you're using an IDE hard drive (as opposed to SCSI), your hard drive will be known as /dev/hda. Don't delete that, because your hard disk will spin around, come jumping out of your computer, land on the floor and spill out ooze all over the place. No, not really. You will probably not have to look in /dev very much, so don't worry about that.
check every once and a while automatically. You also have our permission to fix yourself a sandwich in these cases too.
It will start to shut off programs that you're computer is using and you'll see it all happening. That's because Linux is a transparent system. It lets you see everything it's doing. It won't give you a simple message telling you to wait and then another one telling you you can shut it off now. If something is causing a problem, it will tell you about it when it starts up and when it shuts down. That way, if you are having a problem, you may be able to track it down. If you don't know how to solve it, you can tell another person what you saw and he or she may be able to help you. With the
shutdown -h now
System halted
or
Power down
If you have installed a dual-boot system and you want to use the other operating system, (why would you want to do that?) you would use this command. You will get a similar message as with the -h (halt) option that will say something like:
System going for reboot NOW
The basic reason behind all of these messages is that Linux was conceived to be a networked operating system. You have people at workstations on the network busily doing their work. The last part of the shutdown command now is fine for a single-user home PC, but on a network system this would be changed to indicate a time. That way people would have a
chance to finish what they were doing before the system went down for maintenence. Using 'now', in a network, would probably be hazardous to the health of the person who sent that command. The next time you shutdown your system, you may want to try using some time options instead of just now. For example, you may want to try shutting down the computer at a given time.
shutdown -h 20:01
Which will shutdown the computer at 8:01 PM. You could also try:
shutdown -h +5
That shuts down the computer in 5 minutes time. Now you know the correct way to shutdown your Linux system. In the next lesson we'll talk using the system again.