Linux - NewbieThis 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!
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.
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
i had 2 OSs, one is RedHat and the other is Win2k. i decide to mount win2k files to Linux so i can go on with my work on Linux, the command i typed is just like this:
mount auto -t /dev/hda5 /mnt/win2k
it works fine. but i need more, ie i need Linux mount this part automaticaly everytime it starts, my book didnt tell me much on this topic, so i hope some guys could inspire me a bit, any suggestions ?
/dev/hda5 is your Win partition. In fstab, the device usaully goes first. '/mnt/win2k' is the mount point, a folder where the stuff will be mounted. 'auto' is the filesytem type. The FS-type is automatically detected f this is used. It can also be 'vfat' (for FAT32) or 'ntfs'. NTFS should also be set as read-only, because ntfs write isn't supported well. The second 'auto' is the first of a list of options. 'auto' mounts automatically on startup. 'defaults' is the default options. You can add 'ro' here to make the device read-only. Do not leave spaces between options, only commas. The last two 0's are for whether the FS will be checked or not (pass), and whether the FS will be backed up (dump). Put this line at the top of your fstab for reference:
#<-Note the hash, this renders the line ignored
#device mnt-point fs-type options dump pass
What /bin/bash meant by using uid/gid is that these are options. Windows does not support some Linux attributes. They must be set in the fstab instead of the normal way. The 'umask=[number]' option sets permissions. 'umask=0' will set rwxrwxrwx permissions on all the stuff in your Win drive. 'uid=' and 'gid=' set ownership. Putting 'uid=black' will set all files as being owned by black. 'gid=users' will set the files' group to 'users'. Remember that options are seperated by commas, not spaces.
Thats an excellent explanation by aaa. I just wanted to add an example or two.
You can get as complicated as you want with fstab entries. Or you can keep them simple.
/dev/hda1 /win/c vfat auto,umask=027,uid=501,gid=100 1 0
The above will automatically mount /dev/hda1 at /win/c using vfat filesystem. The files will owned by the user with uid=501 and will be in the group with gid=100. The mask 027 makes the files writable only by owner (drwxr-x---) but group can browse the directories and read the files.
/dev/hda1 /win/c vfat user,auto 1 0
This will automatically mount /dev/hda1 at /win/c using vfat filesystem. It doesn't matter who owns the files because they will be writable by anyone.